Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

I'm not sure what you mean by removing the 'moov' atoms/boxes. MP4Box -add merges both 'moov' boxes/atoms into one. If you want to make the initial playback start faster when you download it, you should try fragmenting your file or using MPEG DASH (in particular the onDemand profile)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .