Merging Two MP4 Files From The Command Line

term

One of the problems I find with video editing, is sometimes it becomes very complicated to do something very simple. Take my current need. I needed to simply tie two mp4 files together, unedited, just hook one to the next. There are lots of gui types, but that requires opening them up, adjusting settings, loading or importing the files, and just a little more time and work than I want for such a simple task.

Fortunately, I found a really easy to use method to do that from the command line: MP4Box!

You can install it like so:

$ sudo apt-get install gpac

$ sudo ln -s /usr/local/lib64/libgpac.so /usr/lib/libgpac.so

Once installed, it is very, very simple to use:

 

$ MP4Box -cat myFirstVideo.mp4 -cat mySecondVideo.mp4 -new myNewVideoFile.mp4

That’s it! Now, whenever I need to add two videos together, all I have to do is run one simple command, and in seconds, it is done! That’s what I like to call simple!

Linux – keep it simple.