Post on 01-Jan-2016
Company Confidential 12/21/2006
MP4/3GP/PSP file format
Company Confidential 22/21/2006
TopicsTopics
MP4 file Global Structure Various Box type introduction Detail Introduce Media Traks Box
3GP file introduction PSP file introduction
Company Confidential 32/21/2006
MP4 Global file StructureMP4 Global file Structure
I PTV MPEG4文件
moov
. . . otherboxes
trak(OD)
trak(BI FS)
trak(vi deo)
trak(audi o)
trak(vi deo hi nt)
trak(audi o hi nt)
I OD
f typ
mdat
I nterl eaved,t i me-ordered,BI FS, OD, vi deoand audi o accessuni ts, and hi nti nstructi ons
Company Confidential 42/21/2006
Object-Structured file formatObject-Structured file format
ISO base media file format---global container The basic objects in file is called BOX Box contain atoms
There’s lot’s kind of atoms,like trak atoms,mvhdr atoms Basically there’s 3 boxes in a MP4 file
1. ftyp box2. Moov box3. Mdat box
Company Confidential 52/21/2006
Moov Header/TraksMoov Header/Traks
Mvhd contains some global information for the file Creation time,mofification
time,timescale,duration,next_trak_id to allow new traks to be added or removed dynamically
Trak box has 2 functions contain media data (media tracks) contain packetization information for streaming protocols (hint tracks).
Company Confidential 62/21/2006
TraksTraks
Traks Describe a stream of Media Data OD---(iods)Optional BIFS---Optional Video tracks Audio tracks video hint tracks audio hint tracks
Company Confidential 72/21/2006
TraksTraks
Traks has following atoms Tkhd----Trak header,contains the trak ID and
informations about the trak Tref----reference to related traks Mdia---Media Box,contains information about the
media data
Company Confidential 82/21/2006
Tipical Media TraksTipical Media Traks
Company Confidential 92/21/2006
Mdhr boxMdhr box
Company Confidential 102/21/2006
Hdlr boxHdlr box
•declares the process by which the media-data in the track is presented•‘vide’ Video track•‘soun’ Audio track•‘hint’ Hint track
Company Confidential 112/21/2006
Minf boxMinf box
Vmhd:Video Media header Box Smhd:Sound Media header Box Hmhd:hint header box
Nmhd:Null Media Header Box,for media other tha Video and Audio
Company Confidential 122/21/2006
Minf Box--ContinuedMinf Box--Continued
Dinf Box---Defines the data URL,data reference Stbl Box---reference to Media Meta data has stts,ctts,stsd,stsz,stz2,stsc,stss boxes
Company Confidential 132/21/2006
stts Box Detailstts Box Detail
Stts---Time to sample box,defines every sample decoding time
DT(n+1) = DT(n) + STTS(n)
Company Confidential 142/21/2006
Ctts box detailCtts box detail
Ctts-provides the offset between decoding time and composition time.
CT(n) = DT(n) +CTTS(n)
Company Confidential 152/21/2006
Stsd box detailStsd box detail
Stsd The sample description table gives detailed information
about the coding type used, and any initialization information needed for that coding.
VisualSampleEntry:width/height,resolution etcAudioSampleEntry:sample size,sample rate etcContains mp4V and mp4A boxes,which contain esds box
which has decoder config information
Company Confidential 162/21/2006
Sample Size Boxes
Stsz contains the sample count and a table giving the
size in bytes of each sample.a entry_size of zero indicates that every sample has the sample_size
Company Confidential 172/21/2006
Mdat boxMdat box
Interleaved, time-ordered,BIFS, OD, video, and audio access units,to find the Audio/Video data to be decoded,use stbl/stsc box to get the data
Company Confidential 182/21/2006
3GP limitations to MP4 file format3GP limitations to MP4 file format
All 3GP file should have a “3GP” suffix name Ftyp box depending which profiles the 3GP files to
conforming to,the file type box should has Brand and compatible brands be set accordingly.
For example for a MPEG4 compatible 3GP file: Brand:3gp,3gp5 Compatible Brands:3gp5,3gp4, mp42, isom
Company Confidential 192/21/2006
3GP extentions to MP4 file format3GP extentions to MP4 file format
Streaming-server profile Branded ‘3gs6’ Add extention of RTP hint tracks to the file,defined in 3GPP TS
26.234 Progressive-download profile
branded ‘3gr6 ‘ the ‘moov’ box shall be placed right after the ‘ftyp’ box
in the beginning of the file; - all media tracks (if more than one) shall be
interleaved with an interleaving depth of one second or less.
Company Confidential 202/21/2006
3GP Codec3GP Codec
H.263 profile 0 Level 45 H.263 profile 3 Level 45 MPEG-4 Visual Simple Profile level Ob H.264(AVC)Baseline Profile Level 1b Enhanced aac Plus Extended AMR-WB MPEG-4 AAC Low Complexity (AAC-LC) MPEG4AACLongTermPrediction(AAC-LTP)
Company Confidential 212/21/2006
3GP Video Quality3GP Video Quality
QCIF ( 176x144 ) Mandatory SQCIF ( 128x96 ) Optional CIF ( 352x288 ) Optional
SQCIF ( 128x96 ) >=15FPS QCIF ( 176x144 ) >=10FPS CIF ( 352x288 ) >=3FPS
Company Confidential 222/21/2006
PSP file formatPSP file format
Ftyp box should have “MSNV” brand and compatible brand name
Added a UUID box which contain FPRF,VPRF,APRF,which contains codec_information,average/max frame rate,average/max bit rate,aspect ratio information
edts/stss is required Some other requiements such as time scale,fixed
vop rate etc,but seems not important
Company Confidential 232/21/2006
PSP codec limitationsPSP codec limitations
MPEG4 Simple Profile Support NTSC only,progressive encoding,only
support QVGA resolution Bitrate should not exceed 768Kbps
Company Confidential 242/21/2006
ReferencesReferences
ISO/IEC 14496-12:2004(E) ISO/IEC 14496-14:2003(E) 3GPP Standard 26244-6.3.0(2005.03) SONY PSP file/Memory Stick specification