Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stitching videos together using ffmpeg on the command line

Does anybody know how to stitch two (or more) videos together using ffmpeg (or another cli)? This is assuming that all the videos are in the same format and the video format being used allows for lossless stitching (no transcode, just end-to-end stitching).

like image 587
quinn Avatar asked Dec 11 '09 16:12

quinn


1 Answers

You can stitch two or more videos with ffmpeg that are in a format that can be concatenated by doing this:

$ cat file1.avi file2.avi > cat_output.avi
$ ffmpeg -i cat_output.avi -r 25 -sameq stitched.avi 

The second step it necessary where ffmpeg merges the joined files into a proper readable video file.

There is no such thing as -newvideo in ffmpeg to my knowledge.

like image 62
Future Optical Avatar answered Sep 28 '22 12:09

Future Optical