280 likes | 748 Views
MP4/3GP/PSP file format. Topics. MP4 file Global Structure Various Box type introduction Detail Introduce Media Traks Box 3GP file introduction PSP file introduction. MP4 Global file Structure. Object-Structured file format. ISO base media file format---global container
E N D
MP4/3GP/PSP file format Company Confidential
Topics • MP4 file Global Structure • Various Box type introduction • Detail Introduce Media Traks Box • 3GP file introduction • PSP file introduction Company Confidential
MP4 Global file Structure Company Confidential
Object-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 • ftyp box • Moov box • Mdat box Company Confidential
Moov 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
Traks Traks Describe a stream of Media Data • OD---(iods)Optional • BIFS---Optional • Video tracks • Audio tracks • video hint tracks • audio hint tracks Company Confidential
Traks • 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
Tipical Media Traks Company Confidential
Mdhr box Company Confidential
Hdlr 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
Minf 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
Minf 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
stts Box Detail • Stts---Time to sample box,defines every sample decoding time DT(n+1) = DT(n) + STTS(n) Company Confidential
Ctts box detail • Ctts-provides the offset between decoding time and composition time. CT(n) = DT(n) +CTTS(n) Company Confidential
Stsd 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 etc AudioSampleEntry:sample size,sample rate etc Contains mp4V and mp4A boxes,which contain esds box which has decoder config information Company Confidential
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
Mdat 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
3GP 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
3GP 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
3GP 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
3GP Video Quality • QCIF(176x144) Mandatory • SQCIF (128x96) Optional • CIF(352x288) Optional • SQCIF(128x96) >=15FPS • QCIF(176x144) >=10FPS • CIF(352x288) >=3FPS Company Confidential
PSP 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
PSP codec limitations • MPEG4 Simple Profile • Support NTSC only,progressive encoding,only support QVGA resolution • Bitrate should not exceed 768Kbps Company Confidential
References • 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 Company Confidential