I'm unable to merge two avi videos together. google is full of below examples:
cat file1.avi file2.avi file3.avi > video_draft.avi
after appending the data together using cat above, you need to re-index the draft movie like this:
mencoder video_draft.avi -o video_final.avi -forceidx -ovc copy -oac copy
Now you're video_final.avi file will be right to go.
but it doesn't work for me, the first video is converted and that's it.
you need to add -safe 0 for recent versions of ffmpeg, and it needs to be before the file list.
You should look into the concat demux and concat protocol that was added in ffmpeg 1.1. Assuming the codecs are the same you create a file (example
mylist.txt
):Then pass that file to ffmpeg
You can use this command to make the list:
The linked page has more advanced examples for dealing with issue like different codecs/formats.