Reputation: 592
I have 3 video of 1920x1080. They are all the same length/codec. I'd like to combine them (not concatenate), so that the result is one video of 5760x1080.
Can someone explain to me how to do this in ffmpeg (or another free application)?
Thanks!
Upvotes: 0
Views: 631
Reputation: 463
For future reference - these types of non-programming questions should go on superuser.com - not here.
To answer your question:
As far as I know, the only way to do this within FFmpeg will result in re-encoding the file (all video filters require specifying an audio/video codec, and stream copying is disabled)
As long as that is not an issue for you, here's how to do it with your files:
ffmpeg -i [input1] -i [input2] -i [input3] -filter_complex "[0:v]pad=width=5760:height=1080:x=0:y=0[p];[p][1:v]overlay=shortest=1:x=1920:y=0[p2];[p2][2:v]overlay=shortest=1:x=3840:y=0[full]" -map [full] .... [OUTPUT]
You'll want to replace the ....
area with what codec, and any other transcoding options you'd like to use.
Breaking this down a bit: You are taking your first input file and padding it with black to 5760x1080. Then you are taking your second file and overlaying it beginning at the coordinate 1920x0. Lastly you are adding the third file as an overlay at the coordinate 3840x0.
Upvotes: 2