How to combine a m4s (Fragmented Mp4 Files) into one mp4 File

In one of our use cases, we needed to merge many M4S files into a single Mp4 file.Exists a Bitmovin SDK or tool that offers this feature?

MP4 is supported out of the box by our encoder. You can use our MP4 API for that.

If you want to reuse your existing fragmented MP4s, you can also concatenate them into a single MP4 with the following steps :

1- Concatenate audio and video segments into 1 file each

cat init.m4s seg1Video.m4s seg2Video.m4s .... > outVideo.mp4
cat init.m4s seg1Audio.m4s seg2Audio.m4s .... > outAudio.mp4

2- Merge both tracks into one single MP4 file
ffmpeg -i outVideo.mp4 -i outAudio.mp4 -c copy -map 0:v -map 1:a output.mp4

Please let us know in case you have any questions

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.