Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Autres articles (103)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

Sur d’autres sites (7639)

  • subprocess.run output is empty (python 3.8)

    26 juillet 2022, par Marino Linaje

    I'm trying to capture the output of a command with the following code :

    


    lines = subprocess.run(['ffmpeg', '-hide_banner', '-nostats', '-i', in_filename, '-vn', '-af', 'silencedetect=n={}:d={}'.format(silence_threshold, silence_duration), '-f', 'null', '-'], capture_output=True, text=True, shell=True, check=True, encoding='utf-8').stdout 
print (lines)


    


    But lines is an empty string and nothing is printed.
When capture_output=True is removed, the correct output is showed (without printing it).

    


    I tested many combinations, including removing all the subprocess.run parameters and only include capture_output=True with the same result.

    


    I also tested with few argument for a minimal example : subprocess.run(['ffmpeg', '-version'], capture_output=True, text=True, shell=True, check=True, encoding='utf-8').stdout

    


    Also tested stdout=subprocess.PIPE and stderr=subprocess.PIPE as subprocess.run arguments instead of capture_output=True

    


    I can't figure out what is happening. Thanks in advance !

    


  • sws_scale() does not convert image simply copying it from source to target

    14 mars 2020, par Slav

    Trying to read arbitrary video as plain RGB24 pixels so convert frame with sws_scale() this way :

       //...
       AVFrame* pic_out = av_frame_alloc();
       pic_out->format = AV_PIX_FMT_RGB24;
       pic_out->width  = 1920;
       pic_out->height = 1080;
       av_frame_get_buffer( pic_out, 32 );

       struct SwsContext * img_convert_ctx = sws_getContext(
           1920, 1080, AV_PIX_FMT_YUV420P,
           1920, 1080, AV_PIX_FMT_RGB24,
           SWS_BICUBIC,
           NULL, NULL, NULL
       );
       //...
       sws_scale(
           img_convert_ctx,
           pic_src->data,     //pic_src is from avcodec_receive_frame()
           pic_src->linesize,
           0,
           1080,
           pic_out->data,
           pic_out->linesize
       );

    Everything goes without any errors, but pic_out ends up having the same data as pic_src.
    What could be the problem ?

    Full minimal example is here (supposed to be RGB24 image is there as 2.bmp which looks like actually being YUV-something)

  • How to sum audio from two streams in ffmpeg

    9 février 2021, par user3188445

    I have a video file with two audio streams, representing two people talking at different times. The two people never talk at the same time, so there is no danger of clipping by summing the audio. I would like to sum the audio into one stream without reducing the volume. The ffmpeg amix filter has an option that would seem to do what I want, but the option does not seem to work. Here are two minimal non-working examples (the audio tracks are [0:2] and [0:3]) :

    


    ffmpeg -i input.mkv -map 0:0 -c:v copy \
       -filter_complex '[0:2][0:3]amix' \
       output.m4v

ffmpeg -i input.mkv -map 0:0 -c:v copy \
       -filter_complex '[0:2][0:3]amix=sum=sum' \
       output.m4v


    


    The first example diminishes the audio volume. The second example is a syntax error. I tried other variants like amix=sum and amix=sum=1, but despite the documentation I don't think the sum option exists any more. ffmpeg -h filter=amix does not mention the sum option (ffmpeg version n4.3.1).

    


    My questions :

    


      

    1. Can I sum two audio tracks with ffmpeg, without losing resolution. (I'd rather not cut the volume in half and scale it up, but if there's no other way I guess I'd accept and answer that sacrifices a bit.)

      


    2. 


    3. Is there an easy way to adjust the relative delay of one of the tracks by a few milliseconds ?

      


    4.