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
About these ads
This entry was posted in Computers, Free software, FreeBSD, Linux, Open source, Software and tagged , , , , , , . Bookmark the permalink.

7 Responses to Concatenating Video Files with MPlayer

  1. firewalker says:


  2. Dave says:

    I would recommend using “avimerge” from the “transcode” port for doing this.
    and more info about it can be found at:

  3. Coder says:

    Nice tips :)

  4. Why not just
    mencoder -oac copy -ovc copy -noodml -o “joined.avi” “1.avi” “2.avi” ?

    (noodml is only for the case the resulting video is larger than 1GB)

  5. Lucius Windschuh says:

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

    • keramida says:

      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.

  6. 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.