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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s