6

I'm trying to rebuild a video file from a Smooth Streaming server. Smooth Streaming serves fMP4 files which are regular MP4 files without neither their FTYP nor their MOOV atoms.

All the informations stored in those atom are placed into a Manifest XML file, which I have.

Is there a way to programmatically rebuild the original MP4 file, either by:

  • rebuilding a new file straight from H264/AAC content located in MDAT (and picture format infos); or
  • rebuilding FTYP and MOOV atoms

Or else, is there a tool which can merge fMP4?

Velcro
  • 546
  • 1
  • 8
  • 27

2 Answers2

3

Yes. It is completely possible.

You can do this with FFmpeg. Study the mov.c [MP4 demuxer] from libavformat.

You will need to complete the MP4 in memory with all data that is "missing" in the fMP4. In other words, when you need an atom that doesn't exist in fMP4 [almost all], you will have to input all information hard-coded (such information, most of them come from the manifest).

It's not easy... but for sure it's possible. I've done by myself. Unfortunately the code is not my property.

Good luck! ;-)

UPDATE: the PIFF format specification will be very useful (http://go.microsoft.com/?linkid=9682897) so one can understand what is already in the fMP4 and what is not!

Wagner Patriota
  • 5,494
  • 26
  • 49
0

It is simple to rebuild a mp4 file, if there are ism and ismc file which are related to fragmented mp4 files.

It is requested that you should know media type, codec type, codec specific data and time scale of each trak to rebuild a moov and ftyp atom.

these information can be retrieved from ism and ismc file.

you can retrieve a media type of each track from the ism file. you can retrieve codec type, codec specific data and time scale of each track from the ismc file.

simply speaking, ism/ismc files are meta data for server and client so that you can rebuild meta data(ftyp, moov atom) for a mp4 file.

Kaaate
  • 1
  • I have the ism, ismc, and ismv (fragmented mp4 file). You are right that, we can get the codec type, codec specific data and time scale of each track from the ismc file. Also, this information can be accessed by adding /Manifest in url, like http://localhost/pp/Test.ism/Manifest. This will return the manifest data. Now can you please tell me any way to create the MP4 file from this? I mean, is there any library or any code snippet available to do this. I'm trying on the same task since last 1 month and don't have any progress. Please give me a idea. – waghekapil Jan 09 '14 at 14:35