Tuesday, June 26, 2018

Merging multiple MP4 videos with FFMPEG

I have a collection of video tutorials split into multiple sections and multiple clips in each section. I wanted to merge the files to one, so I can upload and download from services like Google Drive & Dropbox.

I wanted to merge all the clips to one .mp4 file. And also I want to keep the sections and topics for easy viewing later.

After few searches, I could not find one as I like, so I wrote one using ffmpeg.

merge-mp4.sh - https://gist.github.com/palaniraja/

Before:


After:


You will see two output files, one with "-meta.mp4" is the one with chapter information.

Output file with chapters:

Script: