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?
Thanks!
+ Reply to Thread
Results 1 to 3 of 3
-
-
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 -
-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 14:48.
Similar Threads
-
Video not exporting to separate files
By superskid in forum EditingReplies: 3Last Post: 1st Dec 2016, 14:18 -
How to Join / Muxing / Merging Webm Video + Audio Files?
By devilcoelhodog in forum Video ConversionReplies: 3Last Post: 2nd Jan 2015, 06:40 -
Merging AAC audio files?
By killerteengohan in forum AudioReplies: 3Last Post: 5th Aug 2014, 09:32 -
How to splice together separate 5.1 .wav audio files??
By JetrellFo69 in forum AudioReplies: 3Last Post: 23rd Dec 2012, 16:13 -
Separate AVCHD video files for burning on DVD
By csh in forum Authoring (Blu-ray)Replies: 5Last Post: 13th Jan 2012, 01:01