VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Hello

    I used the same command I always use to combine a JPG and an MP3 file:
    Code:
    c:\>ffmpeg.exe -i audio.mp3
    Input #0, mp3, from 'audio.mp3':
      Duration: 01:28:31.19, start: 0.025057, bitrate: 128 kb/s
        Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
        Metadata:
          encoder         : LAME3.99r
    
    c:\>ffmpeg.exe -loop 1 -i picture.jpg -i audio.mp3 -r 5 -vf scale=640:-1 -pix_fmt yuv420p -c:a copy -f mp4 output.mp4
    But for some reason, ffmpeg keeps running even past the end of the MP3 file: After hitting CTRL+C to stop it, and playing the video, the video plays fine, and it's just silence past the 1hr20mn31s point. Any idea why?

    Thank you.
    Last edited by yetanotherlogin; 29th Jun 2015 at 15:58.
    Quote Quote  
  2. You probably need something like -shortest to pick the shortest one

    It used to work on older ffmpeg builds, then didn't work on newer ones, not sure about now. You might have to find an old version


    -shortest (output)

    Finish encoding when the shortest input stream ends.
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    Paris, France
    Search PM
    Spot on.

    Thank you.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!