rfc3533oggWord文件下载.docx
《rfc3533oggWord文件下载.docx》由会员分享,可在线阅读,更多相关《rfc3533oggWord文件下载.docx(19页珍藏版)》请在冰豆网上搜索。
Thekeywords"
MUST"
"
MUSTNOT"
REQUIRED"
SHALL"
SHALLNOT"
"
SHOULD"
SHOULDNOT"
RECOMMENDED"
MAY"
and"
OPTIONAL"
inthis
documentaretobeinterpretedasdescribedinBCP14,RFC2119[2].
TableofContents
1.Introduction.........................2
2.Definitions.........................2
3.Requirementsforagenericencapsulationformat.......3
4.TheOggbitstreamformat...................3
5.Theencapsulationprocess..................6
6.TheOggpageformat.....................9
7.SecurityConsiderations...................11
8.References..........................12
A.Glossaryoftermsandabbreviations.............13
B.Acknowledgements.......................14
Author'
sAddress.......................14
FullCopyrightStatement...................15
PfeifferInformational[Page1]
RFC3533OGGMay2003
1.Introduction
TheOggbitstreamformathasbeendevelopedasapartofalarger
projectaimedatcreatingasetofcomponentsforthecodingand
decodingofmultimediacontent(codecs)whicharetobefreely
availableandfreelyre-implementable,bothinsoftwareandin
hardwareforthecomputingcommunityatlarge,includingtheInternet
community.ItistheintentionoftheOggdevelopersrepresentedby
Xiph.Orgthatitbeusablewithoutintellectualpropertyconcerns.
ThisdocumentdescribestheOggbitstreamformatandhowtouseitto
encapsulateoneorseveralmediabitstreamscreatedbyoneorseveral
encoders.TheOggtransportbitstreamisdesignedtoprovide
framing,errorprotectionandseekingstructureforhigher-level
codecstreamsthatconsistofraw,unencapsulateddatapackets,such
astheVorbisaudiocodecortheupcomingTarkinandTheoravideo
codecs.Itiscapableofinterleavingdifferentbinarymediaand
othertime-continuousdatastreamsthatarepreparedbyanencoderas
asequenceofdatapackets.Oggprovidesenoughinformationto
properlyseparatedatabackintosuchencodercreateddatapacketsat
theoriginalpacketboundarieswithoutrelyingondecodingtofind
packetboundaries.
PleasenotethattheMIMEtypeapplication/ogghasbeenregistered
withtheIANA[1].
2.Definitions
FordescribingtheOggencapsulationprocess,asetoftermswillbe
usedwhosemeaningneedstobewellunderstood.Therefore,someof
themostfundamentaltermsaredefinednowbeforewestartwiththe
descriptionoftherequirementsforagenericmediastream
encapsulationformat,theprocessofencapsulation,andtheconcrete
formatoftheOggbitstream.SeetheAppendixforamorecomplete
glossary.
TheresultofanOggencapsulationiscalledthe"
Physical(Ogg)
Bitstream"
.Itencapsulatesoneorseveralencoder-created
bitstreams,whicharecalled"
LogicalBitstreams"
.Alogical
bitstream,providedtotheOggencapsulationprocess,hasa
structure,i.e.,itissplitupintoasequenceofso-called
Packets"
.Thepacketsarecreatedbytheencoderofthatlogical
bitstreamandrepresentmeaningfulentitiesforthatencoderonly
(e.g.,anuncompressedstreammayusevideoframesaspackets).They
donotcontainboundaryinformation-strungtogethertheyappearto
bestreamsofrandombyteswithnolandmarks.
PfeifferInformational[Page2]
RFC3533OGGMay2003
Pleasenotethattheterm"
packet"
isnotusedinthisdocumentto
signifyentitiesfortransportoveranetwork.
3.Requirementsforagenericencapsulationformat
ThedesignideabehindOggwastoprovideageneric,linearmedia
transportformattoenablebothfile-basedstorageandstream-based
transmissionofoneorseveralinterleavedmediastreamsindependent
oftheencodingformatofthemediadata.Suchanencapsulation
formatneedstoprovide:
oframingforlogicalbitstreams.
ointerleavingofdifferentlogicalbitstreams.
odetectionofcorruption.
orecaptureafteraparsingerror.
opositionlandmarksfordirectrandomaccessofarbitrarypositions
inthebitstream.
ostreamingcapability(i.e.,noseekingisneededtobuilda100%
completebitstream).
osmalloverhead(i.e.,usenomorethanapproximately1-2%of
bitstreambandwidthforpacketboundarymarking,high-level
framing,syncandseeking).
osimplicitytoenablefastparsing.
osimpleconcatenationmechanismofseveralphysicalbitstreams.
Allofthesedesignconsiderationshavebeentakenintoconsideration
forOgg.Oggsupportsframingandinterleavingoflogical
bitstreams,seekinglandmarks,detectionofcorruption,andstream
resynchronisationafteraparsingerrorwithnomorethan
approximately1-2%overhead.Itisagenericframeworktoperform
encapsulationoftime-continuousbitstreams.Itdoesnotknowany
specificsaboutthecodecdatathatitencapsulatesandisthus
independentofanymediacodec.
4.TheOggbitstreamformat
AphysicalOggbitstreamconsistsofmultiplelogicalbitstreams
interleavedinso-called"
Pages"
.Wholepagesaretakeninorder
frommultiplelogicalbitstreamsmultiplexedatthepagelevel.The
logicalbitstreamsareidentifiedbyauniqueserialnumberinthe
PfeifferInformational[Page3]
headerofeachpageofthephysicalbitstream.Thisuniqueserial
numberiscreatedrandomlyanddoesnothaveanyconnectiontothe
contentorencoderofthelogicalbitstreamitrepresents.Pagesof
alllogicalbitstreamsareconcurrentlyinterleaved,buttheyneed
notbeinaregularorder-theyareonlyrequiredtobeconsecutive
withinthelogicalbitstream.Oggdemultiplexingreconstructsthe
originallogicalbitstreamsfromthephysicalbitstreambytakingthe
pagesinorderfromthephysicalbitstreamandredirectingtheminto
theappropriatelogicaldecodingentity.
EachOggpagecontainsonlyonetypeofdataasitbelongstoone
logicalbitstreamonly.Pagesareofvariablesizeandhaveapage
headercontainingencapsulationanderrorrecoveryinformation.Each
logicalbitstreaminaphysicalOggbitstreamstartswithaspecial
startpage(bos=beginningofstream)andendswithaspecialpage
(eos=endofstream).
Thebospagecontainsinformationtouniquelyidentifythecodectype
andMAYcontaininformationtosetupthedecodingprocess.Thebos
pageSHOULDalsocontaininformationabouttheencodedmedia-for
example,foraudio,itshouldcontainthesamplerateandnumberof
channels.Byconvention,thefirstbytesofthebospagecontain
magicdatathatuniquelyidentifiestherequiredcodec.Itisthe
responsibilityofanyonefieldinganewcodectomakesureitis
possibletoreliablydistinguishhis/hercodecfromallothercodecs
inuse.Thereisnofixedwaytodetecttheendofthecodec-
identifyingmarker.Theformatofthebospageisdependentonthe
codecandthereforeMUSTbegivenintheencapsulationspecification
ofthatlogicalbitstreamtype.Oggalsoallowsbutdoesnotrequire
secondaryheaderpacketsafterthebospageforlogicalbitstreams
andthesemustalsoprecedeanydatapacketsinanylogical
bitstream.Thesesubsequentheaderpacketsareframedintoan
integralnumberofpages,whichwillnotcontainanydatapackets.
So,aphysicalbitstreambeginswiththebospagesofalllogical
bitstreamscontainingoneinitialheaderpacketperpage,followedby
thesubsidiaryheaderpacketsofallstreams,followedbypages
containingdatapackets.
Theencapsulationspecificationforoneormorelogicalbitstreamsis
calleda"
mediamapping"
.Anexampleforamediamappingis"
Ogg
Vorbis"
whichusestheOggframeworktoencapsulateVorbis-encoded
audiodataforstream-basedstorage(suchasfiles)andtransport
(suchasTCPstreamsorpipes).OggVorbisprovidesthenameand
revisionoftheVorbiscodec,theaudiorateandtheaudioqualityon
theOggVorbisbospage.Italsousestwoadditionalheaderpages
perlogicalbitstream.TheOggVorbisbospagestartswiththebyte
0x01,followedby"
vorbis"
(atotalof7bytesofidentifier).
PfeifferInformational[Page4]
Oggknowstwotypesofmultiplexing:
concurrentmultiplexing(so-
called"
Grouping"
)andsequentialmultiplexing(so-called
Chaining"
).Groupingdefineshowtointerleaveseverallogical
bitstreamspage-wiseinthesamephysicalbitstream.Groupingisfor
exampleneededforinterleavingavideostreamwithseveral
synchronisedaudiotracksusingdifferentcodecsindifferentlogical
bitstreams.Chainingontheotherhand,isdefinedtoprovidea
simplemechanismtoconcatenatephysicalOggbitstreams,asisoften
neededforstreamingapplications.
Ingrouping,allbospagesofalllogicalbitstreamsMUSTappear
togetheratthebeginningoftheOggbitstream.Themediamapping
specifi