Concatenating Video Files with MPlayer

I found out how to concatenate the parts of a video to a single file with MPlayer. It’s relatively easy, so this is just a mini-post to save it for posterity:

$ cat video_part1.avi video_part2.avi ... > temp.avi
$ mencoder -forceidx -oac copy -ovc copy \
    temp.avi -o final.avi && \
    rm temp.avi

7 thoughts on “Concatenating Video Files with MPlayer

  1. Lucius Windschuh

    Isn’t it simpler to do mencoder -ovc copy -oac copy -o final.avi video_part1.avi video_part2.avi?

    1. keramida Post author

      Yes, that may work too. I don’t know if this mode of copying also works work -forceidx though, but it’s worth trying it out.

  2. George Notaras

    Nice tip for quickly concatenating all your footage!! However, since there is almost always a need for some minor modifications (mainly cutting those unneeded scenes from the beginning and the end of each video part) without re-rendering the video, I highly recommend using a graphical tool for this. Avidemux is an excellent choice for basic video editing.

Comments are closed.