When media data is stored in the end of the mp4 file(it always be there),it is very difficult to extend or delete metadata infos,because metadata will use absolutely offset of this mp4 file to locate media data,so is there a tool can help me to split metadata and mediadata into 2 file?Or,is there a tool can move 'mdat' box so I can let metadata stored behind the mediadata? All I want to get is I can freely modify the metadata related boxes and don't worry about the offset. Thanks.


If I understand you correctly, you want the MOOV atom to be stored at the end of the MP4 (after the media payload). If so, this is the typical scheme used by ffmpeg unless flagged otherwise. So, copy your current MP4 into a new container via ffmpeg:

ffmpeg -i input.mp4 -c copy output.mp4
  • At first,thanks ! And I know how bad my English is :). – aicco Nov 19 '15 at 9:13
  • Your answer help me.And I also want to know can I move the media payload to another file? I mean 1.mp4 only contains metadata and 2.mp4 only stores media payload. If I can, is there a tool? – aicco Nov 19 '15 at 9:15
  • Let me clarify: some of the metadata is related to the data structure of the payload in the file i.e. chunk offsets and the like, for the media player to map out the media itself. And then there's information stored like a rotation flag or XMP fields..etc These latter are of the key=value form. The former will be generated by ffmpeg when you create a new MP4. For the latter, MP4Box should be able to transfer those - gpac.wp.mines-telecom.fr/mp4box – Gyan Nov 19 '15 at 9:50
  • Sorry,I didn't get it clearly.The reason I want to split it into 2 parts is that in the ISO/IEC 14496 Part 12, it says that 'dref' box indicates the location of media payload. And the definition of 'dref' shows that we can place the payload into another file. – aicco Nov 19 '15 at 10:11
  • Ah, that's beyond my ken. Best place to ask that is the GPAC forum at github.com/gpac/gpac/issues – Gyan Nov 19 '15 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.