VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Dec 2016
    Stafford Springs, CT
    Search PM
    I have a few MP3's that I'm trying to add video too (or vice versa) but I'm running into a problem. My video is 60 minutes long and the MP3's are about 30 minutes long. My goal is to run a command line utility against all of them to come up with merged files for each of them. I've been using the ffmpeg utility using the following command but despite adding the "-shortest" tag it still produces an hour long video with the original audio:

    ffmpeg -i "video.mp4" -i "audio.mp3" -shortest output.mp4

    My understanding from doing some research on this is that there is a bug with newer versions of ffmpeg that seems to ignore the shortest command so I downloaded a version from 2013 and it still does the same.

    My question is, is there another way to construct the command or even another tool all together that will do what I want?

    Quote Quote  
  2. Member Krispy Kritter's Avatar
    Join Date
    Jul 2003
    St Louis, MO USA
    Search Comp PM
    The runtime will be equal to the video runtime. So in your example, if the input video is 60 minutes, then the output will be 60 minutes (assuming the audio stream is 60 minutes or less).

    I don't know that it will cut 30 minutes of video to make it match the 30 minute audio stream.

    Unless I'm not understanding you correctly.
    Google is your Friend
    Quote Quote  
  3. -shortest works for me like expected. Maybe it depends on whether or not ffmpeg detects the mp3's duration correct? Maybe mp3 headers are broken? What duration does "ffmpeg -i audio.mp3" display? Or duration of video - test "ffmpeg -i video.mp4" as well. Post log and/or samples.
    Last edited by sneaker; 8th Dec 2016 at 15:48.
    Quote Quote  

Similar Threads