1 Summary
MPEG-4 Part 14 or MP4 file format, formally ISO/IEC 14496-14:2003, is a multimedia container format standard specified as a part of MPEG-4. It is most commonly used to store digital video and digital audio streams, especially those defined by MPEG, but can also be used to store other data such as subtitles and still images. Like most modern container formats, MPEG-4 Part 14 allows streaming over the Internet. A separate hint track is used to include streaming information in the file. The official filename extension for MPEG-4 Part 14 files is .mp4, thus the container format is often referred to simply as MP4.
Note:MPEG-4 Part 14 -- MP4 file format(formally ISO/IEC 14496-14:2003) is a container format;MPEG-4 Part 2 -- MPEG-4 Visual (formally ISO/IEC 14496-2) is a video compression technology developed by MPEG.
1.1 Relative file extension
- (a)MPEG-4 files with audio and video generally use the standard .mp4 extension.
- (b)Audio-only MPEG-4 files generally have a .m4a extension. This is especially true of non-protected content.
- (c)MPEG-4 files with audio streams encrypted by FairPlay Digital Rights Management as sold through the iTunes Store use the .m4p extension. iTunes Plus tracks are unencrypted and use .m4aaccordingly.
- (d)Audio book and podcast files, which also contain metadata including chapter markers, images, and hyperlinks, can use the extension .m4a, but more commonly use the .m4b extension. An .m4a audio file cannot "bookmark" (remember the last listening spot), whereas .m4b extension files can.
- (e)The Apple iPhone uses MPEG-4 audio for its ringtones but uses the .m4r extension rather than the .m4a extension.
- Raw MPEG-4 Visual bitstreams are named .m4v but this extension is also sometimes used for video in MP4 container format.[19]
- (f)Mobile phones use 3GP, an implementation of MPEG-4 Part 12 (a.k.a MPEG-4/JPEG2000 ISO Base Media file format), similar to MP4. It uses .3gp and .3g2 extensions. These files also store non-MPEG-4 data (H.263, AMR, TX3G).
The common but non-standard use of the extensions .m4a and .m4v is due to the popularity of Apple’s iPod, iPhone, and iTunes Store.
1.2 Common-used data stream
Almost any kind of data can be embedded in MPEG-4 Part 14 files through private streams. The registered codecs for MPEG-4 Part 12-based files are published on the website of MP4 Registration authority (mp4ra.org),[20] but most of them are not widely supported by MP4 players. The widely-supported codecs and additional data streams are:[citation needed]
- Video: MPEG-4 Part 10 (also known as H.264/MPEG-4 AVC), MPEG-4 Part 2, (other compression formats are less used: MPEG-2, MPEG-1).
- Audio: Advanced Audio Coding (AAC - MPEG-4 Part 3 Subpart 4), (other compression formats are less used: MPEG-1 Audio Layer III (MP3), Apple Lossless, MPEG-4 Part 3 Audio Object Types: Audio Lossless Coding (ALS), Scalable Lossless Coding (SLS), MPEG-1 Audio Layer II (MP2), MPEG-1 Audio Layer I (MP1), CELP, HVXC (speech), TwinVQ (very low bitrates), Text To Speech Interface (TTSI),SAOL (MIDI) and others.
- Subtitles: MPEG-4 Timed Text (also known as 3GPP Timed Text). Some private stream examples includeNero's use of DVD subtitles (Vobsub) in MP4 files.
2 MPEG4文件结构
MP4文件中包含与媒体数据时间序列相关的时间、结构、媒体信息。MP4文件主要包括三个部分:场景描述符流(BIFS)(Binary Format for Scenes)、对象描述符OD(Object Descriptor)、流和流映射表(基本流ID或URL与物理位置间的映射)。
MP4文件游atom组合和嵌套而成,比如movie atom 包含track atom,track atom包含media atom。The lowest level is leaf atom,which contains non-atom data.The atom layout is(An MPEG-4 file is made of a number of discrete units called atoms (well, they were called atoms in the first version of the specification, now they are prosaically called 'boxes').):
Atom size:A 32-bits interger that indicates the size of atom,including both the autom header and the contents,including any contained atoms.Normally,the size field contains the actual size in bytes;However, the size field can contain special values to indicates an alterlate method of determining the atom size.If the size field is set to 0,which allowed only for a top level atom,this is the last atom of the file and it extends to the last of the file.If it is set to 1,then the actual size is given in the extended size field ,an 64-bits field that follow the type field.
Type:A 32-bits interger that contains the type of the atom.This can often be usefully treated as a four-character field with a mnemonic value,such as ‘moov’(0x6D6F6F76)for a movie atom,or ‘track’(0x74726168)for a track atom.Knowing an atoms’s type allows you to interpret it’s data.An atom’s data can be arranged as any arbitrary collection of fields,tables,or other atom.If your application encounters a atom of an unknown type,it should not attempt to inerpret the atom’s data.Use the atom’s size to skip it.
2.1 Common used atom(box)
所有atom的大体布局如下:
2.1.1 Movie atom(box)
Movie atom 通常包含一个Movie Header atom(mvhd),定义整个movie的time scale和duration;包含至少一个track atom;另外还存在一些可选的atom,如下图所示:
2.1.2 Movie header atom
定义整个movie的time scale和duration.
Layout如下所示:
2.1.3 Track Atom
Atom define a single track of movie.A movie consist of on or more tracks.At least one media track.
2.1.4 Track header atom
2.1.5 Media atom
Media atom describe and define a track’s media type and sample data.The media atom contains information that specify the media type,such as audio or video;the time scale,the track duration,and so on.
2.1.6 Media header atom
2.1.7 Media information atom
Including Video information atom and sound information atom.
2.2 An example
下面这个工具的下载地址:http://blog.chinaunix.net/u2/61880/showart_1101088.html
References:
http://en.wikipedia.org/wiki/MPEG-4_Part_2
http://en.wikipedia.org/wiki/MPEG-4_Part_14
http://www.digitalpreservation.gov/formats/fdd/fdd000155.shtml
ISO_IEC_14496-14-2003.pdf
qtff-2001.pdf(most important)
流媒体MP4文件的核心技术综述.pdf
相关推荐
MP4文件格式标准,详细介绍MP4文件格式的内容以及信息
MP4文件格式详细解析 MP4文件格式是一种开放的容器格式,基于QuickTime容器格式定义的,用于封装多种媒体数据。ISO/IEC 14496-12规定了MP4文件格式的标准。MP4文件格式由多个box组成,每个box都有类型和长度,可以...
### MP4文件格式详细分析 #### 综述与引言 MP4文件格式是一种广泛应用于数字媒体领域的标准格式,尤其适用于视频、音频等多媒体数据的存储与传输。本篇文章将深入探讨MP4文件格式的核心概念及其独特的物理和时间...
总的来说,MP4文件格式提供了一种灵活且高效的媒体存储方案,允许不同类型的媒体数据在同一文件中混合,并支持流媒体和网络传输的需求。其核心概念如track、sample、chunk和box等,共同构成了一个复杂但有序的多媒体...
### MP4文件格式详析 #### 一、MP4文件格式概述 MP4是一种非常流行的多媒体容器格式,广泛用于存储视频、音频以及其他媒体数据。它由国际标准化组织(ISO)和国际电工委员会(IEC)联合制定,是MPEG-4 Part 14的一...
MP4文件格式是一种广泛用于存储音频、视频和字幕数据的数字媒体容器。它基于ISO基础媒体文件格式,是MPEG-4 Part 14的简称。MP4info是一款实用的工具,专为分析和理解MP4文件的内部结构而设计。通过这款工具,用户...
MP4文件格式是一种广泛使用的数字媒体容器格式,用于存储音频、视频和其他相关数据。这个格式的设计目的是为了高效地编码和组织多媒体内容,同时允许不同类型的媒体数据以灵活的方式结合在一起。以下是对MP4文件格式...
### MP4 文件格式解析——Box 说明 #### 概述 MP4 文件格式是一个高度灵活且功能丰富的多媒体容器格式,其设计目标是为了更好地管理和传输多种类型的媒体数据,如音频、视频和其他元数据。MP4 格式的规范由 ISO/...
### MP4文件格式详解 #### 一、概述 MP4文件格式作为一种先进的多媒体容器格式,在当前数字媒体领域占据着重要地位。它不仅被广泛应用于个人娱乐设备,还深入到了流媒体传输、移动通信等多个领域。MP4文件格式的...
海康录像机mp4文件格式转换工具。可以把海康格式的mp4文件转换为avi文件,在普通的播放机上播放。
MP4文件格式中文详解,MP4文件中的所有数据都装在box,也就是说MP4文件由若干个box组成,每个box有类型和长度,可以将box理解为一个数据对象块。