简体   繁体   English

如何查看.mp4视频文件的“代码”?

[英]How can I view the “code” of a .mp4 video file?

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. 我有一个普通的.mp4视频文件。 I use MP4Box to segment the video file so I can play it back using a video player that supports MPEG dash. 我使用MP4Box来分割视频文件,这样我就可以使用支持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. 我想将常规视频文件与虚线视频文件进行比较,看看MP4Box对它做了什么来对其进行分割。 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? 我该如何比较这些文件?

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. 在我看来, isoviewer是最好的,因为它甚至可以读取分段文件。 Also the hex representation is displayed. 还显示十六进制表示。 It is a Java application and hence works on Mac, Windows, and Linux. 它是一个Java应用程序,因此适用于Mac,Windows和Linux。

Your resulting video might be bigger as eg a sidx box needs to be present if you use one "internal segmented" file instead of physically chunked files. 您生成的视频可能会更大,例如,如果您使用一个“内部分段”文件而不是物理分块文件,则需要存在sidx框。

You could also create physical chunks by using -segment-name segment_ in your MP4Box command, as described in this blog post . 您还可以在MP4Box命令中使用-segment-name segment_创建物理块,如本博客文章中所述 It creates chunks named segment_NUMBER , ie segment_1.m4s , segment_2.m4s , etc. 它创建名为segment_NUMBER块,即segment_1.m4ssegment_2.m4s等。

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. 如果你想毫不费力地创建MPEG-DASH内容,你也可以使用像zencoderbitcodin这样的平台,它也提供免费的计划。

Use a hex editor, not a text editor. 使用十六进制编辑器,而不是文本编辑器。 The mp4 file is being split into a bunch of fragments. mp4文件被拆分成一堆片段。 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. 但与mp4不同,每个片段都可以单独播放。 Open the file in a hex editor. 在十六进制编辑器中打开文件。 In the mp4 you will find one moov and one mdat . 在mp4中你会发现一个moov和一个mdat In the dash file you will find one moov and bunch of moof and mdat . 在破折号文件中,您将找到一个moov和一堆moofmdat

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM