Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm merging two mp4 files for video streaming. the problem is, the merged file contains two atoms, 1 atom from each file and that is a problem when it comes to streaming. the client needs to wait until the first atom loads from file1, than when it's time to play second part from file2 client will wait again for the atom to be loaded. when your atom is small you may not notice this, but when you stream a large video, atom could weight 7-10mb.

How can I remove those two atoms from merged file and create a new one?

what i've tried:

ffmpeg -i file1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i file2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc m.file.mp4

MP4Box -add m.file.mp4 -isma mf.file.mp4
mv mf.file.mp4 m.file.mp4
share|improve this question
I'm not sure if this is a translation issue or if I'm falling behind in the tech world, but what do you mean by atom? –  kobaltz Oct 2 '13 at 21:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.