Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • FFMPEG : Set different volume levels while processing

    15 mars 2018, par Valdir

    I know how to set the volume with ffmpeg, but I need a way to change it dynamically (user will choose in a volume bar the volume ffmpeg should output without restarting the process). So it will start 100% and change during the processing depending on user's choice.

    Is that possible?

  • How to make a transiton video using the Canvas Draw [on hold]

    15 mars 2018, par Xuân Mai

    I want to save one image list with transition effects (painted canvas draw) but when saved as a video, transition effects animation corrupted or lost please help or to apply the solution ..

  • shell scripting no such file or directory

    15 mars 2018, par Toto Tata

    I wrote a shell script that calls the ffmpeg tool but when I run it, it says No such file or directory yet it does!

    Here is my script:

    #!/bin/bash
    
    MAIN_DIR="/media/sf_data/pipeline"
    
    FFMPEG_DIR="/media/sf_data/livraison_transcripts/ffmpeg-git-20180208-64bit-static"
    
    for file in MAIN_DIR/audio_mp3/*.mp3;
    do
        cp -p file FFMPEG_DIR;
    done
    
    for file in FFMPEG_DIR/*.mp3;
    do
        ./ffmpeg -i ${file%.mp3}.ogg
        sox $file -t raw --channels=1 --bits=16 --rate=16000 --encoding=signed-
    integer --endian=little ${file%.ogg}.raw;
    done
    
    for file in FFMPEG_DIR/*.raw;
    do
        cp -p file MAIN_DIR/pipeline/audio_raw/;
    done
    

    and here is the debug response:

    cp: cannot stat ‘file’: No such file or directory
    ./essai.sh: line 14: ./ffmpeg: No such file or directory
    sox FAIL formats: can't open input file `FFMPEG_DIR/*.mp3': No such file or 
    directory
    cp: cannot stat ‘file’: No such file or directory
    

    FYI I'm running CentOS7 on VirtualBox

    Thank you

  • While transcoding to mpegts ffmpeg creates the first frame after 1.48 seconds delay

    15 mars 2018, par Biraj B Choudhury

    I have transcoded a file to mpegts using the following command

     ./ffmpeg -y -i big_buck_bunny_720p_5mb.mp4  -vcodec libx264  -x264opts "keyint=48:min-keyint=48:no_scenecut" -r 23.976 -c:a copy  -f mpegts test.mpegts
    

    When I run ffprobe on it -

    ./ffprobe  -i  test.mpegts  -select_streams v -show_frames -of csv
    

    I see that the first frame starts at 1.48 seconds why is this so ?

    Input #0, mpegts, from 'test.mpegts':
      Duration: 00:00:29.61, start: 1.483422, bitrate: 1964 kb/s
      Program 1 
        Metadata:
          service_name    : Service01
          service_provider: FFmpeg
        Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
        Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, 5.1, fltp, 406 kb/s
    frame,video,0,1,133508,1.483422,133508,1.483422,133508,1.483422,3753,0.041700,564,112008,1280,720,yuv420p,1:1,I,0,0,0,0,0
    frame,video,0,0,137262,1.525133,137262,1.525133,137262,1.525133,3753,0.041700,125584,1110,1280,720,yuv420p,1:1,B,2,0,0,0,0
    

    After some research I added "muxdelay 0" to my command

    ./ffmpeg -y -i big_buck_bunny_720p_5mb.mp4  -vcodec libx264  -x264opts "keyint=48:min-keyint=48:no_scenecut" -r 23.976 -c:a copy  -muxdelay 0 -f mpegts test.mpegts
    

    And now I get the following in ffprobe

    Input #0, mpegts, from 'test.mpegts':
      Duration: 00:00:29.61, start: 0.083422, bitrate: 1987 kb/s
      Program 1 
        Metadata:
          service_name    : Service01
          service_provider: FFmpeg
        Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
        Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, 5.1, fltp, 406 kb/s
    frame,video,0,1,7508,0.083422,7508,0.083422,7508,0.083422,3753,0.041700,564,112008,1280,720,yuv420p,1:1,I,0,0,0,0,0
    frame,video,0,0,11262,0.125133,11262,0.125133,11262,0.125133,3753,0.041700,125584,1110,1280,720,yuv420p,1:1,B,2,0,0,0,0
    

    Can anybody help me understand what is this muxdelay that is contributing to 1.4 seconds of delay and what is contributing to the remaining 0.08 seconds of delay.

    The first frame is at 0.000 when the output is mp4 so this is something particular to mpegts.

  • Overlay audio over video FFMEPG

    15 mars 2018, par Benjamin Sweney

    I'm wanting to overlay an audio recording over a video using FFMEPG PHP or more specially Laravel (if possible). The audio clip will need to replace the videos audio, or better if possible set the videos audio volume to a predefined value and overlay the audio.

    The audio clip will always be longer than or the same length as the video and can not be clipped. Side note, how will this be handled? Black screen or frozen last frame, or?

    Would appreciate someone pointing me in the right direction.

    Much appreciated!