MP4容器解析:’别名数据处理程序’ 用于什么?

huangapple go评论54阅读模式
英文:

MP4 container parsing: What is 'Alias Data Handler' for?

问题

我有一个MP4文件,正在使用解复用库进行解析。在尝试识别轨道类型时,我遇到了一个bug。MP4容器将此信息存储在hdlr盒中。在文档和库中,只有两个选项 'vide' 或 'soun',但在这种情况下,我得到了 'alis'
在调试库以查看如何获取此值时,我注意到解析器两次命中了 'hdlr':第一次为文件中唯一的视频轨道设置 'vide',第二次覆盖为 'alis'
我已经加载了视频到MP4 Explorer GUI应用程序,这是我看到的内容:

MP4容器解析:’别名数据处理程序’ 用于什么?

确实,那里有第二个hdlr盒,它在我尝试解析的其他MP4文件中不存在。我的问题是:

  1. 这个标记是什么用途?
  2. 它是在什么时候插入到MP4中的?
  3. 在解析时遇到alis时,我是否可以直接丢弃它?
英文:

I have an mp4 file which I am parsing with this demuxer lib. I stumbled upon a bug when trying to identify a track type. MP4 container keeps this info in hdlr box. In the docs and in the lib there are only two options 'vide' or 'soun',but in this case I am getting 'alis'.
While debugging the lib to see how I get this value I noticed that the parser hits 'hdlr' twice: first time setting 'vide' for the only video track in the file, and second time overwriting with 'alis'.
I have loaded the video into MP4 Explorer GUI app and here is what I see:

MP4容器解析:’别名数据处理程序’ 用于什么?

Indeed,there is second hdlr box there,which doesn't exist in other mp4 files I tried to parse. My questions are:

  1. What is this token for?
  2. When is it inserted into mp4?
  3. Can I just discard 'alis' when encountering one during the parsing?

答案1

得分: 1

(1) What is this token for?
alis原子用于列出外部资源/URL(例如:存储的文件)的文件别名(或快捷方式)。

(2) When is it inserted into mp4?
alis原子通常出现在QuickTime MOV文件中(尽管将其放入MP4不违法)。这个“文件别名”是QuickTime播放器可能会响应的(例如,在播放期间启动网页URL)。
这个答案也展示了一个包含了有关这个原子数据结构的指导

(3) Can I just discard alis when encountering one during the (miniMP4) parsing?
没有其他选择,miniMP4甚至没有代码来处理alis数据。
是的,你可以安全地跳过它。它对于播放不是必需的。

PS:
我想知道你的MP4文件是否可能是重命名的MOV文件?
(两种格式使用相同的结构,但有时会有MP4特定的内容)。

英文:

From some research...

(1) What is this token for?

The alis atom is for listing a file alias (or shortcut) to an external resource/URL (eg: a stored file).

(2) When is it inserted into mp4?

An alias atom is usually found in QuickTime MOV files (though it's not illegal to be placed inside an MP4). This "file alias" is something QuickTime player would have responded to (such as for example launching a web page URL during playback).

This other Answer shows a link with a guidance on the data structure of this atom.

(3) Can I just discard alis when encountering one during the (miniMP4) parsing?

There's no other choice, the miniMP4 library does not even have code for handling alis data.<br>
Yes you can safely skip it. It is not mandatory for playback.

PS: <br>
I wonder if your MP4 is possibly a renamed MOV file? <br>
(Both formats use same structure, but sometimes there is MP4-specific contents).

huangapple
  • 本文由 发表于 2023年2月6日 21:33:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/75361969.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定