[FFmpeg-user] Combining multiple videos into a new multi-video-track file with the audio from the first video
Steven Smith
blahblahblahblha303 at gmail.com
Mon May 13 20:00:08 CEST 2013
Good day :)
I've been trying to combine three separate videos from different
angles into a single file with all three video tracks, and the audio
from the first one. I just now succeeded, as I was writing this. I'm
documenting what I did because there's hardly any information about
doing this. The main links that helped me are
http://www.ehow.com/how_12014220_map-multiple-streams-ffmpeg.html and
http://youmakemedia.com/2007/03/ffmpegx-tip-codec-type-mismatch/ .
Here is the command I used:
ffmpeg -i Alsmiffy.mp4 -i Djh3max.mp4 -i Trottimus.mp4 -map 0.0 -map
0.1 -map 1.0 -map 2.0 output.mp4 -newvideo -newvideo
The main thing to remember is that the first two streams must be
video/audio, then after that they can be just video. Also you have to
add new video streams with -newvideo.
The downside with this is that VLC doesn't let you select between the
tracks properly, it just plays them all in separate windows. I'm fine
with this, to be honest, as they're all synchronized with the audio.
-----------------------------------
Update: I tried to get ffmpeg to copy the original video streams
instead of re-encoding them in a much lower resolution with '-vcodec
copy' but it seems to only work on the first stream, if it works at
all. Can someone please suggest a better combination of options?
http://paste.hasteb.in/?id=oXF
Regards,
Steven Smith
stevensmith.ome at gmail.com
More information about the ffmpeg-user
mailing list