最大 MP4 H264 Header 尺寸
Max MP4 H264 Header Size
我有一个需求,将一个 MP4 容器的 H264 视频编码文件切割成 header 部分和内容部分。
我不想详述 header 的细节,而是想拆分具有最大 MP4 视频 header 限制的文件。
有没有这样的限制?从文件中拆分初始 2/4 MB 是否会完全保留 header?
要求是,如果文件的内容部分可以访问,则不应重新创建视频。将文件拆分为 header 和内容会有帮助吗?
根据 MP4 File Format Specification,实际上没有 Header 大小限制。
有些电影原子是可变大小的,所以你不能设置限制。
"User Data Atoms" 例如可以扩展 header 大小。
The user data atom has an atom type of 'udta'. Inside the user data atom is a list of atoms describing each piece of user data. User data provides a simple way to extend the information stored in a QuickTime movie. For example, user data atoms can store a movie’s window position, playback characteristics, or creation information.
原子内原子内原子的结构...也意味着实际上没有限制。
我认为限制可能是 4GB,但是...
根据以下引用,Atom 大小甚至可以大于 2^32 字节:
Atom size
A 32-bit integer that indicates the size of the atom, including both the atom header and the atom’s contents, including any contained atoms. Normally, the size field contains the actual size of the atom, in bytes, expressed as a 32-bit unsigned integer. However, the size field can contain special values that indicate an alternate method of determining the atom size. (These special values are normally used only for media data ('mdat') atoms.)
Two special values are valid for the size field:
0, which is allowed only for a top-level atom, designates the last atom in the file and indicates that the atom extends to the end of the file.
1, which means that the actual size is given in the extended size field, an optional 64-bit field that follows the type field.
This accommodates media data atoms that contain more than 2^32 bytes.
我认为你最好从 MP4 容器中提取基本流:
Extracting MPEG-4 Elementary Stream from MP4 Container(我不确定链接示例是否真的有效)。
我有一个需求,将一个 MP4 容器的 H264 视频编码文件切割成 header 部分和内容部分。
我不想详述 header 的细节,而是想拆分具有最大 MP4 视频 header 限制的文件。
有没有这样的限制?从文件中拆分初始 2/4 MB 是否会完全保留 header?
要求是,如果文件的内容部分可以访问,则不应重新创建视频。将文件拆分为 header 和内容会有帮助吗?
根据 MP4 File Format Specification,实际上没有 Header 大小限制。
有些电影原子是可变大小的,所以你不能设置限制。
"User Data Atoms" 例如可以扩展 header 大小。
The user data atom has an atom type of 'udta'. Inside the user data atom is a list of atoms describing each piece of user data. User data provides a simple way to extend the information stored in a QuickTime movie. For example, user data atoms can store a movie’s window position, playback characteristics, or creation information.
原子内原子内原子的结构...也意味着实际上没有限制。
我认为限制可能是 4GB,但是... 根据以下引用,Atom 大小甚至可以大于 2^32 字节:
Atom size A 32-bit integer that indicates the size of the atom, including both the atom header and the atom’s contents, including any contained atoms. Normally, the size field contains the actual size of the atom, in bytes, expressed as a 32-bit unsigned integer. However, the size field can contain special values that indicate an alternate method of determining the atom size. (These special values are normally used only for media data ('mdat') atoms.) Two special values are valid for the size field: 0, which is allowed only for a top-level atom, designates the last atom in the file and indicates that the atom extends to the end of the file. 1, which means that the actual size is given in the extended size field, an optional 64-bit field that follows the type field. This accommodates media data atoms that contain more than 2^32 bytes.
我认为你最好从 MP4 容器中提取基本流:
Extracting MPEG-4 Elementary Stream from MP4 Container(我不确定链接示例是否真的有效)。