Recherche avancée

Médias (91)

Autres articles (29)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (4594)

  • Ffmpeg - How to force MJPEG output of whole frames ?

    27 août 2021, par Maoration

    I'm working with ffmpeg to process an incoming MPEGTS stream from remote cameras, and deliver it to multiple clients using my app.

    



    Technically, I'm using ffmpeg to convert the incoming stream to an MJPEG output, and piping the data chunks (from the ffmpeg process stdout) to a writeable stream on the client http response.

    



    However, I'm facing a problem- not all data chunks represent a full 'whole' frame. thus, displaying them in a row in the browser, results in a flickering video, with half-complete frames, on a random basis.
I know this because when printing each chunk length, results most of the time in a big value (X), but every now and then I get 2 consecutive chunks with length (2/5X) followed by (3/5X) for example.

    



    So the question - is there a way to force the ffmpeg process to output only whole frames ? if not, is there a way for me to check each data chunk 'manually' and look for headers/metadata/flags to indicate frame start/end ?

    




    



    my ffmpeg command for outputting MJPEG is :

    



    ffmpeg -i - -c:v mjpeg -f mjpeg -


    



    explained :

    



    "-i -" : (input) is the stdin of the process (and not a static file)

    



    "-c:v mjpeg" : using the mjpeg codec

    



    "-f mjpeg" : output will be in the mjpeg format

    



    "-" : output not specified (file or url) - will be the process stdout

    




    



    Edit :
here are some console.log prints to visualize the problem :

    



    %%% FFMPEG Info %%%
frame=  832 fps= 39 q=24.8 q=29.0 size=   49399kB time=00:00:27.76 bitrate=14577.1kbits/s speed=1.29x    
data.length:  60376
data.length:  60411
data.length:  60465
data.length:  32768
data.length:  27688
data.length:  32768
data.length:  27689
data.length:  60495
data.length:  60510
data.length:  60457
data.length:  59811
data.length:  59953
data.length:  59889
data.length:  59856
data.length:  59936
data.length:  60049
data.length:  60091
data.length:  60012
%%% FFMPEG Info %%%
frame=  848 fps= 38 q=24.8 q=29.0 size=   50340kB time=00:00:28.29 bitrate=14574.4kbits/s speed=1.28x    
data.length:  60025
data.length:  60064
data.length:  60122
data.length:  60202
data.length:  60113
data.length:  60211
data.length:  60201
data.length:  60195
data.length:  60116
data.length:  60167
data.length:  60273
data.length:  60222
data.length:  60223
data.length:  60267
data.length:  60329
%%% FFMPEG Info %%%
frame=  863 fps= 38 q=24.8 q=29.0 size=   51221kB time=00:00:28.79 bitrate=14571.9kbits/s speed=1.27x  


    



    As you can see, a whole frame is about 60k (my indication is a clean video stream i'm viewing on the browser), but every now and then the output consists of 2 consecutive chunks that add up to 60k. when delivered to the browser, these are 'half frames'.

    


  • Evolution #4146 (Fermé) : Invalideur lors de la publication : facultatif

    26 septembre 2018, par cedric -

    Bon pour commencer la ligne pointée est pas la bonne :)
    https://core.spip.net/projects/spip/repository/entry/spip/ecrire/action/editer_objet.php#L118 dit que si on modifie un objet déjà publié, ça invalide le cache, et c’est normal !

    C’est dans https://core.spip.net/projects/spip/repository/entry/spip/ecrire/action/editer_objet.php#L409 que l’on invalide le cache au moment de la publication.

    Et je ne pense vraiment pas qu’il faille changer ça en y mettant des dérogations.
    Par contre, si dans formidable les réponses sont juste stockées en base pour utilisation dans le back-office sans publication côté public, pourquoi leur donner le statut ’publie’ ? Appelons un chat un chat ! Le statut "publie" ça veut bien dire "à caractère publique, affichable sur le site public".

    Dans le cas présent, si tes données ne sont pas publiques, tu les mets en ’modération a priori’ dans la configuration de formidable et elles seront en statut ’proposée’ ce qui corrige tout tes problèmes sans gérer de cas particulier et en gardant la cohérence de tout le fonctionnement de SPIP

  • Turn an FFmpeg command into an FFmpeg wasm exec function

    30 novembre 2024, par SeriousLee

    I have this gnarly FFmpeg command :

    


    ffmpeg -i music.mp3 -i video.mp4 -i speech.mp3 -filter_complex "[0:a]atrim=0:$(ffprobe -i speech.mp3 -show_entries format=duration -v quiet -of csv=p=0),volume=0.08[trimmed_music]; [2:a]volume=2[speech]; [1:v]loop=-1,trim=duration=$(ffprobe -i speech.mp3 -show_entries format=duration -v quiet -of csv=p=0),setdar=9/16[vout]; [trimmed_music][speech]amix=inputs=2:duration=first[aout]" -map "[vout]" -map "[aout]" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 192k final_output.mp4


    


    What it does is :

    


      

    • Get the duration of a speech.mp3 file
    • 


    • Crop a video.mp4 to portrait dimensions
    • 


    • Trim a longer music.mp3 file to the duration of the speech
    • 


    • Loop a the video and trim the final loop so that the whole thing matches the duration of the speech
    • 


    • Adjust the volume of the music and speech
    • 


    • Combine them all into a single video with talking (speech) and music
    • 


    


    I can't figure out how to run it using the FFmpeg wasm. I realise ffprobe isn't a thing with the wasm so we'll have to find a different way to get the duration of the speech.mp3 by probably breaking it up into 2 or more exec functions, but I have no idea how to do that, which is why I'm here asking for help.

    


    For reference, here's the function into which I want to insert this exec function, but feel free to change it however needed. And let me know if I need to provide more information.

    


      const processVideo = async (speech, video, music) => {
    const ffmpeg = new FFmpeg();

    // ffmpeg loading code goes here, assume that part works without issue

    await ffmpeg.writeFile("video.mp4", new Uint8Array(video));
    await ffmpeg.writeFile("speech.mp3", new Uint8Array(speech));
    await ffmpeg.writeFile("music.mp3", new Uint8Array(music));

    await ffmpeg.exec([
      // command(s) should go here
    ]);

    const fileData = await ffmpeg.readFile("final_output.mp4");
    const blob = new Blob([fileData.buffer], { type: "video/mp4" });
    const blobUrl = URL.createObjectURL(blob);

    return blobUrl;
  };