英文:
MP4 container parsing: What is 'Alias Data Handler' for?
问题
我有一个MP4文件,正在使用此解复用库进行解析。在尝试识别轨道类型时,我遇到了一个bug。MP4容器将此信息存储在hdlr
盒中。在文档和库中,只有两个选项 'vide'
或 'soun'
,但在这种情况下,我得到了 'alis'
。
在调试库以查看如何获取此值时,我注意到解析器两次命中了 'hdlr'
:第一次为文件中唯一的视频轨道设置 'vide'
,第二次覆盖为 'alis'
。
我已经加载了视频到MP4 Explorer GUI应用程序,这是我看到的内容:
确实,那里有第二个hdlr
盒,它在我尝试解析的其他MP4文件中不存在。我的问题是:
- 这个标记是什么用途?
- 它是在什么时候插入到MP4中的?
- 在解析时遇到
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:
Indeed,there is second hdlr box there,which doesn't exist in other mp4 files I tried to parse. My questions are:
- What is this token for?
- When is it inserted into mp4?
- 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).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论