How can I view the "code" of a .mp4 video file?
Asked Answered
O

2

6

I know that my terminology is not correct, but I am a complete novice when it comes to video.

I have a regular .mp4 video file. I use MP4Box to segment the video file so I can play it back using a video player that supports MPEG dash. It is not segmented by creating multiple smaller video files. It creates a new, large video file that is a bit larger than the old video file.

I want to compare the regular video file with the dashed video file and see what MP4Box does to it to segment it. I believe that it is adding some type of header to the new video file. Obviously when I open it up in a text editor, it is unreadable. How can I go about comparing these files?

Outpost answered 8/10, 2015 at 18:27 Comment(0)
S
4

Using a hex editor would be one way, but there are also tools which are more convenient. In my opinion, isoviewer is the best of them as it reads even segmented files. Also the hex representation is displayed. It is a Java application and hence works on Mac, Windows, and Linux.

Your resulting video might be bigger as e.g. a sidx box needs to be present if you use one "internal segmented" file instead of physically chunked files.

You could also create physical chunks by using -segment-name segment_ in your MP4Box command, as described in this blog post. It creates chunks named segment_NUMBER, i.e. segment_1.m4s, segment_2.m4s, etc.

If you want to create MPEG-DASH content without hassle, you could also use platforms like zencoder or bitcodin, which also offers a free plan.

Stigmatism answered 12/10, 2015 at 8:45 Comment(0)
P
2

Use a hex editor, not a text editor. The mp4 file is being split into a bunch of fragments. The fragments are then concatenated (along with an initialization fragment at the start) into one big file. But unlike the mp4 each fragment can be played individually. Open the file in a hex editor. In the mp4 you will find one moov and one mdat. In the dash file you will find one moov and bunch of moof and mdat.

Plethora answered 8/10, 2015 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.