Combining Mp4 video files automatically

How to combine mp4 video files to auto-fit DVD and BluRay disks and automagically create chapter marks for each join.

I have been a fan of the GPAC video tool package for a while. I've especially found their mp4box utility useful when dealing with mp4 files. Adding subtitles, creating chapters, combining multiple audio streams, you name it. This little tool does it all and blazingly fast.

See tool

However I recently ran into a small annoyance when I had to concatinate multiple mp4 video files into a single big one. I wanted to resulting file to have chapter marks created automatically at the joins between the mp4 files but there was no way to do this using the mp4box tool.

So I ended up writing a small python script that automates the process of joining mp4 video files into a single file. This tool can also break the joining up based on the desired output file size (e.g. if you want to burn the combined file to a DVD or BluRay disk and you want it to fit.)

The mp4combine is open-source and available on my

Github repo

Note: You need to download and install the GPAC tools first before using this script.



Software Developer
For hire


Developer & Programmer with +15 years professional experience building software.


Seeking WFH, remoting or freelance opportunities.