Recherche avancée

Médias (0)

Mot : - Tags -/clipboard

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (45)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (9463)

  • 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. 


    


  • 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)

  • 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 !