Common File Format & Media Formats Specification Version 2.1

Preview:

Citation preview

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |1

CommonFileFormat&MediaFormatsSpecificationVersion2.120February2015

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |2

Notice:Asofthedateofpublication,thisdocumentisareleasecandidatespecificationsubjecttoDECEMemberreviewandfinaladoptionbyvoteoftheManagementCommitteeofDECEinaccordancewiththeDECELLCOperatingAgreement.Unlessthereisnoticetothecontrary,thisspecificationwillbecomeanadopted“EcosystemSpecification”on12April2015.THISDOCUMENTISPROVIDED"ASIS"WITHNOWARRANTIESWHATSOEVER,INCLUDINGANYWARRANTYOFMERCHANTABILITY,NONINFRINGEMENT,FITNESSFORANYPARTICULARPURPOSE,ORANYWARRANTYOTHERWISEARISINGOUTOFANYPROPOSAL,SPECIFICATIONORSAMPLE.DigitalEntertainmentContentEcosystem(DECE)LLC(“DECE”)anditsmembersdisclaimallliability,includingliabilityforinfringementofanyproprietaryrights,relatingtouseofinformationinthisspecification.Nolicense,expressorimplied,byestoppelorotherwise,toanyintellectualpropertyrightsisgrantedherein.Thisdocumentissubjecttochangeunderapplicablelicenseprovisions,ifany.Copyright©2009‐2015byDECE.Third‐partybrandsandnamesarethepropertyoftheirrespectiveowners.OptionalImplementationAgreement:InadditiontotheUltraVioletLicenseAgreementswhichcoverimplementationoftheDECEEcosystemSpecificationswithintheUltraVioletEcosystem,DECEoffersanoptionallicenseagreementrelatingtotheimplementationofthisdocumentoutsidetheEcosystem(“RANDAgreement”).EntitiesexecutingtheoptionalRANDAgreementreceivethebenefitofthecommitmentsmadebyDECE’smemberstolicenseonreasonableandnondiscriminatorytermstheirpatentclaimsnecessarytotheimplementationofthisdocumentinexchangeforacomparablepatentlicensingcommitment.CopiesofthelicenseagreementsareavailableattheDECEwebsitereferencedbelow.ContactInformation:Licensingandcontractinquiriesandrequestsshouldbeaddressedtousat:http://www.uvvu.com/uv‐for‐business

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |3

Contents 1 Introduction..................................................................................................................................................................................12

1.1 Scope......................................................................................................................................................................121.2 DocumentOrganization.................................................................................................................................121.3 DocumentNotationandConventions......................................................................................................121.4 NormativeReferences....................................................................................................................................131.4.1 DECEReferences.........................................................................................................................................................131.4.2 ExternalReferences...................................................................................................................................................13

1.5 InformativeReferences..................................................................................................................................151.6 Terms,Definitions,andAcronyms............................................................................................................161.7 Architecture(Informative)...........................................................................................................................191.7.1 MediaLayers.................................................................................................................................................................191.7.2 CommonFileFormat.................................................................................................................................................201.7.3 TrackEncryptionandDRMsupport...................................................................................................................201.7.4 VideoElementaryStreams......................................................................................................................................211.7.5 AudioElementaryStreams.....................................................................................................................................211.7.6 SubtitleElementaryStreams..................................................................................................................................211.7.7 MediaProfilesandDeliveryTargets...................................................................................................................21

2 TheCommonFileFormat........................................................................................................................................................232.1 CommonFileFormat......................................................................................................................................232.1.1 DigitalCFFContainerStructure............................................................................................................................262.1.2 DCCHeader....................................................................................................................................................................272.1.3 DCCMovieFragment.................................................................................................................................................302.1.4 DCCFooter.....................................................................................................................................................................32

2.2 ExtensionstoISOBaseMediaFileFormat............................................................................................342.2.1 StandardsandConventions....................................................................................................................................342.2.2 ContentInformationBox(‘coin’)...................................................................................................................352.2.3 AVCNALUnitStorageBox(‘avcn’)................................................................................................................372.2.4 SampleEncryptionBox(‘senc’)......................................................................................................................382.2.5 TrickPlayBox(‘trik’).........................................................................................................................................392.2.6 ClearSampleswithinanEncryptedTrack........................................................................................................412.2.7 StoringSampleAuxiliaryInformationinaSampleEncryptionBox......................................................41

2.3 ConstraintsonISOBaseMediaFileFormatBoxes.............................................................................422.3.1 FileTypeBox(‘ftyp’)...........................................................................................................................................422.3.2 MovieHeaderBox(‘mvhd’).................................................................................................................................422.3.3 HandlerReferenceBox(‘hdlr’)forCommonFileMetadata...............................................................432.3.4 XMLBox(‘xml’)forCommonFileMetadata...............................................................................................432.3.5 TrackHeaderBox(‘tkhd’)..................................................................................................................................432.3.6 MediaHeaderBox(‘mdhd’).................................................................................................................................442.3.7 VideoMediaHeader(‘vmhd’).............................................................................................................................442.3.8 SoundMediaHeader(‘smhd’)............................................................................................................................442.3.9 SubtitleMediaHeaderBox(‘sthd’)......................................................................................................................45

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |4

2.3.10 DataReferenceBox(‘dref’).........................................................................................................................452.3.11 SampleDescriptionBox(‘stsd’)................................................................................................................452.3.12 ProtectionSchemeInformationBox(‘sinf’)........................................................................................452.3.13 DecodingTimetoSampleBox(‘stts’)....................................................................................................452.3.14 SampletoChunkBox(‘stsc’)......................................................................................................................452.3.15 SampleSizeBoxes(‘stsz’or‘stz2’)...................................................................................................462.3.16 ChunkOffsetBox(‘stco’)..............................................................................................................................462.3.17 TrackExtendsBox(‘trex’)...........................................................................................................................462.3.18 MovieFragmentHeaderBox(‘mfhd’)......................................................................................................462.3.19 TrackFragmentHeaderBox(‘tfhd’).......................................................................................................472.3.20 TrackFragmentRunBox(‘trun’)..............................................................................................................472.3.21 SegmentIndexBox(‘sidx’)..........................................................................................................................472.3.22 MediaDataBox(‘mdat’).................................................................................................................................472.3.23 TrackFragmentRandomAccessBox(‘tfra’)......................................................................................47

2.4 Inter‐trackSynchronization.........................................................................................................................482.4.1 Mappingmediatimelinetopresentationtimeline........................................................................................482.4.2 Adjustingaudiosyncframeboundarymisalignments................................................................................48

3 EncryptionofTrackLevelData.............................................................................................................................................493.1 MultipleDRMSupport(Informative).......................................................................................................493.2 TrackEncryption..............................................................................................................................................50

4 VideoElementaryStreams......................................................................................................................................................514.1 Introduction........................................................................................................................................................514.2 DataStructureforVideoTrack...................................................................................................................514.2.1 TrackHeaderBox(‘tkhd’)..................................................................................................................................514.2.2 SampleDescriptionBox(‘stsd’).....................................................................................................................514.2.3 TrackFragmentRunBox(‘trun’)...................................................................................................................524.2.4 MovieFragmentBox(‘moof’)............................................................................................................................524.2.5 AccessUnit.....................................................................................................................................................................524.2.6 RandomAccessPoints..............................................................................................................................................53

4.3 AVC.........................................................................................................................................................................534.3.1 StorageofAVCElementaryStreams...................................................................................................................534.3.2 Constraintson[H264]ElementaryStreams....................................................................................................54

4.4 HEVC......................................................................................................................................................................564.4.1 StorageofHEVCElementaryStreams................................................................................................................564.4.2 Constraintson[H265]ElementaryStreams....................................................................................................57

4.5 Sub‐samplingandCropping.........................................................................................................................594.5.1 Sub‐sampling................................................................................................................................................................594.5.2 CroppingtoActivePictureArea............................................................................................................................604.5.3 RelationshipofCroppingandSub‐sampling...................................................................................................614.5.4 DynamicSub‐sampling.............................................................................................................................................64

5 AudioElementaryStreams.....................................................................................................................................................665.1 Introduction........................................................................................................................................................66

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |5

5.2 DataStructureforAudioTrack..................................................................................................................665.2.1 TrackHeaderBox(‘tkhd’)..................................................................................................................................665.2.2 MovieFragmentBox(‘moof’)............................................................................................................................665.2.3 SyncSampleBox(‘stss’)....................................................................................................................................665.2.4 HandlerReferenceBox(‘hdlr’).......................................................................................................................675.2.5 SoundMediaHeaderBox(‘smhd’)...................................................................................................................675.2.6 SampleDescriptionBox(‘stsd’).....................................................................................................................675.2.7 SharedelementsofAudioSampleEntry......................................................................................................68

5.3 MPEG‐4AACFormats.....................................................................................................................................685.3.1 GeneralConsiderationforEncoding...................................................................................................................685.3.2 MPEG‐4AACLC[2‐Channel]..................................................................................................................................695.3.3 MPEG‐4HEAACV2[5.1,7.1‐Channel]...............................................................................................................715.3.4 MPEG‐4HEAACv2.....................................................................................................................................................755.3.5 MPEG‐4HEAACv2withMPEGSurround........................................................................................................77

5.4 MPEG‐H3DAudioFormat............................................................................................................................795.4.1 StorageofMPEG‐H3DAudioElementaryStreams......................................................................................795.4.2 MPEG‐H3DAudioElementaryStreamConstraints.....................................................................................79

5.5 AC‐3,EnhancedAC‐3,MLP,AC‐4andDTSFormatTimingStructure........................................805.6 DolbyFormats...................................................................................................................................................805.6.1 AC‐3(DolbyDigital)...................................................................................................................................................805.6.2 EnhancedAC‐3(DolbyDigitalPlus)....................................................................................................................825.6.3 MLP(DolbyTrueHD).................................................................................................................................................865.6.4 AC‐4...................................................................................................................................................................................88

5.7 DTSFormats.......................................................................................................................................................895.7.1 StorageofDTSelementarystreams....................................................................................................................895.7.2 RestrictionsonDTSFormats..................................................................................................................................94

6 SubtitleElementaryStreams.................................................................................................................................................966.1 Overview..............................................................................................................................................................966.2 CFF‐TTFormat..................................................................................................................................................976.2.1 Definition........................................................................................................................................................................976.2.2 CFF‐TTTextEncoding...............................................................................................................................................976.2.3 CFFTimedTextProfiles...........................................................................................................................................976.2.4 CFF‐TTCoordinatePlane......................................................................................................................................1066.2.5 CFF‐TTExternalTimeInterval...........................................................................................................................108

6.3 CFF‐TTSubtitleEventandVideoFrameSynchronization...........................................................1086.4 CFF‐TTEncodedImageFormat...............................................................................................................1086.5 CFF‐TTStructure...........................................................................................................................................1086.5.1 TrackFormat.............................................................................................................................................................1086.5.2 SampleFormat..........................................................................................................................................................109

6.6 CFF‐TTHypotheticalRenderModel......................................................................................................1106.6.1 FunctionalModel......................................................................................................................................................1116.6.2 TimingModel.............................................................................................................................................................112

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |6

6.6.3 ImageSubtitles..........................................................................................................................................................1166.6.4 TextSubtitles.............................................................................................................................................................1176.6.5 Constraints..................................................................................................................................................................120

6.7 DataStructureforCFF‐TTTrack............................................................................................................1206.7.1 Introduction...............................................................................................................................................................1206.7.2 TrackHeaderBox(‘tkhd’)...............................................................................................................................1206.7.3 MovieFragmentBox(‘moof’).........................................................................................................................1216.7.4 MediaHeaderBox(‘mdhd’)..............................................................................................................................1216.7.5 HandlerReferenceBox(‘hdlr’)....................................................................................................................1216.7.6 SubtitleMediaHeaderBox(‘sthd’).............................................................................................................1216.7.7 SampleDescriptionBox(‘stsd’)..................................................................................................................1226.7.8 Sub‐SampleInformationBox(‘subs’)........................................................................................................1226.7.9 TrackFragmentRunBox(‘trun’)................................................................................................................1226.7.10 TrackFragmentRandomAccessBox(‘tfra’)...................................................................................122

6.8 SignalingforCFF‐TTTracks......................................................................................................................1226.8.1 TextSubtitleTracks................................................................................................................................................1226.8.2 ImageSubtitleTracks.............................................................................................................................................1236.8.3 CombinedSubtitleTracks....................................................................................................................................123

6.9 SubtitleLanguageConsiderations..........................................................................................................1236.9.1 Overview......................................................................................................................................................................1236.9.2 RecommendedUnicodeCodePointsperSubtitleLanguage.................................................................1246.9.3 ReferenceFontFamilyperSubtitleLanguage.............................................................................................1276.9.4 TypicalSubtitlePracticeperRegion(Informative)...................................................................................127

6.10 ClosedCaptionSubtitlesTranscodedfromCEA608orCEA708..............................................129AnnexA. CFFParameters.........................................................................................................................................................130AnnexB. MediaProfiles............................................................................................................................................................131B.1. PDMediaProfile............................................................................................................................................131B.1.1. Overview................................................................................................................................................................131B.1.2. ConstraintsonEncryption..............................................................................................................................131B.1.3. ConstraintsonVideo.........................................................................................................................................131B.1.4. ConstraintsonAudio.........................................................................................................................................132B.1.5. ConstraintsonSubtitles...................................................................................................................................132

B.2. SDMediaProfile.............................................................................................................................................134B.2.1. Overview................................................................................................................................................................134B.2.2. ConstraintsonEncryption..............................................................................................................................134B.2.3. ConstraintsonVideo.........................................................................................................................................134B.2.4. ConstraintsonAudio.........................................................................................................................................135B.2.5. ConstraintsonSubtitles...................................................................................................................................136

B.3. HDMediaProfile............................................................................................................................................138B.3.1. Overview................................................................................................................................................................138B.3.2. ConstraintsonEncryption..............................................................................................................................138B.3.3. ConstraintsonVideo.........................................................................................................................................138B.3.4. ConstraintsonAudio.........................................................................................................................................139

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |7

B.3.5. ConstraintsonSubtitles...................................................................................................................................139B.4. xHDMediaProfile.........................................................................................................................................140B.4.1. Overview................................................................................................................................................................140B.4.2. ConstraintsonEncryption..............................................................................................................................140B.4.3. ConstraintsonVideo.........................................................................................................................................140B.4.4. ConstraintsonAudio.........................................................................................................................................141B.4.5. ConstraintsonSubtitles...................................................................................................................................141

B.5. UHDMediaProfile.........................................................................................................................................142B.5.1. Overview................................................................................................................................................................142B.5.2. ConstraintsonEncryption..............................................................................................................................142B.5.3. ConstraintsonVideo.........................................................................................................................................142B.5.4. ConstraintsonAudio.........................................................................................................................................143B.5.5. ConstraintsonSubtitles...................................................................................................................................143

B.6. HDR10MediaProfileDefinition..............................................................................................................145B.6.1. Overview................................................................................................................................................................145B.6.2. ConstraintsonEncryption..............................................................................................................................145B.6.3. ConstraintsonVideo.........................................................................................................................................145

B.7. DolbyVision(“DV”)ProfileDefinition..................................................................................................146B.7.1. Overview................................................................................................................................................................146B.7.2. ConstraintsonEncryption..............................................................................................................................146B.7.3. ConstraintsonVideo.........................................................................................................................................146

B.8. HDR12MediaProfileDefinition..............................................................................................................148B.8.1. Overview................................................................................................................................................................148B.8.2. ConstraintsonEncryption..............................................................................................................................148B.8.3. ConstraintsonVideo.........................................................................................................................................148

AnnexC. DeliveryTargets.......................................................................................................................................................150C.1. GeneralDownloadDeliveryTargetConstraints...............................................................................150C.1.1. ConstraintsonFileStructure.........................................................................................................................150C.1.2. ConstraintsonVideo.........................................................................................................................................150

C.2. Multi‐TrackDownloadDeliveryTarget...............................................................................................152C.2.1. Overview................................................................................................................................................................152C.2.2. ConstraintsonFileStructure.........................................................................................................................152C.2.3. ConstraintsonEncryption..............................................................................................................................152C.2.4. ConstraintsonVideo.........................................................................................................................................153C.2.5. ConstraintsonAudio.........................................................................................................................................159C.2.6. ConstraintsonSubtitles...................................................................................................................................159

C.3. Single‐TrackDownloadDeliveryTarget..............................................................................................161C.3.1. Overview................................................................................................................................................................161C.3.2. ConstraintsonFileStructure.........................................................................................................................161C.3.3. ConstraintsonEncryption..............................................................................................................................161C.3.4. ConstraintsonVideo.........................................................................................................................................161C.3.5. ConstraintsonAudio.........................................................................................................................................161C.3.6. ConstraintsonSubtitles...................................................................................................................................162

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |8

C.4. Pre‐PackagedDeliveryTarget.................................................................................................................163C.4.1. Overview................................................................................................................................................................163C.4.2. ConstraintsonFileStructure.........................................................................................................................163C.4.3. ConstraintsonVideo.........................................................................................................................................163

C.5. StreamingDeliveryTarget.........................................................................................................................164C.5.1. Overview................................................................................................................................................................164C.5.2. ConstraintsonFileStructure.........................................................................................................................164C.5.3. ConstraintsonEncryption..............................................................................................................................164C.5.4. ConstraintsonVideo.........................................................................................................................................164C.5.5. ConstraintsonAudio.........................................................................................................................................165C.5.6. ConstraintsonSubtitles...................................................................................................................................165C.5.7. ConstraintsonAdaptationSets.....................................................................................................................166

AnnexD. InternetMediaTypeTemplateandParameters.........................................................................................168AnnexE. TheDECEFileFormat............................................................................................................................................169E.1. DECEFileFormat..........................................................................................................................................169E.1.1. ExtensionstotheCommonFileFormat..........................................................................................................169E.1.2. ConstraintsonISOBaseMediaFileFormatBoxes.....................................................................................171E.1.3. Constraintson‘ccff’Boxes............................................................................................................................171

E.2. MediaProfiles.................................................................................................................................................171E.3. DeliveryTargets.............................................................................................................................................171E.3.1. Multi‐TrackDownloadDeliveryTarget..........................................................................................................172

E.4. InternetMediaTypeTemplateandParameters..............................................................................172E.5. FileExtensions................................................................................................................................................172E.6. DECEInteroperabilityPoints...................................................................................................................172

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |9

Tables Table2‐1‐BoxstructureoftheCommonFileFormat(CFF)..............................................................................................24Table2‐2–Additional‘stsd’Detail:ProtectedSampleEntryBoxstructure........................................................26Table2‐3–TrackIDAssignment....................................................................................................................................................30Table4‐1–AccessUnitstructureforpictures..........................................................................................................................52Table4‐2–ExampleSub‐sampleandCroppingValuesforFigure41‐...........................................................................62Table4‐3–ExampleSub‐sampleandCroppingValuesforFigure43‐...........................................................................63Table5‐1–DefinedAudioFormats...............................................................................................................................................67Table5‐2–bit_rate_code....................................................................................................................................................................81Table5‐3–chan_locfieldbitassignments..................................................................................................................................84Table5‐4–StreamConstruction.....................................................................................................................................................92Table5‐5–CoreLayout.......................................................................................................................................................................93Table5‐6–RepresentationType.....................................................................................................................................................93Table5‐7–ChannelLayout................................................................................................................................................................93Table5‐8‐ChannelLayoutExt..........................................................................................................................................................94Table6‐1–CFFGeneralTTMLFeatureRestrictions...........................................................................................................100Table6‐2–CFFGeneralTTMLElementRestrictions.........................................................................................................102Table6‐3–GeneralTTMLAttributeRestrictions.................................................................................................................103Table6‐4‐CFFTextSubtitleTTMLFeatureRestrictions.................................................................................................104Table6‐5‐CFFTextSubtitleTTMLSMPTEExtensionRestrictions.............................................................................104Table6‐6‐CFFImageSubtitleTTMLFeatureRestrictions..............................................................................................105Table6‐7–CFFImageSubtitleTTMLElementRestrictions............................................................................................106Table6‐8‐CFFImageSubtitleTTMLSMPTEExtensionRestrictions.........................................................................106Table6‐9–ConstraintsonSubtitleSamples..........................................................................................................................110Table6‐10–HypotheticalRenderModelConstraints........................................................................................................120Table6‐11–RecommendedUnicodeCodePointsperLanguage..................................................................................124Table6‐12–SubtitlesperRegion................................................................................................................................................127TableA‐1–CurrentVersion.........................................................................................................................................................130TableA‐2–CompatibleVersion..................................................................................................................................................130TableB‐1–AllowedAudioFormatsinPDMediaProfile................................................................................................132TableB‐2–HypotheticalRenderModelConstraints(General)...................................................................................133TableB‐3–HypotheticalRenderModelConstraints(Textsubtitle).........................................................................133TableB‐4–AllowedAudioFormatsinSDMediaProfile.................................................................................................136TableB‐5–AllowedEnhancedAudioFormatsinSDMediaProfile...........................................................................136TableB‐6–HypotheticalRenderModelConstraints(Imagesubtitle)......................................................................136TableB‐7–HypotheticalRenderModelConstraints(Imagesubtitle)......................................................................143TableC‐1–PictureFormatsandConstraintsofPDMediaProfilefor24Hz&30HzContent......................155TableC‐2–PictureFormatsandConstraintsofPDMediaProfilefor25HzContent........................................156TableC‐3–PictureFormatsandConstraintsofSDMediaProfilefor24Hz,30Hz&60HzContent.........156TableC‐4–PictureFormatsandConstraintsofSDMediaProfilefor25Hz&50HzContent.......................157

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |10

TableC‐5–PictureFormatsandConstraintsofHDandxHDMediaProfilefor24Hz,30Hz&60HzContent....................................................................................................................................................................................................157TableC‐6–PictureFormatsandConstraintsofHDandxHDMediaProfilefor25Hz&50HzContent....157TableC‐7–PictureFormatsandConstraintsofUHDMediaProfilefor24Hz,30Hz&60HzContent......159TableC‐8–PictureFormatsandConstraintsofUHDMediaProfilefor25Hzand50Hz.................................159TableC‐11–[DStream]GroupAssignment..........................................................................................................................166TableD‐1–AdditionalBoxesoftheDECEFileFormat....................................................................................................169

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |11

Figures Figure1‐1–StructureoftheCommonFileFormat&MediaFormatsSpecification................................................19Figure2‐1–StructureofaDigitalCFFContainer(DCC).......................................................................................................26Figure2‐2–StructureofaDCCHeader.......................................................................................................................................28Figure2‐3–DCCMovieFragmentStructure.............................................................................................................................32Figure2‐4–StructureofaDCCFooter.........................................................................................................................................34Figure4‐1–ExampleofanAVCRandomAccess(RA)Ipicture........................................................................................53Figure4‐2–ExampleofEncodingProcessofLetterboxedSourceContent.................................................................61Figure4‐3–ExampleofDisplayProcessforLetterboxedSourceContent...................................................................63Figure4‐4–ExampleofEncodingProcessforPillarboxedSourceContent.................................................................63Figure4‐5–ExampleofDisplayProcessforPillarboxedSourceContent....................................................................64Figure5‐1–ExampleofAACbit‐stream......................................................................................................................................68Figure5‐2–Non‐AACbit‐streamexample.................................................................................................................................80Figure6‐1–Exampleofsubtitledisplayregionposition..................................................................................................107Figure6‐2–StorageofimagesfollowingtherelatedSMPTETTdocumentinasample.....................................109Figure6‐3–BlockDiagramofHypotheticalRenderModel.............................................................................................110Figure6‐4–TimerelationshipbetweenCFF‐TTdocumentsandtheCFF‐TTtrackISOmediatimeline......113Figure6‐5–BlockDiagramofCFF‐TTImageSubtitleHypotheticalRenderModel..............................................116Figure6‐6–BlockDiagramofCFF‐TTTextSubtitleHypotheticalRenderModel..................................................117Figure6‐7–ExampleofTextSubtitlePresentationCompositorBehavior...............................................................117

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |12

1 Introduction

1.1 Scope

ThisspecificationdefinestheCommonFileFormatandthemediaformatsitsupportsforthestorage,deliveryandplaybackofaudio‐visualcontent.Itincludesacommonmediafileformat,elementarystreamformats,elementarystreamencryptionformatsandmetadatadesignedtooptimizethedistribution,purchase,deliveryfrommultiplepublishers,retailers,andcontentdistributionnetworks;andenableplaybackonmultipleauthorizeddevicesusingmultipleDRMsystemswithinanecosystem.ThisspecificationisintentionallybroadincapabilitysothatMediaProfilesandDeliveryTargetscanbeusedasdefinedinthisSpecification.CombinationsofMediaProfiles,DeliveryTargetsandmandatorycodecs/constraintsarecalled“InteroperabilityPoints”.AdditionalMediaProfiles,DeliveryTargetsandInteroperabilityPointscanbedefinedelsewherewhichenablesotherformatsandecosystemstoadaptuseoftheCommonFileFormattotheirspecificrequirements.

1.2 DocumentOrganization

TheCommonFileFormat(CFF)definesacontainerforaudio‐visualcontentbasedontheISOBaseMediaFileFormat[ISO].Thisspecificationdefinesthesetoftechnologiesandconfigurationsusedtoencodethataudio‐visualcontentforpresentation.Thecorespecificationaddressesthestructure,contentandbaselevelconstraintsthatapplytoallvariationsofCommonFileFormatcontentandhowitistobestoredwithinaDigitalCFFContainer(DCC).Thisspecificationdefineshowvideo,audioandsubtitlecontentintendedforsynchronousplaybackisstoredwithinacompliantfile,aswellashowoneormoreco‐existingdigitalrightsmanagementsystemscanbeusedtoprotectthatcontentcryptographically.MediaProfiles,DeliveryTargetsandInteroperabilityPointsaredefinedintheAnnexesofthisdocument,whichspecifyadditionalrequirementsandconstraintsthatareparticulartoagivenclassofcontent.Overtime,additionalMediaProfiles DeliveryTargetsandInteroperabilityPointsmightbeadded,butsuchadditionswouldnottypicallyrequiremodificationtothecorespecification.

1.3 DocumentNotationandConventions

Thefollowingtermsareusedtospecifyconformanceelementsofthisspecification.TheseareadoptedfromtheISO/IECDirectives,Part2,AnnexH[ISO‐P2H].Formoreinformation,pleaserefertothosedirectives.

SHALLandSHALLNOTindicaterequirementsstrictlytobefollowedinordertoconformtothedocumentandfromwhichnodeviationispermitted.

SHOULDandSHOULDNOTindicatethatamongseveralpossibilitiesoneisrecommendedasparticularlysuitable,withoutmentioningorexcludingothers,orthatacertaincourseofactionispreferredbutnotnecessarilyrequired,orthat(inthenegativeform)acertainpossibilityorcourseofactionisdeprecatedbutnotprohibited.

MAYandNEEDNOTindicateacourseofactionpermissiblewithinthelimitsofthedocument.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |13

Termsdefinedtohaveaspecificmeaningwithinthisspecificationwillbecapitalized,e.g.“DCCMovieFragment”,andshouldbeinterpretedwiththeirgeneralmeaningifnotcapitalized.

1.4 NormativeReferences

1.4.1 DECE References

[DSystem] SystemSpecification

[DDMP] MediaPackageSpecification[DMeta] ContentMetadataSpecification[DStream] CommonStreamingProtocolSpecificationNote:OtherDECEdocumentscontainrequirementsforanUltraViolet‐compliantimplementation,particularlytheLicenseeImplementationRequirementsasincorporatedintotheComplianceRulesofLicenseeAgreements.

1.4.2 External References

[AAC] ISO/IEC14496‐3:2009,“Informationtechnology—Codingofaudio‐visualobjects—Part3:Audio”with:Amendment1,Amendment2,Amendment3,Amendment4,Corrigendum1,Corrigendum2,Corrigendum3

[AACC] ISO/IEC14496‐26:2010,"Informationtechnology—Codingofaudio‐visualobjects—Part26:Audioconformance”withAmendment2,Corrigendum2,Corrigendum3,Corrigendum4,Corrigendum5,Corrigendum6

[AC4] ETSITS103190V1.1.1(2014‐04),“DigitalAudioCompression(AC‐4)Standard”

[AES] AdvancedEncryptionStandard,FederalInformationProcessingStandardsPublication197,FIPS‐197,http://www.nist.gov

[CENC] ISO/IEC23001‐7:2014,Secondedition,"Informationtechnology‐MPEGsystemstechnologies‐Part7:CommonencryptioninISObasemediafileformatfiles"

[CICP] ISO/IEC23001‐8:2013“Informationtechnology–MPEGsystemstechnologies–Part8:Coding‐independentcodepoints”withAmendment1

[DASH] ISO/IEC23009‐1:2014,Secondedition2014‐05‐15,“Informationtechnology—DynamicadaptivestreamingoverHTTP(DASH)‐Part1:Mediapresentationdescriptionandsegmentformats”

[DTS] ETSITS102114v1.4.1(2012‐09),“DTSCoherentAcoustics;CoreandExtensionswithAdditionalProfiles"

[DV] DolbyLaboratories,“DolbyVisionstreamswithintheISOBaseMediaFileFormat,Version1.0”

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |14

[EAC3] ETSITS102366v.1.3.1(2014‐08),“DigitalAudioCompression(AC‐3,EnhancedAC‐3)Standard”

[H264] ISO/IEC14496‐10:2014,Eighthedition2014‐09‐01,"Informationtechnology‐Codingofaudio‐visualobjects‐Part10:AdvancedVideoCoding"

[H265] ISO/IECFDIS23008‐2,Secondedition,“Informationtechnology‐Highefficiencycodingandmediadeliveryinheterogeneousenvironments‐Part2:Highefficiencyvideocoding”

[IANA‐LANG] IANALanguageSubtagRegistryhttp://www.iana.org/assignments/language‐subtag‐registry

[ISO] ISO/IEC14496‐12:2012,Fourthedition2012‐07‐15,Correctedversion2012‐09‐15,"Informationtechnology‐Codingofaudio‐visualobjects–Part12:ISOBaseMediaFileFormat”withAmendment1,Amendment2,Corrigendum1,Corrigendum2,DCOR3,DCOR4

[ISOVIDEO] ISO/IEC14496‐15:2014,Thirdedition2014‐07‐01,“Informationtechnology‐Codingofaudio‐visualobjects‐Part15:CarriageofNALunitstructuredvideointheISOBaseMediaFileFormat”withDCOR1

[ISOTEXT] ISO/IEC14496‐30:2014,Firstedition2014‐03‐15,“TimedtextandothervisualoverlaysinISObasemediafileformat”withDCOR1

[ISO‐P2H] ISO/IECDirectives,Part2,AnnexHhttp://www.iec.ch/tiss/iec/Directives‐part2‐Ed5.pdf

[MHA] ISO/IECDIS23008‐3,“Informationtechnology–Highefficiencycodingandmediadeliveryinheterogeneousenvironments–Part3:3DAudio”withDAM1“3DAudioProfilesandLevels”andDAM2“3DAudioFileFormatSupport”

[MHP] ETSITS101812V1.3.1,“DigitalVideoBroadcasting(DVB);MultimediaHomePlatform(MHP)Specification1.0.3”,availablefromwww.etsi.org.

[MLP] MeridianLosslessPacking,TechnicalReferenceforFBAandFBBstreams,Version1.0,October2005,DolbyLaboratories,Inc.

[MLPISO] MLP(DolbyTrueHD)streamswithintheISOBaseMediaFileFormat,Version1.0,DolbyLaboratories,Inc.

[MP4] ISO/IEC14496‐14:2003,Firstedition2003‐11‐15,“Informationtechnology‐Codingofaudio‐visualobjects‐Part14:MP4fileformat”with:Amendment1,Corrigendum1

[MP4RA] Registrationauthorityforcode‐pointsintheMPEG‐4family,http://www.mp4ra.org

[MPEG4S] ISO/IEC14496‐1:2010,Fourthedition2010‐06‐01,“Informationtechnology‐Codingofaudio‐visualobjects‐Part1:Systems”with:Amendment1:2010

[MPS] ISO/IEC23003‐1:2007,“Informationtechnology—MPEGaudiotechnologies—Part1:MPEGSurround”withCorrigendum1,Corrigendum2,Corrigendum3,Corrigendum4

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |15

[R601] ITU‐RRecommendationBT.601‐7,“Studioencodingparametersofdigitaltelevisionforstandard4:3andwide‐screen16:9aspectratios”

[R709] ITU‐RRecommendationBT.709‐5,“ParametervaluesfortheHDTVstandardsforproductionandinternationalprogrammeexchange”

[R1700] ITU‐RRecommendationBT.1700,“Characteristicsofcompositevideosignalsforconventionalanaloguetelevisionsystems”

[R1886] ITU‐RRecommendationBT.1886,“Referenceelectro‐opticaltransferfunctionforflatpaneldisplaysusedinHDTVstudioproduction”

[R2020] ITU‐RRecommendationBT.2020‐0,“Parametervaluesfortheultra‐highdefinitiontelevisionsystemsforproductionandinternationalprogrammeexchange”

[RFC2141] “URNSyntax”,R.Moats,May1997,http://www.ietf.org/rfc/rfc2141.txt[RFC4122] Leach,P.,etal,AUniversallyUniqueIdentifier(UUID)URNNamespace,July

2005http://www.ietf.org/rfc/rfc4122.txt[RFC4151] “The'tag'URIScheme”,T.KindbergandS.Hawke,October2005

http://www.ietf.org/rfc/rfc4151.txt[RFC5646] “TagsforIdentifyingLanguages”A.PhilipsandM.Davis,September,2009,

http://www.ietf.org/rfc/rfc5646.txt[RFC6381] “The'Codecs'and'Profiles'Parametersfor"Bucket"MediaTypes”R.Gellens,et

al,August,2011,http://www.ietf.org/rfc/rfc6381.txt[SMPTE428] SMPTE428‐3‐2006,“D‐CinemaDistributionMasterAudioChannelMapping

andChannelLabeling”(c)SMPTE2006[SMPTE‐TT] SMPTEST2052‐1:2010,“TimedTextFormat(SMPTE‐TT)”[SMPTE‐608] SMPTERP2052‐10:2012,“ConversionfromCEA‐608DatatoSMPTE‐TT”[SMPTE‐708] SMPTERP2052‐11,“ConversionfromCEA‐708DatatoSMPTE‐TT”[SMPTE‐2084] SMPTEST2084:2014,“DynamicRangeElectro‐OpticalTransferFunctionof

MasteringReferenceDisplays”[XML] “XMLSchemaPart1:StructuresSecondEdition”,HenryS.Thompson,David

Beech,MurrayMaloney,NoahMendelsohn,W3CRecommendation28October2004,http://www.w3.org/TR/xmlschema‐1/“XMLSchemaPart2:DatatypesSecondEdition”,PaulBironandAshokMalhotra,W3CRecommendation28October2004,http://www.w3.org/TR/xmlschema‐2/

[UNICODE] UNICODE6.0.0,“TheUnicodeStandardVersion6.0”,http://www.unicode.org/versions/Unicode6.0.0/

Note:Readersareencouragedtoinvestigatethemostrecentpublicationsfortheirapplicability.

1.5 InformativeReferences

[ATSC] A/153Part‐7:2009,“ATSC‐MobileDTVStandard,Part7—AVCandSVCVideoSystemCharacteristics”

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |16

[RFC3986] “UniformResourceIdentifier(URI):GenericSyntax”T.Berners‐Lee,R.FieldingandL.Masinter,January2005.http://www.ietf.org/rfc/rfc3986.txt

[W3C‐TT] TimedTextMarkupLanguage(TTML)1.0(SecondEdition),http://www.w3.org/TR/2013/PER‐ttaf1‐dfxp‐20130709/

1.6 Terms,Definitions,andAcronyms

AAC Asdefinedin[AAC],“AdvancedAudioCoding.”AACLC AlowcomplexityaudiotoolusedinAACprofile,definedin[AAC].accessunit,AU Asdefinedin[MPEG4S],“smallestindividuallyaccessibleportionofdata

withinanelementarystreamtowhichuniquetiminginformationcanbeattributed.”

activepicturearea Inavideotrack,theactivepictureareaistherectangularsetofpixelsthatcancontainvideocontentatanypointthroughoutthedurationofthetrack,absentofanyadditionalmattingthatisnotconsideredbythecontentpublishertobeanintegralpartofthevideocontent.

ADIF Asdefinedin[AAC],“AudioDataInterchangeFormat.”ADTS Asdefinedin[AAC],“AudioDataTransportStream.”AES‐CTR AdvancedEncryptionStandard,CounterModeaudiostream Asequenceofsynchronizedaudioframes.audioframe AcomponentofanaudiostreamthatcorrespondstoacertainnumberofPCM

audiosamples.AVC AdvancedVideoCoding[H264].AVClevel AsetofperformanceconstraintsspecifiedinAnnexA.3of[H264],suchas

maximumbitrate,maximumnumberofmacroblocks,maximumdecodingbuffersize,etc.

AVCprofile AsetofencodingtoolsandconstraintsdefinedinAnnexA.2of[H264].BaseLayer maximumsubsetofabitstreamthatisAVCorHEVCcompatible(asdefinedin

[ISOVIDEO])box Asdefinedin[ISO],“object‐orientedbuildingblockdefinedbyauniquetype

identifierandlength.”CBR Asdefinedin[H264],“ConstantBitRate.”CFF CommonFileFormat.(See“CommonFileFormat.”)CFF‐TT “CommonFileFormatTimedText”istheSubtitleformatdefinedbythis

specification.chunk Asdefinedin[ISO],“contiguoussetofsamplesforonetrack.”codedvideosequence(CVS)

Asdefinedin[H264]forAVCvideotracksandasdefinedin[H265]forHEVCvideotracks.

CommonFileFormat(CFF)

ThestandardDECEcontentdeliveryfileformat,encodedinoneoftheapprovedMediaProfilesandpackaged(encodedandencrypted)asdefinedbythisspecification.

containerbox Asdefinedin[ISO],“boxwhosesolepurposeistocontainandgroupasetofrelatedboxes.”

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |17

core InthecaseofDTS,acomponentofanaudioframeconformingto[DTS].CPE Asdefinedin[AAC],anabbreviationforchannel_pair_element().DCCFooter Thecollectionofboxesdefinedbythisspecificationthatmightformtheendof

aDigitalCFFContainer(DCC),definedinSection2.1.4.DCCHeader Thecollectionofboxesdefinedbythisspecificationthatformthebeginningof

aDigitalCFFContainer(DCC),definedinSection2.1.2.DCCMovieFragment

Thecollectionofboxesdefinedbythisspecificationthatformafragmentofamediatrackcontainingonetypeofmedia(i.e.audio,video,subtitles),definedbySection2.1.3.

DECE DigitalEntertainmentContentEcosystemDigitalCFFContainer(DCC)

AninstanceofContentpublishedintheCommonFileFormat.

descriptor Asdefinedin[MPEG4S],“datastructurethatisusedtodescribeparticularaspectsofanelementarystreamoracodedaudio‐visualobject.”

DRM DigitalRightsManagement.EnhancementLayer

layerthatspecifiesapartofascalablebitstreamthatenhancesthevideo(asdefinedin[ISOVIDEO]).

extension InthecaseofDTS,acomponentofanaudioframethatmightormightnotexistinsequencewithotherextensioncomponentsoracorecomponent.

fileformat Adefinitionofhowdataiscodifiedforstorageinaspecifictypeoffile.fragment Asegmentofatrackrepresentingasingle,continuousportionofthetotal

durationofcontent(i.e.video,audio,subtitles)storedwithinthattrack.HD HighDefinition;PictureresolutionofonemillionormorepixelslikeHDTV.HEAAC MPEG‐4HighEfficiencyAACprofile,definedin[AAC].HEVC HighEfficiencyVideoCoding[H265]HEVCtierandlevel

AsetofperformanceconstraintsspecifiedinAnnexA.4of[H265],suchasmaximumbitrate,maximumnumberofmacroblocks,maximumdecodingbuffersize,etc.

HEVCprofile AsetofencodingtoolsandconstraintsdefinedinAnnexA.3of[H265].hinttrack Asdefinedin[ISO],“specialtrackwhichdoesnotcontainmediadata,but

insteadcontainsinstructionsforpackagingoneormoretracksintoastreamingchannel.”

horizontalsub‐samplefactor

Sub‐samplefactorforthehorizontaldimension.See‘sub‐samplefactor’,below.

IMDCT InverseModifiedDiscreteCosineTransform.ISO Inthisspecification“ISO”isusedtorefertotheISOBaseMediaFileformat

definedin[ISO],suchasin“ISOcontainer”or“ISOmediafile”.Itisalsotheacronymfor“InternationalOrganizationforStandardization”.

ISOBaseMediaFile

Fileformatdefinedby[ISO].

Kbps 1x103bitspersecond.LFE LowFrequencyEffects.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |18

latebinding Thecombinationofseparatelystoredaudio,video,subtitles,metadata,orDRMlicenseswithapreexistingvideofileforplaybackasthoughthelateboundcontentwasincorporatedinthepreexistingvideofile.

luma Asdefinedin[H264],“Anadjectivespecifyingthatasamplearrayorsinglesampleisrepresentingthemonochromesignalrelatedtotheprimarycolours.”

Mbps 1x106bitspersecond.mediaformat Asetoftechnologieswithaspecifiedrangeofconfigurationsusedtoencode

“media”suchasaudio,video,pictures,text,animation,etc.foraudio‐visualpresentation.

MediaProfile RequirementsandconstraintssuchasresolutionandsubtitleformatforcontentintheCommonFileFormat.

MPEG MovingPictureExpertsGroup.MPEG‐4AAC AdvancedAudioCoding,MPEG‐4Profile,definedin[AAC].NALStructuredVideo

NetworkAbstractionLayerStructuredVideo;atechnicalapproachtoformattheVideoCodingLayer(VCL)representationofthevideosuchthatheaderinformationisconveyedinamanorwhichisappropriateforavarietyoftransportlayers.

PD PortableDefinition;intendedforportabledevicessuchascellphonesandportablemediaplayers.

presentation Asdefinedin[ISO],“oneormoremotionsequences,possiblycombinedwithaudio.”

progressivedownload

Theinitiationandcontinuationofplaybackduringafilecopyordownload,beginningoncesufficientfiledatahasbeencopiedbytheplaybackdevice.

PS Asdefinedin[AAC],“ParametricStereo.”sample Asdefinedin[ISO],“allthedataassociatedwithasingletimestamp.”(Notto

beconfusedwithanelementofvideospatialsampling.)sampleaspectratio,SAR

Asdefinedin[H264],“theratiobetweentheintendedhorizontaldistancebetweenthecolumnsandtheintendedverticaldistancebetweentherowsofthelumasamplearrayinaframe.Sampleaspectratioisexpressedash:v,wherehishorizontalwidthandvisverticalheight(inarbitraryunitsofspatialdistance).”

sampledescription

Asdefinedin[ISO],“structurewhichdefinesanddescribestheformatofsomenumberofsamplesinatrack.”

SBR Asdefinedin[AAC],“SpectralBandReplication.”SCE Asdefinedin[AAC],anabbreviationforsingle_channel_element().SD StandardDefinition;usedonawiderangeofdevicesincludinganalog

televisionsub‐samplefactor Avalueusedtodeterminetheconstraintsforchoosingvalidwidthand

heightfieldvaluesforavideotrack,specifiedinSection4.5.1.1.sub‐sampling Invideo,theprocessofencodingpicturedataatalowerresolutionthanthe

originalsourcepicture,thusreducingtheamountofinformationretained.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |19

substream Inaudio,asequenceofsynchronizedaudioframescomprisingonlyoneofthelogicalcomponentsoftheaudiostream.

track Asdefinedin[ISO],“timedsequenceofrelatedsamples(q.v.)inanISObasemediafile.”

trackfragment Acombinationofmetadataandsampledatathatdefinesasingle,continuousportion(“fragment”)ofthetotaldurationofagiventrack.

UHD UltraHighDefinition;Pictureresolutionupto3840x2160.VBR Asdefinedin[H264],“VariableBitRate.”verticalsub‐samplefactor

Sub‐samplefactorfortheverticaldimension.See‘sub‐samplefactor’,above.

XLL AlogicalelementwithintheDTSelementarystreamcontainingcompressedaudiodatathatwilldecodeintoabit‐exactrepresentationoftheoriginalsignal.

1.7 Architecture(Informative)

ThefollowingsubsectionsdescribethecomponentsofaDigitalCFFContainer(DCC)andhowtheyarecombinedor“layered”tomakeacompletefile.Thespecificationitselfisorganizedinsectionscorrespondingtolayers,alsoincorporatingnormativereferences,whichcombinetoformthecompletespecification.

1.7.1 Media Layers

Thisspecificationcanbethoughtofasacollectionoflayersandcomponents.Thisdocumentandthenormativereferencesitcontainsareorganizedbasedonthoselayers.

Figure1‐1–StructureoftheCommonFileFormat&MediaFormatsSpecification

DECE Common Container & Media Format Specification

Chapter 2.  The Common File Format

(Structure, metadata, and descriptors)

Chapter 6.  Subtitle Elementary Streams

(Text and image formats, sample storage, and description)

Chapter 3.  Encryption of Track Level Data

(Common encryption format, vectors, and keys)

Chapter 4.  Video Elementary Streams

(Codec, constraints, sample storage, and description)

Chapter 5.  Audio Elementary Streams

(Codecs, constraints, sample storage, and description)

Annexes:  Media Profiles

(Profile definitions, requirements, and constraints)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |20

1.7.2 Common File Format

Section2ofthisspecificationdefinestheCommonFileFormat(CFF)derivedfromtheISOBaseMediaFileFormatand‘iso6’brandspecifiedin[ISO].Thissectionspecifiesrestrictionsandadditionstothefileformatandclarifieshowcontentstreamsandmetadataareorganizedandstored.The‘iso6’brandoftheISOBaseMediaFileFormatconsistsofaspecificcollectionofboxes,whicharethelogicalcontainersdefinedintheISOspecification.Boxescontaindescriptorsthatholdparametersderivedfromthecontainedcontentanditsstructure.OneofthefunctionsofthisspecificationistoequateormaptheparametersdefinedinelementarystreamformatsandothernormativespecificationstodescriptorsinISOboxes,ortoelementarystreamsamplesthatarelogicallycontainedinmediadataboxes.Physically,theISOBaseMediaFileFormatallowsstorageofelementarystreamaccessunitsinanysequenceandanygrouping,intactorsubdividedintopackets,withinorexternallytothefile.AccessunitsdefinedineachelementarystreamaremappedtologicalsamplesintheISOmediafileusingreferencestobytepositionsinsidethefilewheretheaccessunitsarestored.Thelogicalsampleinformationallowsaccessunitstobedecodedandpresentedsynchronouslyonatimeline,regardlessofstorage,aslongastheentireISOmediafileandsamplestoragefilesarerandomlyaccessibleandtherearenoperformanceormemoryconstraints.Inpractice,additionalphysicalstorageconstraintsareusuallyrequiredinordertoensureuninterrupted,synchronousplayback.Toenableusefulfiledeliveryscenarios,suchasprogressivedownload,andtoimproveinteroperabilityandminimizedevicerequirements;theCFFplacesrestrictionsonthephysicalstorageofelementarystreamsandtheiraccessunits.Ratherthanemployanadditionalsystemslayer,theCFFstoresasmallnumberofelementarystreamaccessunitswitheachfragmentoftheISOtrackthatreferencesthoseaccessunitsassamples.BecauselogicalmetadataandphysicalsamplestorageisgroupedtogetherintheCFF,eachsegmentofanISOtrackhasthenecessarymetadataandsampledatafordecryptionanddecodingthatisoptimizedforrandomaccessplaybackandprogressivedownload.

1.7.3 Track Encryption and DRM support

DECEspecifiesastandardencryptionschemeandkeymappingthatcanbeusedwithmultipleDRMsystemscapableofprovidingthenecessarykeymanagementandprotection,contentusagecontrol,anddeviceauthenticationandauthorization.Standardencryptionalgorithmsarespecifiedforregular,opaquesampledata,andforvideodatawithsub‐samplelevelheadersexposedtoenablereformattingofvideostreamswithoutdecryption.The“Scheme”methodspecifiedin[ISO]isrequiredforallencryptedfiles.ThismethodprovidesaccessiblekeyidentificationandmappinginformationthatanauthorizedDRMsystemcanusetocreateDRM‐specificinformation,suchasalicense,thatcanbestoredinareservedareawithinthefile,ordeliveredseparatelyfromthefile.

1.7.3.1 DRMSignalingandLicenseEmbedding

EachDRMsystemthatembedsDRM‐specificinformationinaDCCfiledoessobycreatingaDRM‐specificboxintheMovieBox(‘moov’)asdescribedinSection3.ThisboxcanbeusedtostoreDRM‐specificinformation,suchaslicenseacquisitionobjects,rightsobjects,licensesandotherinformation.ThisinformationisusedbythespecificDRMsystemtoenablecontentdecryptionandplayback.Alternatively,DRM‐specificboxescanbestoredintheMediaPackageasspecifiedby[DDMP].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |21

1.7.4 VideoElementary Streams

ThisspecificationsupportstheuseofNALStructuredVideoelementarystreamsencodedaccordingtotheAVCcodecspecifiedin[H264]ortheHEVCcodecspecifiedin[H265]andstoredintheCommonFileFormatinaccordancewith[ISOVIDEO],withsomeadditionalrequirementsandconstraints.

1.7.5 Audio Elementary Streams

AwiderangeofaudiocodingtechnologiesaresupportedforinclusionintheCommonFileFormat,includingseveralbasedonMPEG‐4AACaswellasDolby™andDTS™formats.ConsistentwithMPEG‐4architecture,AACelementarystreamsspecifiedinthisformatonlyincluderawaudiosamplesintheelementarybit‐stream.Theserawaudiosamplesaremappedtoaccessunitsattheelementarystreamlevelandsamplesatthecontainerlayer.Othersyntaxelementstypicallyincludedforsynchronization,packetization,decodingparameters,contentformat,etc.aremappedeithertodescriptorsatthecontainerlayer,orareeliminatedbecausetheISOcontaineralreadyprovidescomparablefunctions,suchassampleidentificationandsynchronization.InthecaseofDolbyandDTSformats,completeelementarystreamsnormallyusedbydecodersaremappedtoaccessunitsandstoredassamplesinthecontainer.Someparametersalreadyincludedinthebit‐streamsareduplicatedatthecontainerlevelinaccordancewithISOmediafilerequirements.Duringplayback,thecompleteelementarystream,whichispresentinthestoredsamples,issenttothedecoderforpresentation.Thedecoderusesthein‐banddecodingandstreamstructureparametersspecifiedbyeachcodec.Thesecodecsuseavarietyofdifferentmethodsandstructurestomapandmixchannels,aswellassub‐andextensionstreamstoscalefrom2.0channelsto7.1channelsandenableincreasinglevelsofquality.RatherthantryingtodescribeandenableallthedecodingfeaturesofeachstreamusingISOtracksandsamplegrouplayers,theCommonFileFormatidentifiesonlythemaximumcapabilityofeachstreamatthecontainerlevel(e.g.“7.1channellossless”)andallowsstandarddecodersforthesecodecstodecodeusingthein‐bandinformation(asistypicallydoneintheinstalledbaseofthesedecoders).

1.7.6 Subtitle Elementary Streams

Thisspecificationsupportstheuseofbothimageandtext‐basedsubtitlesintheCommonFileFormatusingtheSMPTETTformatdefinedin[SMPTE‐TT].AnextensionoftheW3CTimedTextMarkupLanguage,subtitlesarestoredasaseriesofSMPTETTdocumentsand,optionally,PNGimages.AsingleDigitalCFFContainercancontainmultiplesubtitletracks,whicharecomposedoffragments,eachcontainingasinglesamplethatmapstoaSMPTETTdocumentandanyimagesitreferences.Thesubtitlesthemselvescanbestoredincharactercodingform(e.g.Unicode)orassub‐pictures,orboth.Subtitletrackscanaddresspurposessuchasnormalcaptions,subtitlesforthedeafandhearingimpaired,descriptivetext,andcommentaries,amongothers.

1.7.7 Media Profiles and Delivery Targets

TheCommonFileFormatdefinesallofthegeneralrequirementsandconstraintsforaconformantDCC.Inaddition,AnnexB.ofthisdocumentdefinesrequirementsforspecificMediaProfilesandAnnexC.ofthisdocumentdefinesrequirementsforspecificDeliveryTargets.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |22

MediaProfilesnormativelydefinedistinctsubsetsoftheelementarystreamformatsthatcanbestoredwithinaDCCinordertoensureinteroperabilitywithcertainclassesofdevices.Theserestrictionsincludemandatoryandoptionalcodecs,pictureformatrestrictionsandcodecparameterrestrictions,amongothers.Ingeneral,eachMediaProfiledefinesthemaximumsetoftoolsandperformanceparameterscontentispermittedtouseandstillcomplywiththeMediaProfile.However,compliantcontentcanuselessthanthemaximumlimits,unlessotherwisespecified.ThismakesitpossibleforadevicethatdecodesahigherMediaProfileofcontenttoalsobeabletodecodefilesthatconformtolowerMediaProfiles,thoughthereverseisnotnecessarilytrue.DeliveryTargetsnormativelydefineadditionalrestrictionsonelementarystreamformatsandDCCfilestructuretosupportparticulartypesofdeliverymethodssuchasdownloadorstreaming.AconformantDCCwillcomplywiththegeneralrequirementsdefinedinthisspecificationtogetherwithatleastoneMediaProfileandatleastoneDeliveryTarget.ItispossibleforaDCCtosimultaneouslycomplywithmorethanoneDeliveryTarget.Compliantdevicesareexpectedtogracefullyignoremetadataandformatoptionstheydonotsupport.Overtime,additionalMediaProfilesandDeliveryTargetsmightbeaddedinordertosupportnewfeatures,formatsandcapabilities.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |23

2 TheCommonFileFormat

TheCommonFileFormat(CFF)isbasedonanenhancementoftheISOBaseMediaFileFormatdefinedby[ISO].TheprincipalenhancementstotheISOBaseMediaFileFormataresupportformultipleDRMtechnologiesandseparatestorageofaudio,video,andsubtitlesamplesintrackfragmentstoallowflexibledeliverymethods(includingprogressivedownload)andplayback.

2.1 CommonFileFormat

TheCommonFileFormatisdefinedbythe‘ccff’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].Thebrand‘ccff’requiressupportforallfeaturesofthe‘iso6’brandasdefinedin[ISO].Inaddition,thisspecificationdefinesboxes,requirementsandconstraintsthatarerequiredinadditiontothosedefinedby[ISO];includedareconstraintsonthelayoutofcertaininformationwithinthecontainerinordertoimproveinteroperability,randomaccessplaybackandprogressivedownload.ThefollowingboxesareextensionsfortheCommonFileFormat:

‘coin’:ContentInformationBox(seeSection2.2.2) 

‘avcn’:AVCNALUnitStorageBox (not recommended for use – see Section 2.2.3) 

‘senc’:SampleEncryptionBox(seeSection2.2.4)

‘trik’:TrickPlayBox(notrecommendedforuse–seeSection2.2.5)Table21‐showstheboxtype,structure,nestinglevelandcross‐referencesfortheCommonFileFormat.ThenestinginTable21indicatescontainment,notnecessarilyorder.DifferencesandextensionstotheISOBaseMediaFileFormatarehighlighted.Unlessotherwiseprohibitedinthisspecification,theDCCandanyboxwithinitcancontainadditionalboxestotheextentpermittedby[ISO].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |24

Table2‐1‐BoxstructureoftheCommonFileFormat(CFF)NL0 NL1 NL2 NL3 NL4 NL5 FormatReq. Specification Description

ftyp 1 Section2.3.1FileTypeandCompatibility

moov 1 [ISO]8.2.1Containerforfunctionalmetadata

mvhd 1 [ISO]8.2.2 Movieheader coin 1 Section2.2.2 ContentInformationBox

meta 0/1 [ISO]8.11.1Multi‐TrackRequiredMetadata

hdlr 1 Section2.3.3Handlerforcommonfilemetadata

xml 1 Section2.3.4.1XMLforMulti‐TrackRequiredMetadata

iloc 1 [ISO]8.11.3ItemLocation(i.e.forXMLreferencestomandatoryimages,etc.)

idat 0/1 [ISO]8.11.11ContainerforMetadataimagefiles

trak + [ISO]8.3.1 Containerforeachtrack tkhd 1 [ISO]8.3.2 Trackheader edts 0/1 [ISO]8.6.5 EditBox elst 0/1 [ISO]8.6.6 EditListBox mdia 1 [ISO]8.4 TrackMediaInformation mdhd 1 Section2.3.6 MediaHeader

hdlr 1 [ISO]8.4.3Declaresthemediahandlertype

minf 1 [ISO]8.4.4MediaInformationcontainer

vmhd 0/1 Section2.3.7 VideoMediaHeader smhd 0/1 Section2.3.8 SoundMediaHeader sthd 0/1 Section2.3.9 SubtitleMediaHeader dinf 1 [ISO]8.7.1 DataInformationBox

dref 1 Section2.3.10DataReferenceBox,declaressourceofmediadataintrack

stbl 1 [ISO]8.5SampleTableBox,containerforthetime/spacemap

stsd 1 Section2.3.11SampleDescriptions(SeeTable22‐foradditionaldetail.)

stts 1 Section2.3.12 Decoding,TimetoSample stsc 1 Section2.3.16 Sample‐to‐Chunk

stsz/stz2

1 Section2.3.13 SampleSizeBox

stco 1 Section2.3.17 ChunkOffset mvex 1 [ISO]8.8.1 MovieExtendsBox mehd 1 [ISO]8.8.2 MovieExtendsHeader

trex +

(1pertrack)Section2.3.17 TrackExtendsBox

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |25

NL0 NL1 NL2 NL3 NL4 NL5 FormatReq. Specification Description

pssh * [CENC]8.1ProtectionSystemSpecificHeaderBox

free 0/1 [ISO]8.1.2FreeSpaceBoxreservedspaceforDRMinformation

sidx 0/1 Section2.3.21 SegmentIndexBoxemsg * [DASH]5.10.3.3 Eventmessageboxmoof + [ISO]8.8.4 MovieFragment mfhd 1 Section2.3.18 MovieFragmentHeader traf 1 [ISO]8.8.6 TrackFragment tfhd 1 Section2.3.19 TrackFragmentHeader

tfdt 1 [ISO]8.8.12TrackFragmentBaseMediaDecodeTime

trik

0/1forAVCvideowhich

includes(‘avc1’)sampleentries,0forothers

Section2.2.7 TrickPlayBox

trun 1 Section2.3.20 TrackFragmentRunBox

avcn

0/1forAVCvideowhich

includes(‘avc1’)sampleentries,0forothers

Section2.2.2 AVCNALUnitStorageBox

senc 0/1 Section2.2.6 SampleEncryptionBox

saio +ifencrypted,*ifunencrypted

[ISO]8.7.13SampleAuxiliaryInformationOffsetsBox

saiz +ifencrypted,*ifunencrypted

[ISO]8.7.12SampleAuxiliaryInformationSizesBox

sbgp * [ISO]8.9.2 SampletoGroupBox

sgpd * [ISO]8.9.3SampleGroupDescriptionBox

mdat + Section2.3.22MediaDatacontainerformediasamples

meta 0/1 [ISO]8.11.1Multi‐TrackOptionalMetadata

hdlr 0/1 Section2.3.3Handlerforcommonfilemetadata

xml 0/1 Section2.3.4.2XMLforMulti‐TrackOptionalMetadata

iloc 0/1 [ISO]8.11.3ItemLocation(i.e.forXMLreferencestooptionalimages,etc.)

idat 0/1 [ISO]8.11.11ContainerforMetadataimagefiles

mfra 0/1 [ISO]8.8.9MovieFragmentRandomAccess

tfra +

(onepertrack)Section2.3.18

TrackFragmentRandomAccess

mfro 1 [ISO]8.8.11MovieFragmentRandomAccessOffset

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |26

FormatReq.:Numberofboxesrequiredtobepresentinthecontainer,where‘*’means“zeroormore”and‘+’means“oneormore”.Avalueof"0/1"indicatesonlythataboxmightormightnotbepresentbutdoesnotstipulatetheconditionsofitsappearance.

Table2‐2–Additional‘stsd’Detail:ProtectedSampleEntryBoxstructureNL5 NL6 NL7 NL8 FormatReq Source Descriptionstsd 1 Section2.3.11 SampleDescriptionBox

sinf * ISO8.12.1ProtectionSchemeInformationBox

frma 1 ISO8.12.2 OriginalFormatBox schm 1 [ISO]8.12.5 SchemeTypeBox schi 1 [ISO]8.12.6 SchemeInformationBox tenc 1 [CENC]8.2 TrackEncryptionBox

2.1.1 Digital CFF Container Structure

Forthepurposeofthisspecification,theDigitalCFFContainer(DCC)structuredefinedbytheCommonFileFormatisdividedintothreesections:DCCHeader,DCCMovieFragments,andDCCFooter,asshowninFigure21‐.

ADigitalCFFContainerstartswithaDCCHeader,asdefinedinSection2.1.2. OneormoreDCCMovieFragments,asdefinedinSection2.1.3followtheDCCHeader.Otherboxes

MAYexistbetweentheDCCHeaderandthefirstDCCMovieFragment.OtherboxesMAYexistbetweenDCCMovieFragments,aswell.

ADigitalCFFContainerendswithaDCCFooter,asdefinedinSection2.1.4.OtherboxesMAYexistbetweenthelastDCCMovieFragmentandtheDCCFooter.ADCCFooterMAYcontainnoboxes.

Figure2‐1–StructureofaDigitalCFFContainer(DCC)

Digital CFF Container (DCC)

DCC Header …

DCC Footer

DCC Movie Fragment ‐ 1

DCC Movie Fragment ‐ 2

DCC Movie Fragment ‐ n

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |27

2.1.2 DCC Header

TheDCCHeaderdefinesthesetofboxesthatappearatthebeginningofaDigitalCFFContainer(DCC),asshowninFigure22‐.TheboxrequirementsdefinedfortheDCCHeaderSHALLapplytothestartofaDCC,beginningwiththefirstboxintheDCCthroughtothefirstboxofthefirstMovieFragment.Theseboxesaredefinedincompliancewith[ISO]withthefollowingadditionalconstraintsandrequirements:

TheDCCHeaderSHALLstartwithaFileTypeBox(‘ftyp’),asdefinedinSection2.3.1.

TheDCCHeaderSHALLincludeoneMovieBox(‘moov’).

TheMovieBoxSHALLcontainaMovieHeaderBox(‘mvhd’),asdefinedinSection2.3.2.

TheMovieBoxSHALLcontainaContentInformationBox(‘coin’),asdefinedinSection2.2.2.TheContentInformationBox(‘coin’)SHOULDimmediatelyfollowtheMovieHeaderBox(‘mvhd’)intheDCCHeader.

TheMovieBoxMAYcontainMulti‐TrackRequiredMetadataasspecifiedinSection2.1.2.1.Thismetadataprovidescontent,fileandtrackinformationnecessaryforfileidentification,trackselection,andplayback.

TheMovieBoxSHALLcontainmediatracksasspecifiedinSection2.1.2.2,whichdefinestheTrackBox(‘trak’)requirementsfortheCommonFileFormat.

TheMovieBoxSHALLcontainaMovieExtendsBox(‘mvex’),asdefinedinSection8.8.1of[ISO],toindicatethatthecontainerutilizesMovieFragmentBoxes.

TheMovieExtendsBox(‘mvex’)SHALLcontainaMovieExtendsHeaderBox(‘mehd’),asdefinedin[ISO]Section8.8.2,toprovidetheoveralldurationofafragmentedmovie.

TheMovieBox(‘moov’)MAYcontainoneormoreProtectionSystemSpecificHeaderBoxes(‘pssh’),asspecifiedin[CENC]Section8.1.

TheMovieBox(‘moov’)MAYcontainaFreeSpaceBox(‘free’)toprovidereservedspaceforaddingDRM‐specificinformation.IfpresentintheDCCfile,theFreeSpaceBox(‘free’)SHALLbethelastboxintheMovieBox(‘moov’)

TheDCCHeaderMAYcontainaSegmentIndexBox(‘sidx’).Ifpresent,theSegmentIndexBox(‘sidx’)SHALLappearaftertheMovieBox(‘moov’).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |28

Figure2‐2–StructureofaDCCHeader

2.1.2.1 RequiredMulti‐TrackMetadata

Therequiredmulti‐trackmetadataprovidesmovieandtrackinformation,suchastitle,publisher,runlength,releasedate,tracktypes,languagesupport,etcformulti‐trackDeliveryTargets(seeAnnexC.).Therequiredmulti‐trackmetadataisstoredaccordingtothefollowingdefinition:

AMetaBox(‘meta’),asdefinedin[ISO]Section8.11.1MAYexistintheMovieBox.ThisMetaBoxSHOULDprecedeanyTrackBoxestoenablefasteraccesstothemetadataitcontains.

TheMetaBoxSHALLcontainaHandlerReferenceBox(‘hdlr’)forCommonFileMetadata,asdefinedinSection2.3.3.

TheMetaBoxSHALLcontainanXMLBox(‘xml’)formulti‐trackrequiredmetadata,asdefinedinSection2.3.4.1.

TheMetaBox(‘meta’)SHALLcontainanItemLocationBox(‘iloc’)toenableXMLreferencestoimagesandanyotherbinarydatacontainedinthefile,asdefinedin[ISO]8.11.3.

ImagesandanyotherbinarydatathatarereferencedbyanXMLdocumentintheXMLBox(‘xml’)formulti‐trackrequiredmetadataSHALLbestoredinone‘idat’boxwhichSHOULDfollowallof

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |29

theboxesthe‘meta’boxcontains.EachitemSHALLhaveacorrespondingentryinthe‘iloc’boxdescribedabove,the‘iloc’construction_methodfieldSHALLbesetto‘1’andthe‘iloc’extent_offsetfieldSHALLberelativetothefirstbyteofdata[]inthe‘idat’boxcontainingimagesandanyotherbinarydatathatcanbereferencedbyanXMLdocumentinthe‘xml’box(note:theextent_offsetfieldinthiscaseusesadifferentrelativeoffsetapproachfromotheroffsetfieldsinotherboxes).

2.1.2.2 MediaTracks

Eachtrackofmediacontent(i.e.audio,video,subtitles,etc.)isdescribedbyaTrackBox(‘trak’)inaccordancewith[ISO],withtheadditionofthefollowingconstraints:

EachTrackBox(‘trak’)SHALLcontainaTrackHeaderBox(‘tkhd’),asdefinedinSection2.3.5.

EachTrackBox(‘trak’)MAYcontainanEditBox(‘edts’)asdescribedinSection2.4.

TheEditBoxintheTrackBoxMAYcontainanEditListBox(‘elst’)asdescribedinSection2.4. IfEditListBox(`elst’)isincluded,entry_countSHALLbe1,andtheentrySHALL

havefieldssettothevaluesdescribedinSection2.4. Thetrack_IDassociatedwiththemediatrackSHALLadheretotheassignmentspecifiedinTable

2‐3. EachTrackBox(‘trak’)SHALLNOTreferencemediasamples.

TheMediaBox(‘mdia’)inaTrackBox(‘trak’)SHALLcontainaMediaHeaderBox(‘mdhd’),asdefinedinSection2.3.6.

TheMediaBoxinaTrackBox(‘trak’)SHALLcontainaHandlerReferenceBox(‘hdlr’),asdefinedin[ISO]Section8.4.3.

TheMediaInformationBoxSHALLcontainaheaderboxcorrespondingtothetrack’smediatype,asfollows: Videotracks:VideoMediaHeaderBox(‘vmhd’),asdefinedinSection2.3.8. Audiotracks:SoundMediaHeaderBox(‘smhd’),asdefinedinSection2.3.9. Subtitletracks:SubtitleMediaHeaderBox(‘sthd’),asdefinedinSection2.3.9.

TheDataInformationBoxintheMediaInformationBoxSHALLcontainaDataReferenceBox(‘dref’),asdefinedinSection2.3.10.

TheSampleTableBox(‘stbl’)intheMediaInformationBoxSHALLcontainaSampleDescriptionBox(‘stsd’),asdefinedinSection2.3.11.

Forencryptedtracks,theSampleDescriptionBoxSHALLcontainatleastoneProtectionSchemeInformationBox(‘sinf’),asdefinedinSection2.3.14,toidentifytheencryptiontransformappliedanditsparameters,aswellastodocumenttheoriginal(unencrypted)formatofthemedia.Note:‘sinf’iscontainedinaSampleEntrywithacodingnameof‘enca’or‘encv’whichiscontainedwithintheSampleDescriptionBox(‘stsd’).

TheSampleTableBoxSHALLcontainaDecodingTimetoSampleBox(‘stts’),asdefinedinSection2.3.12.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |30

TheSampleTableBoxSHALLcontainaSampletoChunkBox(‘stsc’),asspecifiedinSection2.3.16,andaChunkOffsetBox(‘stco’),asdefinedinSection2.3.17,indicatingthatchunksarenotused.

Additionalconstraintsfortracksaredefinedcorrespondingtothetrack’smediatype,asfollows: Videotracks:SeeSection4.2DataStructureforVideoTrack Audiotracks:SeeSection5.2DataStructureforAudioTrack. Subtitletracks:SeeSection6.7DataStructureforCFF‐TTTrack.

Table2‐3–TrackIDAssignmenttrack_IDrange TrackType1‐49 PrimaryVideo50‐99 SecondaryVideo100‐999 MainAudio1,000‐1,999 SecondaryAudio2,000‐9,999 TertiaryAudio10,000‐10,999 MainSubtitle11,000‐11,999 SecondarySubtitle12,000+ Other(e.g.Metadata)

2.1.3 DCC MovieFragment

ADCCMovieFragmentcontainsthemetadataandmediasamplesforalimited,butcontinuoussequenceofhomogenouscontent,suchasaudio,videoorsubtitles,belongingtoasingletrack,asshowninFigure23‐.MultipleDCCMovieFragmentscontainingdifferentmediatypeswithparalleldecodetimesareplacedincloseproximitytooneanotherintheCommonFileFormatinordertofacilitatesynchronousplayback.TheboxrequirementsdefinedforDCCMovieFragmentsSHALLapplytotheDCCaftertheboxrequirementsdefinedfortheDCCHeader.DCCMovieFragmentsSHALLcomplywith[ISO]Section8.8andthefollowingrequirements:

TheDCCMovieFragmentMAYcontainoneormoreEventMessageBoxes(‘emsg’).

TheDCCMovieFragmentSHALLcontainaMovieFragmentBox(‘moof’).TheDCCMovieFragmentSHALLcontainoneormoreMediaDataBoxes(‘mdat’)formediasamples(seeFigure23‐).TheMovieFragmentBox(‘moof’)inaDCCMovieFragmentSHALLcomplywith[ISO]Section8.8.4andthefollowingrequirements:

TheMovieFragmentBoxSHALLcontainasingleTrackFragmentBox(‘traf’)definedin[ISO]Section8.8.6.

AllmediasamplesinaDCCSHALL: bereferencedfromTrackFragmentBoxes(‘traf’)containedinMovieFragmentBoxes

(‘moof’);and onlyutilizeeffectivesampleparameters(sample_index, sample_duration,

sample_size,and sample_flags)infieldsandparameterslocatedineachMovieFragment,eitherintheTrackFragmentHeaderBox(‘tfhd’)orTrackRunBox(‘trun’)(seealsoSection2.3.17);and

onlybeaddressedusingbyteoffsetsrelativetothefirstbyteoftheMovieFragmentBoxes(‘moof’)(seealsoSection2.3.19andSection2.3.20).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |31

TheTrackFragmentBox(‘traf’)SHALLcontainaTrackFragmentBaseMediaDecodeTimeBox(‘tfdt’),asdefinedin[ISO]Section8.8.12,toprovidedecodestarttimeofthefragment.

ForAVCVideotracksutilizing(‘avc1’)sampleentriesasperSection4.3.1.1,theTrackFragmentBox(‘traf’)MAY: containaTrickPlayBox(‘trik’),asdefinedinSection2.2.7,tofacilitaterandomaccess

andtrickplaymodes(i.e.fastforwardandrewind);and containanAVCNALUnitStorageBox(‘avcn’)asdefinedinSection2.2.2.IfanAVCNAL

UnitStorageBoxispresentinanyAVCVideotrackfragmentintheDCC,oneSHALLbepresentinallAVCvideotrackfragmentsinthatfile.

TheTrackFragmentBox(‘traf’)SHALLcontainexactlyoneTrackFragmentRunBox(‘trun’),asdefinedinSection2.3.20.

ForDCCMovieFragmentswhichcontainencryptedsamples: theTrackFragmentBox(‘traf’)SHALLcontainexactlyoneSampleAuxiliaryInformation

OffsetsBox(‘saio’)withanaux_info_typevalueof"cenc"andexactlyoneSampleAuxiliaryInformationSizesBox(‘saiz’)withanaux_info_typevalueof"cenc",asspecifiedinSection2.2.7;and

theTrackFragmentBox(‘traf’)SHALLcontainexactlyoneSampleEncryptionBox(‘senc’),asspecifiedinSection2.2.4;and

iftheDCCMovieFragmentcontainssampleswithdifferentencryptionkeys,theDCCMovieFragmentsSHALLcontainasamplegroupandsamplegroupdescription(‘seig’)asspecifiedin[CENC].

TheMediaDataBox(‘mdat’)inaDCCMovieFragmentSHALLcomplywithSection2.3.22ofthisSpecification,andthefollowingrequirements: TheMediaDataBoxintheDCCMovieFragmentSHALLcontainallofthemediasamples(i.e.audio,

videoorsubtitles)referredtobytheTrackFragmentBoxthatfallswithinthesameDCCMovieFragment.

ToensureDCCMovieFragmentscontainingdifferentmediatypeswithparalleldecodetimesareplacedincloseproximitytooneanotherinaDCC,DCCMovieFragmentsSHALLbeorderedinsequencebasedonthedecodetimeofthefirstsampleineachDCCMovieFragment(i.e.themoviefragmentstarttime).WhenDCCMovieFragmentssharethesamestarttimes,smallersizefragmentsSHOULDbestoredfirst.

Note:Inthecaseofsubtitletracks,themoviefragmentstarttimemightnotequaltheactualtimeofthefirstappearanceoftextorimagesintheCFF‐TTdocumentstoredinthefirstandonlysampleinDCCMovieFragment.

Additionalconstraintsfortracksaredefinedcorrespondingtothetrack’smediatype,asfollows: Videotracks:SeeSection4.2DataStructureforVideoTrack. Audiotracks:SeeSection5.2DataStructureforAudioTrack.

Subtitletracks:SeeSection6.7DataStructureforCFF‐TTTrack.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |32

Figure2‐3–DCCMovieFragmentStructure

2.1.4 DCC Footer

TheDCCFootercontainsOptionalMulti‐TrackMetadataandoptionalinformationforsupportingrandomaccessintotheaudio‐visualcontentsofthefile,asshowninFigure24‐.TheboxrequirementsdefinedforDCCFooterSHALLapplytotheDCCafterthelastboxinthelastDCCMovieFragmentthroughtotheendoftheDCC.Theseboxesaredefinedincompliancewith[ISO]withthefollowingadditionalconstraintsandrequirements:

TheDCCFooterMAYcontainaMetaBox(‘meta’),asdefinedin[ISO]Section8.11.1.IftheMetaBox(‘meta’),ispresentintheDCCFooter:

DCC Movie Fragment

Mandatory Box Op onal Box

Movie Data Box (‘mdat’) Movie Fragment samples (all of one type)….

MovieFragmentBox(‘moof’)

Movie Header Box (‘mfhd’)

Track Fragment Box (‘traf’)

Track Fragment Header Box (‘tfhd’)

Event Message Box (‘emsg’)

Track Fragment Base Media Decode Time Box (‘tfdt’)

Trick Play Box (‘trik’) – not recommended, might be present for AVC Video tracks

AVC NAL Unit Storage Box (‘avcn’) – not recommended, might be present for AVC Video tracks

Sample Encryp on Box (‘senc’)

Sample Auxiliary Informa on Offsets Box (‘saio’)

Sample Auxiliary Informa on Sizes Box (‘saiz’)

Sample to Group Box (‘sbgp’)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |33

TheMetaBox(‘meta’)SHALLcontainaHandlerReferenceBox(‘hdlr’)forCommonFileMetadata,asdefinedinSection2.3.3.

TheHandlerReferenceBoxforCommonFileMetadataSHALLbefollowedbyanXMLBox(‘xml’)forOptionalMetadata,asdefinedinSection2.3.4.2.

TheMetaBox(‘meta’)MAYcontainanItemLocationBox(‘iloc’)toenableXMLreferencestoimagesandanyotherbinarydatacontainedinthefile,asdefinedin[ISO]Section8.11.3.Ifanysuchreferenceexists,thentheItemLocationBoxSHALLexist.

ImagesandanyotherbinarydatareferredtobythecontentsoftheXMLBoxforOptionalMetadataSHALLbestoredinone‘idat’BoxwhichSHOULDfollowalloftheboxestheMetaBoxcontains.EachitemSHALLhaveacorrespondingentryinthe‘iloc’describedaboveandthe‘iloc’construction_methodfieldSHALLbesetto‘1’.

TheDCCFooterMAYcontainaMovieFragmentRandomAccessBox(‘mfra’),asdefinedin[ISO]Section8.8.9.IftheMovieFragmentRandomAccessBox(‘mfra’)ispresentintheDCCFooter: MovieFragmentRandomAccessBox(‘mfra’)SHALLbethelastfile‐levelboxintheDCC

Footer. TheMovieFragmentRandomAccessBox(‘mfra’)SHALLcontainoneTrackFragment

RandomAccessBox(‘tfra’),asdefinedinSection2.3.18,foreachtrackinthefile. ThelastboxcontainedwithintheMovieFragmentRandomAccessBoxSHALLbeaMovie

FragmentRandomAccessOffsetBox(‘mfro’),asdefinedin[ISO]Section8.8.11.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |34

Figure2‐4–StructureofaDCCFooter

2.2 ExtensionstoISOBaseMediaFileFormat

2.2.1 Standards and Conventions

2.2.1.1 ExtensionBoxRegistration

TheextensionboxesdefinedinSection2.2arenotpartoftheoriginal[ISO]specificationbuthavebeenregisteredwith[MP4RA].

2.2.1.2 Notation

Tobeconsistentwith[ISO],thissectionusesaclass‐basednotationwithinheritance.Theclassesareconsistentlyrepresentedasstructuresinthefileasfollows:Thefieldsofaclassappearinthefilestructureinthesameordertheyarespecified,andallfieldsinaparentclassappearbeforefieldsforderivedclasses.

DCC Footer

Meta Box (‘meta’) for Mul ‐Track Op onal Metadata

Handler Reference Box (‘hdlr’) for Common File Metadata

Mandatory Box Op onal Box

Movie Fragment Random Access Box (‘mfra’)

XML Box (‘xml’) for Op onal Metadata

Track Fragment Random Access Box (‘tfra’) – 1

Track Fragment Random Access Box (‘tfra’) – n

Movie Fragment Random Access Offset Box (‘mfro’)

Item Loca on Box (‘iloc’) for XML references to images and other data

Item Data Box (‘idat’) for storage of referenced images and other data

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |35

Forexample,anobjectspecifiedas:aligned(8) class Parent ( unsigned int(32) p1_value, ..., unsigned int(32) pN_value) { unsigned int(32) p1 = p1_value; ... unsigned int(32) pN = pN_value; } aligned(8) class Child ( unsigned int(32) p1_value, ... , unsigned int(32) pN_value, unsigned int(32) c1_value, ... , unsigned int(32) cN_value) extends Parent (p1_value, ..., pN_value) { unsigned int(32) c1 = c1_value; ... unsigned int(32) cN = cN_value; }

Mapsto:aligned(8) struct { unsigned int(32) p1 = p1_value; ... unsigned int(32) pN = pN_value; unsigned int(32) c1 = c1_value; ... unsigned int(32) cN = cN_value; }

Thissectionusesstringsyntaxelements.ThesefieldsSHALLbeencodedasastringofUTF‐8bytesasdefinedin[UNICODE],followedbyasinglenullbyte(0x00).Whenanemptystringvalueisprovided,thefieldSHALLbeencodedasasinglenullbyte(0x00)."Whenaboxcontainsotherboxesaschildren,childboxesalwaysappearafteranyexplicitlyspecifiedfields,andcanappearinanyorder(i.e.siblingboxescanalwaysbere‐orderedwithoutbreakingcompliancetothespecification).

2.2.2 Content Information Box (‘coin’)

BoxType ‘coin’

Container MovieBox(‘moov’)Mandatory YesQuantity OneTheContentInformationBox(‘coin’)containsthefilemetadatanecessarytoidentify,licenseandplaycontentwithinanEcosystem.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |36

2.2.2.1 2Syntax

aligned(8) class ContentInformationBox extends FullBox(‘coin’, version=1, flags=0) { string mime_subtype_name; string profile-level-idc; string codecs; string protection; string languages; unsigned int(8) brand_entry_count; for( int i=0; i < brand_entry_count; i++) { unsigned int(32) iso_brand; unsigned int(32) version } unsigned int(8) id_entry_count; for( int i=0; i < id_entry_count; i++) { string namespace; string asset_id; } unsigned int(8) id_dependent_entry_count; for( int i=0; i < id_dependent_entry_count; i++) { string dependent_namespace; string dependent_asset_id; } }

2.2.2.2 Semantics

mime_subtype_name‐identifiestheMediaTypeassociatedwiththeDCCandSHALLbesetinaccordancewiththeMediaTypeTemplaterequirementsdefinedinAnnexD.

profile-level-idc‐SHALLbesetinaccordancewiththeprofile-level-idcparameterrequirementsdefinedinAnnexD.

codecs‐SHALLbesetinaccordancewiththecodecsparameterrequirementsdefinedinAnnexD.

protection‐SHALLbesetinaccordancewiththeprotectedparameterrequirementsdefinedinAnnexD.

languages‐SHALLbesetinaccordancewiththelanguagesparameterrequirementsdefinedinAnnexD.

brand_entry_count‐SHALLbesettothenumberofISObrandentriescontainedintheContentInformationBox(‘coin’).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |37

iso_brand‐SHALLbesettoa[MP4RA]fourcharactercodeassociatedwithanISObrandwithwhichtheDCCiscompatible.OnebrandentrySHALLexistforeachsuchISObrand.AllbrandssignaledintheFileTypeBox('ftyp'),includingbothmajor_brandandcompatible_brandvalues,SHALLbesignaledhere.TheDCCSHALLconformtotherequirementsofanyISObrandsignaledhere.

version‐SHALLbesettotheversionofthespecificationassociatedwiththeISObrandasdefinedbytherelevantspecification.Forbrandsdefinedby[ISO],thefieldvaluewillbesettotheintegerrepresentationof‘4’(torepresent“fourthedition”).

AnyISObrandsdefinedinthisspecificationSHALLbesettotheintegerrepresentationofDMEDIA_VERSION_NOPOINTS(definedinAnnexA.).

id_entry_count–SHALLbesettothenumberofassetIDentriescontainedintheContentInformationBox(‘coin’).

namespace‐SHALLbesettothenamespaceassociatedwiththeassetidentifier.ThenamespaceindicatedSHOULDbeanamespacethatisregisteredorotherwisemanagede.g.for[RFC2141]thenamespacefieldcouldbesetto“urn:<NID>”orfor[RFC4151]thenamespacefieldcouldbe“tag:<taggingEntity>".

asset-id‐SHALLidentifythecontentrenditionwithinthedefinednamespaceincludingthenamespace.Theasset-idfieldSHALLbegloballyunique.

dependent_entry_count–SHALLbesettothenumberofdependentassetIDentriescontainedintheContentInformationBox(‘coin’).IftherearenodependentassetsthenthisfieldSHALLbesetto0.

dependent_namespace‐SHALLbesettothenamespaceassociatedwiththeassetidentifierofadependentasset.ThenamespaceindicatedSHOULDcomplywiththenamespaceregistration/managementrequirementsdefinedforthenamespacefield.

dependent_asset_id‐SHALLidentifythedependentassetwithinthedefinednamespaceincludingthenamespace.ThisfieldisusedtosignalthattheDCCdependsonanotherassettodecodetheDCC.

2.2.3 AVC NAL Unit Storage Box (‘avcn’)

TheAVCNALUnitStorageBox(‘avcn’)SHOULDNOTbeused.Insteadsoleuseofthe(‘avc3’)in‐bandsampleentriesasperSection4.3.1.1isrecommended.TheAVCNALUnitStorageBox(‘avcn’)SHALLNOTappearinAVCVideotrackswhichincludethe(‘avc3’)in‐bandsampleentries(definedinSection4.3.1.1)andSHALLNOTappearinHEVCVideotracks.BoxType ‘avcn’

Container TrackFragmentBox(‘traf’)Mandatory NoQuantity Zero,oroneinanAVCtrackfragmentinafileAnAVCNALUnitStorageBoxSHALLcontainanAVCDecoderConfigurationRecord,asdefinedinsection5.3.3.1of[ISOVIDEO].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |38

2.2.3.1 Syntax

aligned(8) class AVCNALBox extends Box(‘avcn’) { AVCDecoderConfigurationRecord() AVCConfig; }

2.2.3.2 Semantics

AVCConfig–SHALLcontainsufficientsequenceParameterSetNALUnitandpictureParameterSetNALUnitentriestodescribetheconfigurationsofallsamplesreferencedbythecurrenttrackfragment.

Note:AVCDecoderConfigurationRecordcontainsatableofeachuniqueSequenceParameterSetNALunitandPictureParameterSetNALunitreferencedbyAVCSliceNALUnitscontainedinsamplesinthistrackfragment.Asdefinedin[ISOVIDEO]Section5.2.4.1.2semantics: sequenceParameterSetNALUnitcontainsaSPSNALUnit,asspecifiedin[H264].SPSsshalloccurin

orderofascendingparametersetidentifierwithgapsbeingallowed. pictureParameterSetNALUnitcontainsaPPSNALUnit,asspecifiedin[H264].PPSsshalloccurin

orderofascendingparametersetidentifierwithgapsbeingallowed.

2.2.4 Sample Encryption Box (‘senc’)

BoxType ‘senc’

Container TrackFragmentBox(‘traf’)Mandatory No(Yes,iftrackfragmentisencrypted)Quantity ZerooroneTheSampleEncryptionBoxcontainsthesamplespecificencryptiondata,includingtheinitializationvectorsneededfordecryptionand,optionally,alternativedecryptionparameters.Itisusedwhenthesampledatainthefragmentmightbeencrypted.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |39

2.2.4.1 Syntax

aligned(8) class SampleEncryptionBox extends FullBox(‘senc’, version=0, flags) { unsigned int(32) sample_count; { unsigned int(IV_size*8) InitializationVector; if (flags & 0x000002) { unsigned int(16) subsample_count; { unsigned int(16) BytesOfClearData; unsigned int(32) BytesOfEncryptedData; } [ subsample_count ] } }[ sample_count ] }

2.2.4.2 Semantics

flagsisinheritedfromtheFullBoxstructure.TheSampleEncryptionBoxcurrentlysupportsthefollowingbitvalues:

0x2–UseSubSampleEncryption IftheUseSubSampleEncryptionflagisset,thenthetrackfragmentthatcontainsthis

SampleEncryptionBoxSHALLusethesub‐sampleencryptionasdescribedinSection3.2.Whenthisflagisset,sub‐samplemappingdatafollowseachInitilizationVector.Thesub‐samplemappingdataconsistsofthenumberofsub‐samplesforeachsample,followedbyanarrayofvaluesdescribingthenumberofbytesofcleardataandthenumberofbytesofencrypteddataforeachsub‐sample.

sample_countisthenumberofencryptedsamplesinthistrackfragment.ThisvalueSHALLbeeitherzero(‘0’)orthetotalnumberofsamplesinthetrackfragment.

InitializationVectorSHALLconformtothedefinitionspecifiedin[CENC]Section9.2.OnlyoneIV_sizeSHALLbeusedwithinafile,orzero(‘0’)whenasampleisunencrypted.SelectionofInitializationVectorvaluesSHOULDfollowtherecommendationsof[CENC]Section9.3. SeeSection3.2forfurtherdetailsonhowencryptionisapplied.

subsample_countSHALLconformtothedefinitionspecifiedin[CENC]Section9.2. BytesOfClearDataSHALLconformtothedefinitionspecifiedin[CENC]Section9.2. BytesOfEncryptedDataSHALLconformtothedefinitionspecifiedin[CENC]Section9.2.

2.2.5 Trick PlayBox (‘trik’)

TheTrickPlayBox(‘trik’)SHOULDNOTbeused.TheTrickPlayBox(‘trik’)SHALLNOTappearinAVCVideotrackswhichutilizethe(‘avc3’)in‐bandsampleentries(definedinSection4.3.1.1)andSHALLNOTappearinHEVCVideotracks.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |40

BoxType ‘trik’

Container TrackFragmentBox(‘traf’)Mandatory No(MaybeusedforAVCVideotrackswhichinclude(‘avc1’)sampleentriesasperSection

4.3.1.1)Quantity ZerooroneThisboxanswersthreequestionsaboutAVCVideosampledependency:

1. Isthissampleindependentlydecodable(i.e.doesthissampleNOTdependonothers)?2. Cannormal‐speedplaybackbestartedfromthissamplewithfullreconstructionofallsubsequent

picturesinoutputorder?3. Canthissamplebediscardedwithoutinterferingwiththedecodingofaknownsetofother

samples?Whenperformingrandomaccess(i.e.startingnormalplaybackatalocationwithinthetrack),beginningdecodingatsamplesofpicturetype1and2ensuresthatallsubsequentpicturesinoutputorderwillbefullyreconstructable.Note:Picturesoftype3(unconstrainedI‐picture)canbefollowedinoutputorderbysamplesthatreferencepicturespriortotheentrypointindecodingorder,preventingthosepicturesfollowingtheI‐picturefrombeingfullyreconstructedifdecodingbeginsattheunconstrainedI‐picture.Whenperforming“trick”modeplayback,suchasfastforwardorreverse,itispossibletousethedependencylevelinformationtolocateindependentlydecodablesamples(i.e.I‐pictures),aswellaspicturesthatcanbediscardedwithoutinterferingwiththedecodingofsubsetsofpictureswithlowerdependency_levelvalues.IftheTrickPlayBox(‘trik’)ispresentinanAVCVideotrack,itSHALLbepresentintheTrackFragmentBox(‘traf’)forallAVCVideotrackfragments.AsthisboxappearsinaTrackFragmentBox,sample_countSHALLbetakenfromthesample_countinthecorrespondingTrackFragmentRunBox(‘trun’).Allindependentlydecodablesamplesinthevideotrackfragment(i.e.I‐frames)SHALLhaveacorrectpic_typevalueset(value1,2or3);andallothersamplesSHOULDhavethecorrectpic_typeanddependency_levelsetforallpicturescontainedinthevideotrackfragment.

2.2.5.1 Syntax

aligned(8) class TrickPlayBox extends FullBox(‘trik’, version=0, flags=0) { for (i=0; I < sample_count; i++) { unsigned int(2) pic_type; unsigned int(6) dependency_level; } }

2.2.5.2 Semantics

pic_typetakesoneofthefollowingvaluesforAVCvideo: 0–Thetypeofthissampleisunknown. 1–ThissampleisanIDRpicture.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |41

2–ThissampleisaRandomAccess(RA)I‐picture,asdefinedinSection4.2.6. 3–ThissampleisanunconstrainedI‐picture.

dependency_levelindicatesthelevelofdependencyofthissample,asfollows: 0x00–Thedependencylevelofthissampleisunknown. 0x01to0x3E–Thissampledoesnotdependonsampleswithagreaterdependency_level

valuesthanthisone. 0x3F–Reserved.

2.2.6 Clear Samples within an Encrypted Track

“Encryptedtracks”MAYcontainunencryptedsamples.An“Encryptedtrack”isatrackwhoseSampleEntryhasthecodingnameofeither‘encv’or‘enca’andhasTrackEncryptionBox(‘tenc’)withIsEncryptedvalueof0x1.IfsamplesinaDCCMovieFragmentforan“encryptedtrack”arenotencrypted,theTrackFragmentBox(‘traf’)oftheMovieFragmentBox(‘moof’)inthatDCCMovieFragmentSHALLcontainaSampletoGroupBox(‘sbgp’)andaSampleGroupDescriptionBox(‘sgpd’).TheentryintheSampletoGroupBox(‘sbgp’)describingtheunencryptedsamplesSHALLhaveagroup_description_indexthatpointstoaCencSampleEncryptionInformationVideoGroupEntryorCencSampleEncryptionInformationAudioGroupEntrystructurethathasanIsEncrypted of‘0x0’(Notencrypted)andaKIDofzero(16bytesof‘0’).TheCencSampleEncryptionInformationVideoGroupEntryorCencSampleEncryptionInformationAudioGroupEntryreferencedbytheSampletoGroupBox(‘sbgp’)inaTrackFragmentBox(‘traf’)SHALLbepresentatthereferencedgroupdescriptionindexlocationintheSampleGroupDescriptionBox(‘sgpd’)inthesameTrackFragmentBox(‘traf’).Note:Thegroupdescriptionindexesstartat0x10001asspecifiedin[ISO].TrackfragmentsSHALLNOThaveamixofencryptedandunencryptedsamples.Forclarity,thisdoesnotconstrainsubsampleencryptionasdefinedin[CENC]forNALStructuredVideotracks.Ifatrackfragmentisnotencrypted,thentheSampleEncryptionBox(‘senc’),andrelatedSampleAuxiliaryInformationOffsetsBox(‘saio’)andSampleAuxiliaryInformationSizesBox(‘saiz’)SHALLbeomitted.

2.2.7 Storing Sample Auxiliary Information in a Sample Encryption Box

Forencryptedtrackfragments,theTrackFragmentBox(‘traf’)SHALLcontainaSampleAuxiliaryInformationOffsetsBox(‘saio’)withanaux_info_typevalueof"cenc"asdefinedin[CENC]Section7toprovidesample‐specificencryptiondata.ThisSampleAuxiliaryInformationOffsetsBox(‘saio’)isconstrainedasfollows:

TheoffsetfieldSHALLpointtothefirstbyteofthefirstinitializationvectorintheSampleEncryptionBox('senc');and

Theentry_countfieldSHALLbe1asthedataintheSampleEncryptionBox(‘senc’)iscontiguousforallofthesamplesinthemoviefragment(theCencSampleAuxiliaryDataFormatstructurehasthesameformatasthedataintheSampleEncryptionBox('senc'),bydesign);and

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |42

theoffsetfieldoftheentrySHALLbecalculatedasthedifferencebetweenthefirstbyteofthecontainingMovieFragmentBox(‘moof’)andthefirstbyteofthefirstInitializationVectorintheSampleEncryptionBox(assumingmoviefragmentrelativeaddressingwherenobasedataoffsetisprovidedinthetrackfragmentheader).

ThesizeofthissampleauxiliarydataSHALLbespecifiedinaSampleAuxiliaryInformationSizesBox(‘saiz’)withanaux_info_typevalueof"cenc",asdefinedin[CENC]Section7.ThisSampleAuxiliaryInformationSizesBox(‘saiz’)isconstrainedasfollows:

thesample_countfieldSHALLmatchthesample_countintheSampleEncryptionBox('senc');and

thedefault_sample_info_sizeSHALLbezero(‘0’)ifthesizeoftheper‐sampleinformationisnotthesameforallofthesamplesintheSampleEncryptionBox('senc').Notethatsampleencryptioninformation,suchasinitializationvectors,referencedbytheSampleAuxiliaryInformationOffsetsBox(‘saio’)takesprecedenceoversampleencryptioninformationstoredintheSampleEncryptionBox(‘senc’)‐thisspecificationdefinesstorageinaSampleEncryptionBox(‘senc’)ineachmoviefragment,butoperationssuchasdefragmentationthatcanoccurinplayersorothersystemsrelyonSampleAuxiliaryInformationOffsetsBox(‘saio’)offsetpointersthatcanrefertoanystoragelocation.

2.3 ConstraintsonISOBaseMediaFileFormatBoxes

2.3.1 File TypeBox (‘ftyp’)

FilesconformingtotheCommonFileFormatSHALLincludeaFileTypeBox(‘ftyp’)asspecifiedby[ISO]Section4.3withthefollowingconstraints: The‘ccff’ISObrandSHALLbesetasacompatible_brandintheFileTypeBox(‘ftyp’).Note:

Signalingofthe‘ccff’brandindicatesthatthefilefullycomplieswithSections1throughto6ofthisspecification. Ifthemajor_brandfieldissetto‘ccff’,theminor_versionfieldSHALLbesettothe

integerrepresentationofDMEDIA_VERSION_NOPOINTS(definedinAnnexA.). Note:compatible_brandsmightincludeadditionalbrandsthatthefileconformstosuchas

‘iso6’.

2.3.2 Movie Header Box (‘mvhd’)

TheMovieHeaderBoxinaDCCSHALLconformto[ISO]Section8.2.2withthefollowingadditionalconstraints:

ThevalueofthedurationfieldSHALLbesettoavalueofzero(‘0’). ThefollowingfieldsSHALLbesettotheirdefaultvaluesasdefinedin[ISO]:

rate,volumeandmatrix.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |43

2.3.3 Handler Reference Box (‘hdlr’) for Common File Metadata

TheHandlerReferenceBox(‘hdlr’)forCommonFileMetadataSHALLconformto[ISO]Section8.4.3withthefollowingadditionalconstraints:

Thevalueofthehandler_typefieldSHALLbe‘cfmd’,indicatingtheCommonFileMetadatahandlerforparsingrequiredandoptionalmetadatadefinedinSection4of[DMeta].

ForMulti‐TrackRequiredMetadata,thevalueofthenamefieldSHOULDbe“RequiredMetadata”. ForMulti‐TrackOptionalMetadata,thevalueofthenamefieldSHOULDbe“OptionalMetadata”.

2.3.4 XML Box (‘xml’) for CommonFile Metadata

TwotypesofXMLBoxesaredefinedinthisspecification.OnecontainsMulti‐TrackRequiredMetadata,andtheothercontainsMulti‐TrackOptionalMetadata.OthertypesofXMLBoxesnotdefinedhereMAYexistwithinaDCC.

2.3.4.1 XMLBox(‘xml’)forMulti‐TrackRequiredMetadata

TheXMLBoxforMulti‐TrackRequiredMetadataSHALLconformto[ISO]Section8.11.2withthefollowingadditionalconstraints:

ThexmlfieldSHALLcontainawell‐formedXMLdocumentwithcontentsthatconformtoSection4.1of[DMeta].

2.3.4.2 XMLBox(‘xml’)forMulti‐TrackOptionalMetadata

TheXMLBoxforMulti‐TrackOptionalMetadataSHALLconformto[ISO]Section8.11.2withthefollowingadditionalconstraints:

ThexmlfieldSHALLcontainawell‐formedXMLdocumentwithcontentsthatconformtoSection4.2of[DMeta].

2.3.5 Track Header Box (‘tkhd’)

TrackHeaderBoxesinaDCCSHALLconformto[ISO]Section8.3.1withthefollowingadditionalconstraints:

ThevalueofthedurationfieldSHALLbesettoavalueofzero(‘0’). ThefollowingfieldsSHALLbesettotheirdefaultvaluesasdefinedin[ISO]:

matrix ThefollowingfieldSHALLbesettoitsdefaultvalueasdefinedin[ISO],unlessspecifiedotherwise

inthisspecification: layer Note:Section6.7.1.1specifiesthelayerfieldvalueforsubtitletracks.

Thewidthandheightfieldsforanon‐visualtrack(i.e.audio)SHALLbe0. ThewidthandheightfieldsforavisualtrackSHALLspecifythetrack’svisualpresentationsizeas

fixed‐point16.16valuesexpressedinsquarepixelsafterdecodercroppingparametershavebeenapplied,withoutcroppingofvideosamplesin“overscan”regionsoftheimageandafterscalinghas

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |44

beenappliedtocompensatefordifferencesinvideosamplesizesandshapes;e.g.NTSCandPALnon‐squarevideosamples,andsub‐samplingofhorizontalorverticaldimensions.Trackvideodataisnormalizedtothesedimensions(logically)beforeanytransformationordisplacementcausedbyacompositionsystemoradaptationtoaparticularphysicaldisplaysystem.Trackandmoviematrices,ifused,alsooperateinthisuniformlyscaledspace. Note:Section4.2.1specifiesadditionalconstraintsforVideotracksandSection6.7.2

specifiesadditionalconstraintsforSubtitletracks.

2.3.6 Media Header Box (‘mdhd’)

MediaHeaderBoxesinaDCCSHALLconformto[ISO]Section8.4.2withthefollowingadditionalconstraints:

ThevalueofthedurationfieldSHALLbesettoavalueofzero(‘0’);Note:ThedurationfieldintheMediaHeaderBox(‘mdhd’)appliestotheTrackBox(‘trak’),whichcontainsnomediasamplesinDCCs.Thedurationofanentirefragmentedmoviecanoptionallybestoredinthefragment_durationfieldoftheMovieExtendsHeaderBox(‘mehd’),whichisequaltothesumofalltrackfragmentdurationsinthelongesttrackinthemovie.

ThetimescalefieldSHOULDcontainavaluethatisexactlydivisiblebysampleduration(thisallowsafixeddefaultsampledurationratherthanatablewithdifferentvaluespersample,whichwouldberequiredifthetimebasecausesroundingorsamplingerrorsonfixeddurationaudioandvideosamples);

ThelanguagefieldSHOULDrepresenttheoriginalreleaselanguageofthecontent.Note:RequiredMetadata(asdefinedinSection2.1.2.1)providesnormativelanguagedefinitionsforCFF.

2.3.7 VideoMedia Header (‘vmhd’)

VideoMediaHeaderBoxesinaDCCSHALLconformto[ISO]Section8.4.5withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLbesettotheirdefaultvaluesasdefinedin[ISO]Section8.4.5: version=0 graphicsmode=0 opcolor={0, 0, 0}

2.3.8 Sound Media Header (‘smhd’)

SoundMediaHeaderBoxesinaDCCSHALLconformto[ISO]Section8.4.5withthefollowingadditionalconstraints:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |45

ThefollowingfieldsSHALLbesettotheirdefaultvaluesasdefinedin[ISO]Section8.4.5: version=0

2.3.9 Subtitle Media Header Box (‘sthd’)

SubtitleMediaHeaderBoxesinaDCCSHALLconformto[ISO]Section8.4.5withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLbesettotheirdefaultvaluesasdefinedin[ISO]Section8.4.5: version=0

2.3.10 Data Reference Box (‘dref’)

DataReferenceBoxesinaDCCSHALLconformto[ISO]Section8.7.2withthefollowingadditionalconstraints:

TheDataReferenceBox(‘dref’)SHALLcontainasingleentrywiththeentry_flagsfieldsetto0x000001(whichmeansthatthemediadataisinthesamefileastheMovieBoxcontainingthisdatareference).

2.3.11 Sample Description Box (‘stsd’)

SampleDescriptionBoxesinaDCCSHALLconformtoversion0asdefinedin[ISO]Section8.5.2withthefollowingadditionalconstraints:

Sampleentriesforencryptedtracks(thosecontaininganyencryptedsampledata)SHALLencapsulatetheexistingsampleentrywithaProtectionSchemeInformationBox(‘sinf’)thatconformstoSection2.3.14.

Forvideotracks,avisualsampleentrySHALLbeused.DesignrulesarespecifiedinSection4.2.2. Foraudiotracks,anaudioSampleentrySHALLbeused.DesignrulesarespecifiedinSection5.2.6. ForsubtitletracksasubtitlesampleentrySHALLbeused.DesignrulesarespecifiedinSection

6.7.1.5.

2.3.12 ProtectionScheme Information Box (‘sinf’)

TheDCCSHALLuseCommonEncryptionasdefinedin[CENC]andfollowSchemeSignalingasdefinedin[CENC]Section4.TheDCCMAYincludemorethanone'sinf'box.

2.3.13 Decoding Time toSample Box (‘stts’)

DecodingTimetoSampleBoxesinaDCCSHALLconformto[ISO]Section8.6.1.2withthefollowingadditionalconstraints:

Theentry_countfieldSHOULDhaveavalueofzero(‘0’).

2.3.14 Sample to Chunk Box(‘stsc’)

SampletoChunkBoxesinaDCCSHALLconformto[ISO]Section8.7.4withthefollowingadditionalconstraints:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |46

Theentry_countfieldSHALLbesettoavalueofzero(‘0’).

2.3.15 Sample Size Boxes (‘stsz’ or‘stz2’)

Boththesample_sizeandsample_countfieldsofthe‘stsz’boxSHALLbesettozero(‘0’).Thesample_countfieldofthe‘stz2’boxSHALLbesettozero(‘0’).TheactualsamplesizeinformationcanbefoundintheTrackFragmentRunBox(‘trun’) forthetrack.Note:thisisbecausetheMovieBox(‘moov’)containsnomediasamples.

2.3.16 Chunk Offset Box (‘stco’)

ChunkOffsetBoxesinaDCCSHALLconformto[ISO]Section8.7.5withthefollowingadditionalconstraints:

Theentry_countfieldSHALLbesettoavalueofzero(‘0’).

2.3.17 Track Extends Box (‘trex’)

TrackExtendsBoxes(‘trex’)inaDCCSHALLconformto[ISO]Section8.8.3.DCCsSHALLNOTrelyondefaultflagsorparametersintheTrackExtendsBox(‘trex’)locatedintheMovieBox(‘moov’),including:

default_sample_description_index

default_sample_duration

default_sample_size

default_sample_flagsNote:DefaultsampleparametersintheTrackExtendsBox(‘trex’)arestoredintheDCCHeader,andmaynotbeavailableforeachMediaSegmentduringdecoding.ValuesintheTrackFragmentRunBox(‘trun’)overridedefaultvaluesintheTrackFragmentHeaderBox(‘tfhd’)whichoverridedefaultvaluesintheTrackExtendsBox(‘trex’);sodefaultvaluescanbesetintheTrackExtendsBox(‘trex’)aslongastheyareduplicatedoroverriddenbyvaluesintheTrackFragmentHeaderBox(‘tfhd’)orTrackFragmentRunBox(‘trun’)sothattheeffectivevaluesarestoredineachmoviefragmente.g.adefaultdurationcanbesetforaudioorvideosamplesintheTrackExtendsBox(‘trex’)andeveryTrackFragmentHeaderBox(‘tfhd’),andthatdurationcanbeinheritedbydefaultbyallsamplesinTrackFragmentRunBoxes(‘trun’).

2.3.18 Movie Fragment Header Box (‘mfhd’)

MovieFragmentHeaderBoxes(‘mfhd’)inaDCCSHALLconformto[ISO]Section8.8.5withthefollowingadditionalconstraints:

MovieFragmentHeaderBoxes(‘mfhd’)SHALLcontainsequence_numbervaluesthataresequentiallynumberedstartingwiththenumber1andincrementingby+1,sequencedbymoviefragmentstorageandpresentationorder.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |47

2.3.19 Track Fragment Header Box (‘tfhd’)

TrackFragmentHeaderBoxes(‘tfhd’)inaDCCSHALLconformto[ISO]Section8.8.7withthefollowingadditionalconstraints:

thebase-data-offset-presentflag(inthetf_flagsfield)SHALLbesettofalseinordertoindicatethatmediasamplesareaddressedusingbyteoffsetsrelativetothefirstbyteoftheMovieFragmentBox(‘moof’);and

thedefault-base-is-moofflag(inthetf_flagsfield)SHALLbesettotrueinordertoindicatethatthedata_offsetfieldintheTrackFragmentRunBox(‘trun’)isalwayscalculatedrelativetothefirstbyteoftheenclosingMovieFragmentBox(‘moof’).

2.3.20 Track Fragment Run Box (‘trun’)

TrackFragmentRunBoxes(‘trun’)inaDCCSHALLconformto[ISO]Section8.8.8withthefollowingadditionalconstraints:

theversionfieldSHALLbesetto‘1’;and

thedata-offset-presentflag(inthetf_flagsfield)SHALLbesettotrueinordertoindicatethatthedata_offsetfieldispresentandcontainsthebyteoffsetfromthestartofthisfragment’sMovieFragmentBox(‘moof’)tothefirstsampleofmediadatainthefollowingMediaDataBox(‘mdat’).

2.3.21 Segment Index Box (‘sidx’)

TheSegmentIndexBox(‘sidx’)SHALLcomplywith[ISO]Section8.16.3withthefollowingadditionalconstraints:

ThetimescalefieldSHALLhavethesamevalueasthetimescalefieldintheMediaHeaderBox(‘mdhd’)withinthesametrack;and

➢thereference_IDfieldSHALLbesettothetrack_IDoftheISOMediatrackasdefinedintheTrackHeaderBox(‘tkhd’).

2.3.22 Media Data Box (‘mdat’)

EachDCCMovieFragmentcontainsaninstanceofaMediaDataboxformediasamples.ThedefinitionofthisboxcomplieswiththeMediaDataBox(‘mdat’)definitionin[ISO]Section8.1.1withthefollowingadditionalconstraints:

EachinstanceofthisboxSHALLcontainonlymediasamplesforasingletrackfragmentofmediacontent(i.e.audio,video,orsubtitlesfromonetrack).Inotherwords,allsampleswithinaninstanceofthisboxbelongtothesameDCCMovieFragment.

2.3.23 Track Fragment Random Access Box (‘tfra’)

TrackFragmentRandomAccessBoxesinaDCCSHALLconformto[ISO]Section8.8.10withthefollowingadditionalconstraint:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |48

AtleastoneentrySHALLexistforeachfragmentinthetrackthatreferstothefirstrandomaccessiblesampleinthefragment.

2.4 Inter‐trackSynchronization

Therearetwotechniquesavailabletoshiftdecodingandcompositiontimelinestoguaranteeaccurateinter‐tracksynchronization:1)usenegativecompositionoffsets;or2)useeditlists.Thesetechniquesareusedwhenthereisreorderingofvideoframes,and/ormisalignmentofinitialvideoandaudioframeboundariestoachieveaccurateinter‐tracksynchronization.Acombinationofthesetechniquescanbeused;negativecompositionoffsetstoadjustforreorderingofvideoframeswithoutintroducingpresentationdelay,andeditlistsforanaudiotracktoadjustforinitialaudiosyncframeboundarymisalignment.Thissectiondescribeshowtousethesetechniques.

2.4.1 Mapping media timeline to presentationtimeline

NegativecompositionoffsetsintheTrackRunBox(‘trun’)SHALLbeusedtoadjustthecompositiontimeofthefirstpresentedvideosampleinavideotrackfragmenttoequalthedecodetimeofthefirstdecodedsampleinthatfragment.CompositionoffsetsinsubsequentsamplesSHALLreordersamplesforcontinuouspresentationattheintendedframerate.Note:Thisresultsinvideotracksbeingsynchronizedtomoviepresentationtime,andtoaudioandsubtitletrackswhosesamplepresentationtimesalsoequaltheirdecodetimes.TheEditListBox(‘elst’)SHALLNOTbeusedtomapthespecifiedMedia‐Timeinthemediatimelinetothestartofthepresentationtimelineinvideotracks.

2.4.2 Adjusting audiosyncframe boundary misalignments

Toadjustformisalignmentbetweenthestartofthefirstaudiosyncframeboundaryandthestartofthemovietimeline,aneditlisttimelinemappingeditentryMAYbeusedtodefineaninitialoffsetintheaudiotrack.Thismightbenecessarytocorrectforanon‐zeropresentationtimeofthefirstaudiosyncframe‐forexampleaudioencodingbeganearlierandwasthentrimmedtothenearestsyncframetoalignwiththestartofvideopresentation.Unlessaudioandvideoencodersstartsimultaneously,audioandvideoframeboundarieswillusuallynotbealignedbecausetheyhavedifferentdurations.AudiotrackfragmentsSHALLstartwiththefirstsyncframethatoverlapsorstartsatpresentationtimezero.Whenthereisasyncframeboundarymismatchandaccurateinter‐tracksynchronizationisrequired:

Theaudiotimelinemappingeditentryvaluesaresetasfollows:Segment-duration=0Media-Time=initialoffsetMedia-Rate=1

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |49

3 EncryptionofTrackLevelData

3.1 MultipleDRMSupport(Informative)

SupportformultipleDRMsystemsintheCommonFileFormatisaccomplishedbyusingtheCommonEncryptionmechanismdefinedin[CENC],alongwithadditionalmethodsforstoringDRM‐specificinformation.ThestandardencryptionmethodutilizesAES128‐bitinCountermode(AES‐CTR)asdefinedin[AES].EncryptionmetadataisdescribedusingtrackleveldefaultsintheTrackEncryptionBox(‘tenc’)thatcanbeoverriddenusingsamplegroups.ProtectedtracksaresignaledusingtheSchememethodspecifiedin[ISO].DRM‐specificinformationcanbestoredinthenewProtectionSystemSpecificHeaderBox(‘pssh’).Initializationvectorsarespecifiedonasamplebasistofacilitatefeaturessuchasfastforwardandreverseplayback.KeyIdentifiers(KID)areusedtoindicatewhatencryptionkeywasusedtoencryptthesamplesineachtrackorfragment.EachoftheMediaProfiles(seeAnnexB.)defineconstraintsonthenumberandselectionofencryptionkeysforeachtrack,butanyfragmentinanencryptedtrackcanbeunencryptedifidentifiedassuchbytheIsEncrypted fieldinthefragmentmetadata.Bystandardizingtheencryptionalgorithminthisway,thesamefilecanbeusedbymultipleDRMsystems,andmultipleDRMsystemscangrantaccesstothesamefiletherebyenablingplaybackofasinglemediafileonmultipleDRMsystems.ThedifferencesbetweenDRMsystemsarereducedtohowtheyacquirethedecryptionkey,andhowtheyrepresenttheusagerightsassociatedwiththefile.ThedataobjectsusedbytheDRM‐specificmethodsforretrievingthedecryptionkeyandrightsobjectorlicenseassociatedwiththefilearestoredintheProtectionSystemSpecificHeaderBox(‘pssh’)asspecifiedin[CENC].PlayersarerequiredtobecapableofparsingthefilesthatincludethisDRMsignalingmechanism.AnynumberofProtectionSystemSpecificHeaderBoxes(‘pssh’)canbecontainedintheMovieBox(‘moov’)orintheMediaPackagespecifiedby[DDMP];eachboxcorrespondingtoadifferentDRMsystem.TheboxesandDRMsystemareidentifiedbyaSystemID.ThedataobjectsusedforretrievingthedecryptionkeyandrightsobjectarestoredinanopaquedataobjectofvariablesizewithintheProtectionSystemSpecificHeaderBox.ADCCHeaderrequiresthataFreeSpaceBox(‘free’),ifpresent,bethelastboxintheMovieBox,followinganyProtectionSystemSpecificHeaderBoxes(‘pssh’)thatitcancontain.WhenDRM‐specificinformationisaddedintoaDCCitisrequiredthatthetotalsizeoftheDRM‐specificinformationandFreeSpaceBoxremainsconstant,inordertoavoidchangingthefilesizeandinvalidatingbyteoffsetpointersusedthroughoutthemediafile.Decryptionisinitiatedwhenadevicedeterminesthatthefilehasbeenprotectedbyastreamtypeof‘encv’(encryptedvideo)or‘enca’(encryptedaudio)–thisispartoftheISOstandard.TheISOparserexaminestheSchemeInformationboxwithintheProtectionSchemeInformationBoxanddeterminesthatthetrackisencryptedviatheDECEscheme.TheparserthenlooksforaProtectionSystemSpecificHeaderBox(‘pssh’)thatcorrespondstoaDRM,whichitsupports.AdeviceusestheopaquedataintheselectedProtectionSystemSpecificHeaderBoxtoaccomplisheverythingrequiredbytheparticularDRMsystemtoobtainadecryptionkey,obtainrightsobjectsorlicenses,authenticatethecontent,andauthorizetheplaybacksystem.UsingthekeyitobtainsandakeyidentifierintheTrackEncryptionBox(‘tenc’)orasamplegroupdescriptionwithgroupingtypeof‘seig’,whichissharedbyalltheDRMsystems,itcanthendecryptaudioandvideosamples.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |50

3.2 TrackEncryption

EncryptedtrackleveldatainaDCCSHALLusetheencryptionschemedefinedin[CENC]Section9.EncryptedNALStructuredVideotracksSHALLfollowtheschemeoutlinedin[CENC]Section9.6.2,whichdefinesaNALunitbasedencryptionschemetoallowaccesstoNALsandunencryptedNALheadersinanencryptedNALStructuredVideoelementarystream.AllothertypesoftracksSHALLfollowtheschemeoutlinedin[CENC]Section9.5,whichdefinesasimplesample‐basedencryptionscheme.ThefollowingadditionalconstraintsSHALLbeappliedtoallencryptedtracks:

AllkeyidentifiervaluesSHALLbeaUUIDconformingto[RFC4122]andbinaryencodedintheKIDfieldaccordingto[RFC4122]section4.1.2.

CorrespondenceofkeysandKIDvaluesSHOULDbe1:1;i.e.iftwotrackshavethesamekey,thentheywillhavethesameKIDvalue,andviceversa.

ThefollowingadditionalconstraintsSHALLbeappliedtotheencryptionofNALStructuredVideotracks: TheBytesOfEncryptedDatainallNALUnitsubsamplesSHALLbeeitherzero(‘0’)oramultiple

of16;and IfaNALUnitcontainsfewerthan112bytes,theentireNALUnitSHALLbeunencrypted;and

IfaNALUnitcontains112bytesormore,thefirst96ormorebytesofeachNALUnitSHALLbeunencrypted.

Note:thisbyterangeincludestheNALlengthandnal_unit_typefieldsinaNALUnit.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |51

4 VideoElementaryStreams

4.1 Introduction

ThischapterdescribesthevideotrackinrelationtotheISOBaseMediaFileandtheconstraintsoneachvideoformat.ThemappingofvideosequencesandparameterstosamplesanddescriptorsinaDCCisdefinedinSection4.2,specifyingwhichmethodsallowedin[ISO]and[ISOVIDEO]SHALLbeused.

4.2 DataStructureforVideoTrack

CommonFileFormatforvideotrackSHALLcomplywith[ISO]and[ISOVIDEO].Inthissection,theoperationalrulesforboxesandtheircontentsofCommonFileFormatforvideotrackaredescribed.

4.2.1 Track Header Box (‘tkhd’)

Forvideotracks,thefieldsoftheTrackHeaderBox(‘tkhd’)SHALLbesettothevaluesspecifiedbelow.Therearesome“template”fieldsdeclaredtouse;see[ISO].

flags=0x000007,exceptforthecasewherethetrackbelongstoanalternategroup widthandheightmustcorrespondascloselyaspossibletotheactivepictureareaofthevideo

contentandSHALLbesettotheNormalizedDisplayHeightandWidthoftheencodedvideo. TheNormalizedDisplayHeightSHALLbetheverticalsamplecountaftercroppingof

encodedlinepairstotheactiveimageheightindicatedbycroppingparameters. TheNormalizedDisplayWidthSHALLbetheequivalentnumberofhorizontalsquarepixels

aftercroppingandsampleaspectratioscalingtotheactiveimagewidthindicatedbycroppingparameters.

Note:NormalizedDisplaySizeindicatesthevideotrackdisplaysizeafterdecodingandcompensationforsampleshapeandsize.Aplayercanapplyadditionalscalingandadaptationsuchascroppingorpaddingtomatchimagestotheshapeandresolutionofthedisplaycurrentlyinuse.

4.2.2 Sample Description Box (‘stsd’)

TheSampleDescriptionBox(‘stsd’)inavideotrackSHALLincludeaNALStructuredVideoParameterSetthatcontains:

themaximumwidthandheightvaluescorrespondingtothemaximumcroppedhorizontalandverticalsamplecountsindicatedinanySequenceParameterSetinthetrack;and

aDecoderConfigurationRecordwhich: signalsthehighestProfile,Level,andotherparametersinthevideotrackasspecifiedin

[ISOVIDEO]Section8.3.3.1(HEVC)and[ISOVIDEO]Section5.3.3.1(AVC);and containsanarrayofinitializationNALunits(SPSandPPSNALsforAVCVideo,orVPS,SPS,

andPPSNALsforHEVCVideo)containingparametersmatchingthemaximumvaluesindicatedintheDecoderConfigurationRecord.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |52

containsa"MasteringdisplaycolourvolumeSEI”if"MasteringdisplaycolourvolumeSEI”ispresentinthevideotrack.

IftheSampleDescriptionBoxinavideotrackcontainsmorethanonevisualsampleentry,thenthevisualsampleentrywhichsatisfiestherequirementsaboveSHALLbestoredasthefirstvisualsampleentry.

4.2.3 Track Fragment Run Box (‘trun’)

ThesyntaxandvaluesforTrackFragmentRunBox(‘trun’)forvideotracksSHALLconformtoSection2.3.20withthefollowingadditionalconstraints:

Forsamplesinwhichpresentationtimestamp(PTS)anddecodetimestamp(DTS)differ,thesample-composition-time-offsets-presentflagSHALLbesetandcorrespondingvaluesprovided.

Thedata-offset-presentand sample-size-presentflagsSHALLbesetandcorrespondingvaluesprovided.

Thesample-duration-presentflagSHOULDbesetandcorrespondingvaluesprovided. ForAVCSampleEntry(‘avc3’)andHEVCSampleEntry(‘hev1’)NALStructuredVideo

tracks,the'first_sample_flags'SHALLsignalthepicturetypeofthefirstsampleineachDCCMovieFragmentasspecifiedbelow. sample_is_non_sync_sample=0:Ifthefirstsampleisasyncsample. sample_is_non_sync_sample=1:Ifthefirstsampleisnotasyncsample. sample_depends_on=2:IfthefirstsampleisanIframe.

4.2.4 Movie Fragment Box(‘moof’)

MovieFragmentsinvideotracksarerequiredtoconformtothefollowingconstrains: EveryvideotrackMovieFragmentexceptthelastMovieFragmentofavideotrackSHALLhavea

durationofatleastonesecond.ThelastMovieFragmentofavideotrackMAYhaveadurationoflessthanonesecond;and

EveryvideotrackMovieFragmentSHALLhaveadurationnogreaterthan10.01seconds.

4.2.5 Access Unit

ThestructureofanAccessUnitforpicturesinthevideotrackSHALLcomplywiththedatastructuredefinedinTable41‐.

Table4‐1–AccessUnitstructureforpicturesSyntaxElements Mandatory/OptionalAccessUnitDelimiterNAL MandatorySlicedata Mandatory

Asspecifiedin[ISOVIDEO],timinginformationprovidedwithinavideoelementarystreamSHOULDbeignored‐rather,timinginformationprovidedatthefileformatlevelSHALLbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |53

4.2.6 Random Access Points

AsyncsampleorAVCRA‐Isample(seebelow)SHALLoccurevery3.003secondsorlesswithinaNALStructuredVideoTrack.ForAVCelementarystreams,anAVCRandomAccess(RA)I‐pictureisdefinedinthisspecificationasanI‐picturethatisfollowedinoutputorderbypicturesthatdonotreferencepicturesthatprecedetheAVCRAI‐pictureindecodingorder,asshowninFigure4‐1below.

Figure4‐1–ExampleofanAVCRandomAccess(RA)Ipicture

4.3 AVC

4.3.1 Storage of AVC Elementary Streams

AVCvideotracksSHALLcomplywithSection5of[ISOVIDEO].

4.3.1.1 VisualSampleEntry

Thesyntaxandvaluesforvisualsampleentry: SHALLconformtoAVCSampleEntry (‘avc1’)orAVCSampleEntry (‘avc3’)as

definedin[ISOVIDEO].;and SHOULDconformtoAVCSampleEntry (‘avc3’).

IfAVCSampleEntry(‘avc3’)isusedthefollowingrequirementsapply: IfthesampleisaSyncSample,allparametersetsneededfordecodingthatsampleSHALLbe

includedinthesampleitself. IfthesampleisarandomaccesspointthatisnotaSyncSample,allparametersetsneededfor

decodingthatsampleSHALLbeincludedinthesampleitself.

NO

Display Order Random Access (RA) I‐picture

OK

・・・

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |54

4.3.1.2 AVCDecoderConfigurationRecord

SPSNALUnitsandPictureParameterSetNALUnitsMAYbemappedtoAVCDecoderConfigurationRecordasspecifiedin[ISOVIDEO]Section5.3.3“Decoderconfigurationinformation”andSection5.4“DerivationfromISOBaseMediaFileFormat”,withthefollowingadditionalconstraints:

AllSequenceParameterSetNALUnitsmappedtoAVCDecoderConfigurationRecordSHALLconformtotheconstraintsdefinedinSection4.3.2.2.

AllPictureParameterSetNALUnitsmappedtoAVCDecoderConfigurationRecordSHALLconformtotheconstraintsdefinedinSection4.3.2.3.

4.3.2 Constraints on [H264] Elementary Streams

4.3.2.1 Picturetype

AllpicturesSHALLbeencodedascodedframes,andSHALLNOTbeencodedascodedfields.

4.3.2.2 SequenceParameterSets(SPS)

SPSNALUnitsthatoccurwithinaDCCAVCvideotrackSHALLconformto[H264]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLhavepre‐determinedvaluesasfollows: gaps_in_frame_num_value_allowed_flagSHALLbesetto0 vui_parameters_present_flagSHALLbesetto1

ThefollowingfieldsSHOULDhavepre‐determinedvaluesasfollows: frame_mbs_only_flagSHOULDbesetto1

ThevaluesofthefollowingfieldsSHALLNOTchangethroughoutan[H264]elementarystream: profile_idc level_idc

ThevaluesofthefollowingfieldsSHOULDNOTchangethroughoutan[H264]elementarystream: direct_8x8_inference_flag 

IftheareadefinedbythewidthandheightfieldsoftheTrackHeaderBoxofavideotrack(seeSection2.3.5)sub‐sampledtothesampleaspectratiooftheencodedpictureformat,doesnotcompletelyfillallencodedmacroblocks,thenthefollowingadditionalconstraintsapply: frame_cropping_flagSHALLbesetto1toindicatethatAVCcroppingparametersare

present frame_crop_left_offsetandframe_crop_right_offsetSHALLbesetsuchastocrop

thehorizontalencodedpicturetothenearestevenintegerwidth(i.e.2,4,6,…)thatisequaltoorlargerthanthesub‐sampledwidthofthetrack

frame_crop_top_offsetandframe_crop_bottom_offsetSHALLbesetsuchastocroptheverticalpicturetothenearestevenintegerheightthatisequaltoorlargerthanthesub‐sampledheightofthetrack

Note:Giventhedefinitionabove,forMediaProfilesthatsupportdynamicsub‐sampling,ifthesampleaspectratiooftheencodedpictureformatchangeswithinthevideostream(i.e.duetoachangeinsub‐

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |55

sampling),thenthevaluesofthecorrespondingcroppingparametersarerequiredtochangeaccordingly.Thus,itispossibleforAVCcroppingparameterstobepresentinoneportionofan[H264]elementarystream(i.e.wherecroppingisnecessary)andnotanother.Asspecifiedin[H264],whenframe_cropping_flagisequalto0,thevaluesofframe_crop_left_offset,frame_crop_right_offset,frame_crop_top_offset,andframe_crop_bottom_offsetareinferredtobeequalto0.

4.3.2.2.1 VisualUsabilityInformation(VUI)ParametersVUIparametersthatoccurwithinaDCCAVCvideotrackSHALLconformto[H264]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLhavepre‐determinedvaluesasfollows: aspect_ratio_info_present_flagSHALLbesetto1 chroma_loc_info_present_flagSHALLbesetto0 timing_info_present_flagSHALLbesetto1 fixed_frame_rate_flagSHALLbesetto1 pic_struct_present_flagSHALLbesetto1,whenframe_mbs_only_flagissetto0

ThefollowingfieldsSHOULDhavepre‐determinedvaluesasfollows: pic_struct_present_flagSHOULDbesetto1 colour_description_present_flagSHOULDbesetto1

Note:Per[H264],ifthecolour_description_present_flagissetto1,thecolour_primaries,transfer_characteristicsandmatrix_coefficientsfieldsmustbedefinedinthe[H264]elementarystream

overscan_appropriate,ifpresent,SHOULDbesetto0 ThevaluesofthefollowingfieldsSHALLNOTchangethroughoutan[H264]elementarystream:

video_full_range_flag

low_delay_hrd_flagcolour_primaries,whenpresent transfer_characteristics,whenpresent matrix_coefficients,whenpresent

TheconditionofthefollowingSHALLNOTchangethroughoutan[H264]elementarystream: time_scale/num_units_in_tick/2

Note:Therequirementthatfixed_frame_rate_flagbesetto1andtheconditionthattime_scale/num_units_in_tick/2doesnotchangethroughoutastreamensuresafixedframeratethroughoutthe[H264]elementarystream.

ThevaluesofthefollowingfieldsSHOULDNOTchangethroughoutan[H264]elementarystream: max_dec_frame_buffering, colour_description_present_flag overscan_info_present_flag overscan_appropriate

4.3.2.3 PictureParameterSets(PPS)

PPSNALUnitsthatoccurwithinaDCCSHALLconformto[H264]withthefollowingadditionalconstraints: TheconditionofthefollowingfieldsSHALLNOTchangethroughoutan[H264]elementarystream:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |56

entropy_coding_mode_flag

4.3.2.4 MaximumBitrate

Themaximumbitrateof[H264]elementarystreamsSHALLbecalculatedbyimplementationofthebufferandtimingmodeldefinedin[H264]AnnexC.

4.3.2.5 Framerate

Theframerateof[H264]elementarystreamsSHALLbecalculatedasfollows:

frame rate = time_scale ÷ (2 * num_units_in_tick)Note:time_scale andnum_units_in_tickare[H264]codingparameters.BasedontherestrictionsdefinedinSection4.3.2.2.1,thisequationappliestoall[H264]elementarystreamsconformingtothisSpecification.

4.4 HEVC

4.4.1 Storage of HEVC Elementary Streams

HEVCvideotracksSHALLcomplywithSection8of[ISOVIDEO].

4.4.1.1 VisualSampleEntry

Thesyntaxandvaluesforvisualsampleentry: SHALLconformtoHEVCSampleEntry(‘hev1’)sampleentriesasdefinedin[ISOVIDEO].

ThefollowingrequirementsapplytoHEVCSampleEntry(‘hev1’): IfthesampleisaSyncSample,allparametersetsneededfordecodingthatsampleSHALLbe

includedinthesampleitself. IfthesampleisarandomaccesspointthatisnotaSyncSample,allparametersetsneededfor

decodingthatsampleSHALLbeincludedinthesampleitself.

4.4.1.2 HEVCDecoderConfigurationRecord

VPSNALUnits(NAL_unit_type=“VPS_NUT”),SPSNALUnits(NAL_unit_type=“SPS_NUT”)andPPSNALUnits(NAL_unit_type=“PPS_NUT”)MAYbemappedtoHEVCDecoderConfigurationRecordasspecifiedin[ISOVIDEO]Section8.3.3“Decoderconfigurationinformation”andSection8.4“DerivationfromISOBaseMediaFileFormat”,withthefollowingadditionalconstraints:

AllVideoParameterSetNALUnitsmappedtoHEVCDecoderConfigurationRecordSHALLconformtotheconstraintsdefinedinSection4.4.2.2.

AllSequenceParameterSetNALUnitsmappedtoHEVCDecoderConfigurationRecordSHALLconformtotheconstraintsdefinedinSection4.4.2.3.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |57

4.4.2 Constraints on [H265] Elementary Streams

4.4.2.1 Picturetype

AllpicturesSHALLbeencodedascodedframes,andSHALLNOTbeencodedascodedfields.

4.4.2.2 VideoParameterSets(VPS)

VPSNALUnitsthatoccurwithinaDCCHEVCtrackSHALLconformto[H265]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLhavepre‐determinedvaluesasfollows: fixed_pic_rate_general_flag SHOULDbesetto1 general_interlaced_source_flagSHALLbesetto0

TheconditionofthefollowingfieldsSHALLNOTchangethroughoutan[H265]elementarystream: general_profile_space general_profile_idc general_tier_flag general_level_idc

4.4.2.3 SequenceParameterSets(SPS)

SPSNALUnitsthatoccurwithinaDCCHEVCtrackSHALLconformto[H265]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLhavepre‐determinedvaluesasfollows: general_frame_only_constraint_flagSHOULDbesetto1 vui_parameters_present_flagSHALLbesetto1

IftheareadefinedbythewidthandheightfieldsoftheTrackHeaderBoxofavideotrack(seeSection2.3.5)sub‐sampledtothesampleaspectratiooftheencodedpictureformatdoesnotcompletelyfillallencodedcodingtreeunits,thefollowingadditionalconstraintsSHALLapply: conformance_window_flagSHALLbesetto1toindicatethatHEVCcroppingparameters

arepresent conf_win_left_offsetandconf_win_right_offsetSHALLbesetsuchastocropthe

horizontalencodedpicturetothenearestevenintegerwidth(i.e.2,4,6,…)thatisequaltoorlargerthanthesub‐sampledwidthofthetrack

conf_win_top_offsetandconf_win_bottom_offsetSHALLbesetsuchastocroptheverticalpicturetothenearestevenintegerheightthatisequaltoorlargerthanthesub‐sampledheightofthetrack

Note:Giventhedefinitionabove,forMediaProfilesthatsupportdynamicsub‐sampling,ifthesampleaspectratiooftheencodedpictureformatchangeswithinthevideostream(i.e.duetoachangeinsub‐sampling),thenthevaluesofthecorrespondingcroppingparametersarerequiredtochangeaccordingly.Thus,itispossibleforHEVCcroppingparameterstobepresentinoneportionofa[H265]elementarystream(i.e.wherecroppingisnecessary)andnotanother.Asspecifiedin[H265],whenconformance_window_flagisequalto0,thevaluesofconf_win_left_offset,conf_win_right, conf_win_top_offset,andconf_win_bottom_offsetareinferredtobeequalto0.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |58

4.4.2.3.1 VisualUsabilityInformation(VUI)ParametersVUIparametersthatoccurwithinaDCCHEVCtrackSHALLconformto[H265]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLhavepre‐determinedvaluesasdefined: aspect_ratio_info_present_flagSHALLbesetto1 chroma_sample_loc_type_top_fieldandchroma_sample_loc_type_bottom_field

SHALLbesetto0or2,whenpresent vui_hrd_parameters_present_flagSHALLbesetto1 vui_timing_info_present_flagSHALLbesetto1 nal_hrd_parameters_present_flagSHALLbesetto1 ThefollowingfieldsSHOULDhavepre‐determinedvaluesasfollows: colour_description_present_flagSHOULDbesetto1.

Note:Per[H265],ifthecolour_description_present_flagissetto1,thecolour_primaries,transfer_characteristicsandmatrix_coefficientsfieldsmustbedefinedinthe[H265]elementarystream.

overscan_appropriate,ifpresent,SHOULDbesetto0. ThevaluesofthefollowingfieldsSHALLNOTchangethroughoutan[H265]elementarystream:

video_full_range_flag

chroma_loc_info_present_flag,whenpresent low_delay_hrd_flag

colour_primaries,whenpresent transfer_characteristics,whenpresent matrix_coeffs,whenpresent vui_time_scale vui_num_units_in_tick

Note:Therequirementthatfixed_pic_rate_generalbesetto1andthevaluesofvui_num_units_in_tickandvui_time_scalenotchangethroughoutastreamensuresafixedframeratethroughoutthe[H265]elementarystream.

ThevaluesofthefollowingfieldsSHOULDNOTchangethroughoutan[H265]elementarystream: colour_description_present_flag overscan_info_present_flag overscan_appropriate

4.4.2.4 SupplementalEnhancementInformation(SEI)

SEImessagesthatoccurwithinaDCCHEVCtrackSHALLconformto[H265]withthefollowingadditionalconstraints:

IftheMasteringdisplaycolourvolumeSEImessagedefinedin[H265]AnnexD.2.27exists,thepayloadvaluesSHALLNOTchangethroughoutthe[H265]elementarystream.

4.4.2.5 MaximumDelay

The(maximum)delayistheratiooftheCPBsize/max‐rate.ThedelaySHALLbelessthanorequalto8seconds

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |59

4.4.2.6 MaximumBitrate

Themaximumbitrateof[H265]elementarystreamsSHALLbecalculatedbyimplementationofthebufferandtimingmodeldefinedin[H265]AnnexC.

4.4.2.7 FrameRate

Theframerateof[H265]elementarystreamsSHALLbecalculatedasfollows: frame rate = vui_time_scale ÷ vui_num_units_in_tick

Note:viu_time_scale andvui_num_units_in_tickare[H265]codingparameters.BasedontherestrictionsdefinedinSection4.4.2.3.1,thisequationappliestoall[H265]elementarystreamsconformingtothisSpecification.

4.5 Sub‐samplingandCropping

Inordertopromotetheefficientencodinganddisplayofvideocontent,croppingandsub‐samplingissupported.However,theextenttowhicheachissupportedisspecifiedineachMediaProfiledefinition(seetheMediaProfileAnnexesofthisspecification).

4.5.1 Sub‐sampling

Spatialsub‐samplingcanbeahelpfultoolforimprovingcodingefficiencyofavideoelementarystream.Itisachievedbyreducingtheresolutionofthecodedpicturerelativetothesourcepicture,whileadjustingthesampleaspectratiotocompensateforthechangeinpresentation.Forexample,byreducingthehorizontalresolutionofthecodedpictureby50%whileincreasingthesampleaspectratiofrom1:1to2:1,thecodedpicturesizeisreducedbyhalf.Whilethisdoesnotnecessarilycorrespondtoa50%decreaseintheamountofcodedpicturedata,thedecreasecannonethelessbesignificant.TheextenttowhichaCodedVideoSequenceissub‐sampledisprimarilyspecifiedbythecombinationofthefollowingsequenceparametersetfieldsinthevideoelementarystream:

[H264]: pic_width_in_mbs_minus1whichdefinesthenumberofhorizontalsamples pic_height_in_map_units_minus1,whichdefinesthenumberofverticalsamples aspect_ratio_idc,whichdefinestheaspectratioofeachsample

[H265]: pic_width_in_luma_sampleswhichdefinesthenumberofhorizontalsamples pic_height_in_luma_samples([H265])whichdefinesthenumberofverticalsamples aspect_ratio_idc,whichdefinestheaspectratioofeachsample

Thedisplaydimensionsofavideotrackaredefinedintermsofsquarepixels(i.e.1:1sampleaspectratio)inthewidthandheightfieldsoftheTrackHeaderBox(‘tkhd’)ofthevideotrack(seeSection2.3.5andSection4.2.1).Thesevaluesareusedtodeterminetheappropriateprocessingtoapplywhendisplayingthecontent.EachDeliveryTargetinthisspecification(seeAnnexC)definesconstraintsontheamountandnatureofspatialsub‐samplingthatispermittedbytheDeliveryTarget.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |60

4.5.1.1 Sub‐sampleFactor

Forthepurposeofthisspecification,theextentofsub‐samplingappliedischaracterizedbyasub‐samplefactorineachofthehorizontalandverticaldimensions,definedasfollows:

Thehorizontalsub‐samplefactorisdefinedastheratioofthenumberofcolumnsofthelumasamplearrayinafullencodedframeabsentofcroppingoverthenumberofcolumnsofthelumasamplearrayinapictureformat’sframeasspecifiedwithSAR1:1.

Theverticalsub‐samplefactorisdefinedastheratioofthenumberofrowsofthelumasamplearrayinafullencodedframeabsentofcroppingoverthenumberofrowsofthelumasamplearrayinapictureformat’sframeasspecifiedwithSAR1:1.

Thesub‐samplefactorisspecificallyusedforselectingappropriatewidthandheightvaluesfortheTrackHeaderBoxforvideotracks,asspecifiedinSection2.3.5.TheMediaProfiledefinitionsintheAnnexesofthisdocumentspecifythepictureformatsandthecorrespondingsub‐samplefactorsandsampleaspectratiosoftheencodedpicturethataresupportedforeachProfile.

4.5.1.1.1 ExamplesofSingleDimensionSub‐samplingIfa1920x1080squarepixel(SAR1:1)sourcepictureishorizontallysub‐sampledandencodedataresolutionof1440x1080(SAR4:3),whichcorrespondstoa1920x1080squarepixel(SAR1:1)pictureformat,thenthehorizontalsub‐samplefactoris14401920=0.75,whiletheverticalsub‐samplefactoris1.0sincethereisnochangeintheverticaldimension.Similarly,ifa1280x720(SAR1:1)sourcepictureisverticallysub‐sampledandencodedataresolutionof1280x540(SAR3:4),whichcorrespondstoa1280x720(SAR1:1)pictureformatframesize,thenthehorizontalsub‐samplefactoris1.0sincetheisnochangeinthehorizontaldimension,andtheverticalsub‐samplefactoris540720=0.75.

4.5.1.1.2 314BExampleofMixedSub‐samplingIfa1280x1080(SAR3:2)sourcepictureisverticallysub‐sampledandencodedataresolutionof1280x540(SAR3:4),correspondingtoa1920x1080squarepixel(SAR1:1)pictureformatframesize,thenthehorizontalsub‐samplefactoris12801920=2/3,andtheverticalsub‐samplefactoris5401080=0.5.Tounderstandhowthisisanexampleofmixedsub‐sampling,itishelpfultorememberthattheinitialsourcepictureresolutionof1280x1080(SAR3:2)canitselfbethoughtofashavingbeenhorizontallysub‐sampledfromahigherresolutionpicture.

4.5.2 Cropping to Active Picture Area

Anotherhelpfultoolforimprovingcodingefficiencyinavideoelementarystreamistheuseofcropping.Thisspecificationdefinesasetofrulesfordefiningencodingparameterstoreduceoreliminatetheneedtoencodenon‐essentialpicturedatasuchasblackmatting(i.e.“letterboxing”or“blackpadding”)thatfalloutsideoftheactivepictureareaoftheoriginalsourcecontent.ThedimensionsoftheactivepictureareaofavideotrackarespecifiedbythewidthandheightfieldsoftheTrackHeaderBox(‘tkhd’),asdescribedinSection2.3.5andSection4.2.1.Thesevaluesarespecifiedinsquarepixels,andtrackvideodataisnormalizedtothesedimensionsbeforeanytransformationordisplacementcausedbyacompositionsystemoradaptationtoaparticularphysicaldisplaysystem.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |61

Whensub‐samplingisapplied,asdescribedabove,thenumberofcodedsamplesisscaledinoneorbothdimensions.However,sincethesub‐sampledpictureareamightnotalwaysfallexactlyonthesamplecodingunitboundaryemployedbythevideoelementarystream,additionalcroppingparametersareusedtofurtherdefinethedimensionsofthecodedpicture.

[H264]: “Macroblocks”definethesamplecodingunitboundary(andare16x16blocks) SeetheprocessdefinedinSection4.3.2.2

[H265]: “CodingTreeUnits”definethesamplecodingunitboundary(andare64×64,32×32,or

16×16blocks) SeetheprocessdefinedinSection4.4.2.3

4.5.3 Relationship of Cropping and Sub‐sampling

Whenspatialsub‐samplingisapplied,additionalcroppingparametersareoftenneededtocompensateforthemismatchbetweenthecodedpicturesizeandthemacroblock([H264])/codingtreeunit([H265])boundaries.Thespecificrelationshipbetweenthesesmechanismsisdefinedasfollows:

Eachpictureisdecodedusingthecodingparameters,includingdecodedpicturesizeandcroppingfields,definedinthesequenceparametersetcorrespondingtothatpicture’sCodedVideoSequence.

ThedimensionsdefinedbythewidthandheightfieldsintheTrackHeaderBoxareusedtodeterminewhich,ifany,scalingorothercompositionoperationsarenecessaryfordisplay.Forexample,tooutputthevideotoanHDTV,thedecodedimagemightneedtobescaledtotheresolutiondefinedbywidthandheightandthenadditionalmattingapplied(ifnecessary)inordertoformavalidtelevisionvideosignal.

Figure4‐2–ExampleofEncodingProcessofLetterboxedSourceContent

Figure41‐showsanexampleoftheencodingprocessthatcanbeapplied.Table42‐showstheparametervaluesthatcouldbeused.

* AVC cropping can only operate on even numbers of lines, requiring that the selected height be rounded up 

Source 

Picture 

(Letterboxed)

Source Picture 

Letterboxed (2.35AspectRatio)

Sub‐sampled 

Horizontally 

(75%)

Encoded Active Picture

Source Frame:  1920 x 1080 Active Picture:  1920 x 818* Sample Aspect Ratio:  1:1

Source Frame:  1440 x1080ActivePicture:1440x818SampleAspectRatio:4:3

Encoded Frame:  1440x832

Active Picture:  1440 x 818 Sample Aspect Ratio:  4:3

Cropped to Active Picture

Cropped Frame:  

1440x818 Active Picture:  1440 x 818 Sample Aspect Ratio:  4:3

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |62

Table4‐2–ExampleSub‐sampleandCroppingValuesforFigure41‐Object Field Value

PictureFormat width 1920FrameSize height 1080

Sub‐sampleFactor horizontal 0.75 vertical 1.0

TrackHeaderBox width 1920 height 818

[H264]ParameterValues

chroma_format_idc 1(4:2:0)

aspect_ratio_idc 14(4:3)

pic_width_in_mbs_minus1 89 pic_height_in_map_units_minus1 51 frame_cropping_flag 1 frame_crop_left_offset 0 frame_crop_right_offset 0 frame_crop_top_offset 0 frame_crop_bottom_offset 7

[H265]ParameterValues

chroma_format_idc 1(4:2:0)MinCbSizeY 16log2_min_luma_coding_block_size_minus3 1aspect_ratio_idc 14(4:3)pic_width_in_luma_samples 1440pic_height_in_luma_samples 832conformance_window_flag 1conf_win_left_offset 0conf_win_right_offset 0conf_win_top_offset 0conf_win_bottom_offset 7

Notes: aschroma_format_idcis1,SubWidthCandSubWidthCaresetto2per[H264]and[H265].This

resultsinadoublingofframecropparameters(soframe_crop_bottom_offsetandconf_win_bottom_offsetbothequateto14pixelsintheaboveexample).

As[H265]MinCbSizeYis16andlog2_min_luma_coding_block_size_minus3is1,theCodingTreeUnitsizeis16x16(matchingthe[H264]macroblocksizeof16x16).

ThedecodinganddisplayprocessforthiscontentisillustratedinFigure42‐,below.Inthisexample,thedecodedpicturedimensionsare1440x818,onelinelargerthantheoriginalactivepicturearea.Thisisduetoalimitationinthecroppingparameterstocroponlyevenpairsoflines.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |63

Figure4‐3–ExampleofDisplayProcessforLetterboxedSourceContent

Figure43‐,below,illustrateswhatmighthappenwhenbothsub‐samplingandcroppingareworkinginthesamehorizontaldimension.Theoriginalsourcepicturecontentisfirstsub‐sampledhorizontallyfroma1:1sampleaspectratioat1920x1080toasampleaspectratioof4:3at1440x1080,thenthe1080x1080pixelactivepictureareaofthesub‐sampledimageisencoded.However,theactualcodedpicturehasaresolutionof1088x1088pixelsduetothecodingunitboundariesfallingonevenmultiplesof16pixelsinthisexample‐therefore,additionalcroppingparametersmustbeprovidedinbothhorizontalandverticaldimensions.

Figure4‐4–ExampleofEncodingProcessforPillarboxedSourceContent

Table43‐liststhevariousparametersthatmightappearintheresultingfileforthissamplecontent.Table4‐3–ExampleSub‐sampleandCroppingValuesforFigure43‐Object Field Value

PictureFormat width 1920FrameSize height 1080

Sub‐sampleFactor horizontal 0.75 vertical 1.0

TrackHeaderBox width 1440 height 1080

[H264]ParameterValues

chroma_format_idc 1(4:2:0)

aspect_ratio_idc 14(4:3)

pic_width_in_mbs_minus1 67

pic_height_in_map_units_minus1 67

frame_cropping_flag 1

Processed 

for Display 

Output

Decoded 

Picture

Decoded Frame:  1440 x 818 Active Picture:  1440 x 818 Sample Aspect Ratio:  4:3

Scaled Horizontally to Square Pixels

Scaled Frame:  1920 x 818

Active Picture:  1920 x 818 Sample Aspect Ratio:  1:1

Display‐

specific

Scaled 

Horizontally to Square Pixels

Letterboxed for HDTV Ouptut

Output 

unchanged 

for 2.35 portable 

display

Source 

Picture 

(Letterboxed)

Source Picture 

Pillarboxed (1.33Aspect

Ratio)

Cropped to

Active 

Picture

Source Frame:  1920 x 1080 Active Picture:  1440 x 1080 Sample Aspect Ratio:  1:1

Coded Picture:  1080 x 1080

Sample Aspect Ratio:  4:3

Sub‐sampled 

Horizontally 

(75%)

Source Frame:  1440 x 1080

Active Picture:  1080 x 1080 Sample Aspect Ratio:  4:3

Encoded  

Active 

Picture

Encoded Frame:  1088 x 1088

Active Picture:  1080 x 1080 Sample Aspect Ratio:  4:3

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |64

frame_crop_left_offset 0

frame_crop_right_offset 4

frame_crop_top_offset 0

frame_crop_bottom_offset 4

[H265]ParameterValues

chroma_format_idc 1(4:2:0)MinCbSizeY 16log2_min_luma_coding_block_size_minus3 1aspect_ratio_idc 14(4:3)pic_width_in_luma_samples 1088pic_height_in_luma_samples 1088conformance_window_flag 1conf_win_left_offset 0conf_win_right_offset 4conf_win_top_offset 0conf_win_bottom_offset 4

Notes: aschroma_format_idcis1,SubWidthCandSubWidthCaresetto2per[H264]and[H265].This

resultsinadoublingofframecropparameters(soframe_crop_bottom_offsetandconf_win_bottom_offsetbothequateto14pixelsintheaboveexample).

As[H265]MinCbSizeYis16andlog2_min_luma_coding_block_size_minus3is1,theCodingTreeUnitsizeis16x16(matchingthe[H264]macroblocksizeof16x16).

TheprocessforreconstructingthevideofordisplayisshowninFigure44‐.Asinthepreviousexample,thedecodedpictureisrequiredtobescaledbackuptotheoriginal1:1sampleaspectratio.

Figure4‐5–ExampleofDisplayProcessforPillarboxedSourceContent

Ifthiscontentwastobedisplayedonastandard4:3television,nofurtherprocessingoftheimagewouldbenecessary.However,ifthiscontentwastobedisplayedona16:9HDTV,itmightbenecessaryforittoapplyadditionalmattingontheleftandrightsidestoreconstructtheoriginalpillarboxesinordertoensurethevideoimagedisplaysproperly.

4.5.4 Dynamic Sub‐sampling

ForMediaProfilesthatsupportdynamicsub‐sampling,thespatialsub‐samplingofthecontentcanbechangedperiodicallythroughoutthedurationofthefile.Changestothesub‐samplingvaluesareimplementedbychangingtheelementarystreamparametervaluesidentifiedinSection4.5.1.Dynamic

DecodedPicture:1080x1080 SampleAspectRatio:4:3

Scaled 

(logically) 

to Track 

Header 

Dimensions

Track Header:  1440 x 1080

Sample Aspect Ratio:  1:1

Decoded 

Picture

Processed 

for Display 

Output

Display‐

specific

Scaled to 

SD 

for output 

SDTV

Pillarboxed 

for HDTV

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |65

sub‐samplingissupportedbyMediaProfilesthatdonotspecificallyprohibitthesevaluesfromchangingwithinavideotrack.

4.5.4.1 Constraintson[H264]ElementaryStreams

thepic_width_in_mbs_minus1,pic_height_in_map_units_minus1andaspect_ratio_idcsequenceparametersetfieldvaluesSHALLonlybechangedatthestartofafragment.

Whensub‐samplingparametersarechangedwithinthefile,theframe_cropping_flag,frame_crop_left_offset,frame_crop_right_offset,frame_crop_top_offset,frame_crop_bottom_offsetcroppingparametersSHALLalsobechangedtomatch,asspecifiedinSection4.3.2.2.

Note:Ifpic_width_in_mbs_minus1orpic_height_in_map_units_minus1changesfromthepreviousCodedVideoSequence,thisSHALLNOTimplyno_output_of_prior_pics_flagisequaltoone–inthiscasevideopresentationandoutputofallvideoframesSHOULDcontinuewithoutinterruptioninpresentation,i.e.nopicturesSHOULDbediscarded.

4.5.4.2 Constraintson[H265]ElementaryStreams

thepic_width_in_luma_samples,pic_height_in_luma_samplesandaspect_ratio_idcsequenceparametersetfieldvaluesSHALLonlybechangedatthestartofafragment.

Whensub‐samplingparametersarechangedwithinthefile,theconformance_window_flag, conf_win_left_offset, conf_win_right_offset, conf_win_top_offset,

conf_win_bottom_offsetcroppingparametersSHALLalsobechangedtomatch,asspecifiedinSection4.4.2.3.

Note:Ifpic_width_in_luma_samplesorpic_height_in_luma_sampleschangesfromthepreviousCodedVideoSequence,thisSHALLNOTimplyno_output_of_prior_pics_flagisequaltoone–inthiscasevideopresentationandoutputofallvideoframesSHOULDcontinuewithoutinterruptioninpresentation,i.e.nopicturesSHOULDbediscarded.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |66

5 AudioElementaryStreams

5.1 Introduction

ThischapterdescribestheaudiotrackinrelationtotheISOBaseMediaFile,therequiredvs.optionalaudioformatsandtheconstraintsoneachaudioformat.Ingeneral,thesystemlayerdefinitiondescribedin[MPEG4S]isusedtoembedtheaudio.ThisisdescribedindetailinSection5.2.

5.2 DataStructureforAudioTrack

ThecommondatastructureforstoringaudiotracksinaDCCisdescribedhere.Allrequiredandoptionalaudioformatscomplywiththeseconventions.

5.2.1 Track Header Box (‘tkhd’)

Foraudiotracks,thefieldsoftheTrackHeaderBoxSHALLbesettothevaluesspecifiedbelow.Therearesome“template”fieldsdeclaredtouse;see[ISO].

flags=0x000007,exceptforthecasewherethetrackbelongstoanalternategroup layer=0 volume=0x0100 matrix={0x00010000,0,0,0,0x00010000,0,0,0,0x40000000} width=0 height=0

5.2.2 Movie Fragment Box(‘moof’)

MovieFragmentsinaudiotracksarerequiredtoconformtothefollowingconstrains: EveryaudiotrackMovieFragmentexceptthelastMovieFragmentofanaudiotrackSHALLhavea

durationofatleastonesecond.ThelastMovieFragmentofanaudiotrackMAYhaveadurationoflessthanonesecond;and

EveryaudiotrackMovieFragmentSHALLhaveadurationnogreaterthan6seconds.

5.2.3 Sync Sample Box (‘stss’)

TheSyncSampleBox(‘stss’)SHALLNOTbeused.Note:“syncsample”inmoviefragmentscannotbesignaledbytheabsenceoftheSyncSamplebox(‘stss’)orbythepresenceoftheSyncSamplebox(‘stss’),sincethisboxisnotdesignedtolistsyncsamplesinmoviefragments.

Foraudioformatsinwhicheveryaudioaccessunitisarandomaccesspoint(syncsample),signalingcanbeachievedbyothermeanssuchassettingthe'sample_is_non_sync_sample'flagto"0"inthe'default_sample_flags'fieldintheTrackExtendsbox(‘trex’).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |67

Foraudioformatsinwhichsomeaudioaccessunitsarenotsyncsamples,syncsamplescanbesignaledusingsample_flagsintheTrackRunbox(‘trun’).

5.2.4 Handler Reference Box (‘hdlr’)

ThesyntaxandvaluesfortheHandlerReferenceBox(‘hdlr’)foraudiotracksSHALLconformto[ISO]withthefollowingadditionalconstraints:

Thehandler_typefieldSHALLbesetto“soun”

5.2.5 Sound Media Header Box (‘smhd’)

ThesyntaxandvaluesfortheSoundMediaHeaderBoxSHALLconformto[ISO]withthefollowingadditionalconstraints:

ThefollowingfieldsSHALLbesetasdefined: balance=0

5.2.6 Sample Description Box (‘stsd’)

ThecontentsoftheSampleDescriptionBox(‘stsd’)aredeterminedbyvalueofthehandler_typeparameterintheHandlerReferenceBox(‘hdlr’).Foraudiotracks,thehandler_typeparameterissetto“soun”,andtheSampleDescriptionBoxcontainsaaudiosampleentrythatdescribestheconfigurationoftheaudiotrack.ForeachoftheaudioformatssupportedbytheCommonFileFormat,aspecificaudiosampleentryboxthatisderivedfromtheAudioSampleEntryboxdefinedin[ISO]isused.Eachcodec‐specificSampleEntryboxisidentifiedbyauniquecodingnamevalue,andspecifiestheaudioformatusedtoencodetheaudiotrack,anddescribestheconfigurationoftheaudioelementarystream.Table51‐liststheaudioformatsthataresupportedbytheCommonFileFormat,andthecorrespondingSampleEntrythatispresentintheSampleDescriptionBoxforeachformat.

Table5‐1–DefinedAudioFormatscodingname AudioFormat SampleEntryType SectionReferencemp4a MPEG‐4AAC[2‐channel] MP4AudioSampleEntry Section5.3.2

MPEG‐4HEAACV2[5.1,7.1‐channel]

Section5.3.3

MPEG‐4HEAACv2 Section5.3.4

MPEG‐4HEAACv2withMPEGSurround

Section5.3.5

mha1 MPEG‐H3DAudio MHASampleEntry Section5.4ac‐3 AC‐3(DolbyDigital) AC3SampleEntry Section5.5.1

ec‐3EnhancedAC‐3(DolbyDigitalPlus)

EC3SampleEntry Section5.5.2

mlpa MLP MLPSampleEntry Section5.5.3ac‐4 AC‐4 AC4SampleEntry Section5.6.4dtsc DTS DTSSampleEntry Section5.6

dtshDTS‐HDwithcoresubstream

DTSSampleEntry Section5.6

dtsl DTS‐HDMasterAudio DTSSampleEntry Section5.6

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |68

dtse DTS‐HDlowbitrate DTSSampleEntry Section5.6

5.2.7 Shared elements of AudioSampleEntry

ForallaudioformatssupportedbytheCommonFileFormat,thefollowingelementsoftheAudioSampleEntryboxdefinedin[ISO]areshared:class AudioSampleEntry(codingname) extends SampleEntry(codingname) { const unsigned int(32) reserved[2] = 0; template unsigned int(16) channelcount; template unsigned int(16) samplesize = 16; unsigned int(16) pre_defined = 0; const unsigned int(16) reserved = 0; template unsigned int(32) sampleRate; (codingnamespecific)Box }

ForallaudiotrackswithinaDCC,thevalueofthesamplesizeparameterSHALLbesetto16.EachoftheaudioformatssupportedbytheCommonFileFormatextendstheAudioSampleEntryboxthroughtheadditionofabox(shownaboveas“(codingnamespecific)Box”)containingcodec‐specificinformationthatisplacedwithintheAudioSampleEntry.Thisinformationisdescribedinthefollowingcodec‐specificsections.

5.3 MPEG‐4AACFormats

5.3.1 General Consideration for Encoding

SincetheAACcodecisbasedonoverlaptransform,anditdoesnotestablishaone‐to‐onerelationshipbetweeninput/outputaudioframesandaudiodecodingunits(AUs)inbit‐streams,itisnecessarytobecarefulinhandlingtimestampsinatrack.Figure51‐showsanexampleofanAACbit‐streaminthetrack.

Figure5‐1–ExampleofAACbit‐stream

Source

Coded bitstream

Enc

Dec

1 2 3 4 5

1,2 2,3 3,4 4,5

output N1 42 3

5,N

5

Dummy (Flush)

0 1 32 4 TimeStamp in track

TimeStamp for play(CTS ) 0 1 32 4

N,1 x

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |69

Inthisfigure,thefirstblockofthebit‐streamisAU[1,2],whichiscreatedfrominputaudioframes[1]and[2].Dependingontheencoderimplementation,thefirstblockmightbeAU[N,1](whereNindicatesasilentintervalinsertedbytheencoder),butthistypeofAUcouldcausefailureinsynchronizationandthereforeSHALLNOTbeincludedinthefile.Toincludethelastinputaudioframe(i.e.,[5]ofsourceinthefigure)intothebit‐streamforencoding,itisnecessarytoterminateitwithasilentintervalandincludeAU[5,N]intothebit‐stream.Thisproducesthesamenumberofinputaudioframes,AUs,andoutputaudioframes,eliminatingtimedifference.Whenabit‐streamiscreatedusingthemethoddescribedabove,thedecodingresultofthefirstAUdoesnotnecessarilycorrespondtothefirstinputaudioframe.Thisisbecauseofthelackofthefirstpartofthebit‐streaminoverlaptransform.Thus,thefirstaudioframe(21msperframewhensampledat48kHz,forexample)isnotguaranteedtoplaycorrectly.Inthiscase,itisuptodecoderimplementationstodecidewhetherthedecodedoutputaudioframe[N1]istobeplayedormuted.Takingthisintoconsideration,thecontentSHOULDbecreatedbymakingthefirstinputaudioframeasilentinterval.

5.3.2 MPEG‐4 AAC LC [2‐Channel]

5.3.2.1 StorageofMPEG‐4AACLC[2‐Channel]ElementaryStreams

5.3.2.1.1 OverviewStorageofMPEG‐4AACLC[2‐channel]elementarystreamswithinaDCCSHALLbeaccordingto[MP4].Thefollowingadditionalconstraintsapplywhenstoring2‐channelMPEG‐4AACLCelementarystreamsinaDCC:

AnaudiosampleSHALLconsistofasingleAACaudioaccessunit. TheparametervaluesofAudioSampleEntry,DecoderConfigDescriptor,and

DecoderSpecificInfoSHALLbeconsistentwiththeconfigurationoftheAACaudiostream.

5.3.2.1.2 315BAudioSampleEntryBoxforMPEG‐4AACLC[2‐Channel]ThesyntaxandvaluesoftheAudioSampleEntrySHALLconformtoMP4AudioSampleEntry(‘mp4a’)asdefinedin[MP4],andthefollowingfieldsSHALLbesetasdefined:

channelcount=1(formono)or2(forstereo)ForMPEG‐4AAC,the(codingnamespecific)BoxthatextendstheMP4AudioSampleEntryistheESDBoxdefinedin[MP4],whichcontainsanES_Descriptor.

5.3.2.1.3 316BESDBoxThesyntaxandvaluesforES_DescriptorSHALLconformto[MPEG4S],andthefieldsoftheES_DescriptorSHALLbesettothefollowingspecifiedvalues.DescriptorsotherthanthosespecifiedbelowSHALLNOTbeused.

ES_ID=0 streamDependenceFlag=0 URL_Flag=0; OCRstreamFlag=0

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |70

streamPriority=0 decConfigDescr=DecoderConfigDescriptor(seeSection5.3.2.1.3) slConfigDescr=SLConfigDescriptor,predefinedtype2

5.3.2.1.4 317BDecoderConfigDescriptorThesyntaxandvaluesforDecoderConfigDescriptorSHALLconformto[MPEG4S],andthefieldsofthisdescriptorSHALLbesettothefollowingspecifiedvalues.Inthisdescriptor,decoderSpecificInfoSHALLbeused,andProfileLevelIndicationIndexDescriptorSHALLNOTbeused.

objectTypeIndication=0x40(Audio) streamType=0x05(AudioStream) upStream=0 decSpecificInfo=AudioSpecificConfig(seeSection5.3.2.1.4)

5.3.2.1.5 AudioSpecificConfigThesyntaxandvaluesforAudioSpecificConfigSHALLconformto[AAC],andthefieldsofAudioSpecificConfigSHALLbesettothefollowingspecifiedvalues:

audioObjectType=2(AACLC) channelConfiguration=1(forsinglemono)or2(forstereo) GASpecificConfig(seeSection5.3.2.1.5)

ChannelassignmentSHALLNOTbechangedwithintheaudiostreamthatmakesupatrack.

5.3.2.1.6 GASpecificConfigThesyntaxandvaluesforGASpecificConfigSHALLconformto[AAC],andthefieldsofGASpecificConfigSHALLbesettothefollowingspecifiedvalues:

frameLengthFlag=0(1024linesIMDCT) dependsOnCoreCoder=0 extensionFlag=0

5.3.2.2 MPEG‐4AACLC[2‐Channel]ElementaryStreamConstraints

5.3.2.2.1 GeneralEncodingConstraintsMPEG‐4AAC[2‐Channel]elementarystreamsSHALLconformtotherequirementsoftheMPEG‐4AACprofileatLevel2asspecifiedin[AAC]withthefollowingrestrictions:

OnlytheMPEG‐4AACLCobjecttypeSHALLbeused. TheelementarystreamSHALLbeaRawDatastream.ADTSandADIFSHALLNOTbeused. ThetransformlengthoftheIMDCTforAACSHALLbe1024samplesforlongand128forshort

blocks. ThefollowingparametersSHALLNOTchangewithintheelementarystream

AudioObjectType SamplingFrequency ChannelConfiguration BitRate

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |71

5.3.2.2.2 SyntacticElements ThesyntaxandvaluesforsyntacticelementsSHALLconformto[AAC].Thefollowingelements

SHALLNOTbepresentinanMPEG‐4AACelementarystream: coupling_channel_element(CCE)

5.3.2.2.2.1 ArrangementofSyntacticElements SyntacticelementsSHALLbearrangedinthefollowingorderforthechannelconfigurationsbelow.

<SCE><FIL><TERM>…formono <CPE><FIL><TERM>...forstereo

Note:Angledbrackets(<>)aredelimitersforsyntacticelements.

5.3.2.2.2.2 individual_channel_stream Thesyntaxandvaluesforindividual_channel_streamSHALLconformto[AAC].Thefollowing

fieldsSHALLbesetasdefined: gain_control_data_present=0

5.3.2.2.2.3 ics_info Thesyntaxandvaluesforics_infoSHALLconformto[AAC].ThefollowingfieldsSHALLbesetas

defined: predictor_data_present=0

5.3.2.2.2.4 MaximumBitrateThemaximumbitrateofMPEG‐4AACLC[2‐Channel]elementarystreamsSHALLbecalculatedinaccordancewiththeAACbufferrequirementsasdefinedinISO/IEC14496‐3:2009,section4.5.3.OnlytherawdatastreamSHALLbeconsideredindeterminingthemaximumbitrate(system‐layerdescriptorsareexcluded).

5.3.3 MPEG‐4 HE AAC V2[5.1, 7.1‐Channel]

5.3.3.1 Overview

NotethatcontentprovidersencodingcontentaccordingtotheHEAACV2ProfilecanuseanyofAAC‐LC,HE‐AACandHEAACV2profiles.ClientssupportingtheHEAACV2ProfilewillbeabletoplayAAC‐LC,HE‐AACandHEAACV2encodedcontent.

5.3.3.2 StorageofMPEG‐4HEAACV2[5.1,7.1‐Channel]ElementaryStreams

5.3.3.2.1 OverviewStorageofMPEG‐4HEAACV2[5.1,7.1‐Channel]elementarystreamswithinaDCCSHALLbeaccordingto[MP4].ThefollowingadditionalconstraintsapplywhenstoringMPEG‐4AACelementarystreamsinaDCC.

AnaudiosampleSHALLconsistofasingleAACaudioaccessunit.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |72

TheparametervaluesofAudioSampleEntry,DecoderConfigDescriptor,DecoderSpecificInfoandprogram_config_element(ifpresent)SHALLbeconsistentwiththeconfigurationoftheAACaudiostream.

5.3.3.2.2 AudioSampleEntryBoxforMPEG‐4HEAACV2[5.1,7.1‐Channel] ThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoMP4AudioSampleEntry

(‘mp4a’)asdefinedin[MP4],andthefollowingfieldsSHALLbesetasdefined: channelcountSHALLmatchthenumberofaudiochannels,includingtheLFE,inthe

streamForMPEG‐4HEAACV2[5.1,7.1‐Channel],the(codingnamespecific)BoxthatextendstheMP4AudioSampleEntryistheESDBoxdefinedin[MP4]thatcontainsanES_Descriptor

5.3.3.2.3 ESDBox ThesyntaxandvaluesforES_DescriptorSHALLconformto[MPEG4S],andthefieldsofthe

ES_DescriptorSHALLbesettothefollowingspecifiedvalues.DescriptorsotherthanthosespecifiedbelowSHALLNOTbeused. ES_ID=0 streamDependenceFlag=0 URL_Flag=0 OCRstreamFlag=0 streamPriority=0 decConfigDescr=DecoderConfigDescriptor(seeSection5.3.3.1.3) slConfigDescr=SLConfigDescriptor,predefinedtype2

5.3.3.2.4 DecoderConfigDescriptor ThesyntaxandvaluesforDecoderConfigDescriptorSHALLconformto[MPEG4S],andthefields

ofthisdescriptorSHALLbesettothefollowingspecifiedvalues.Inthisdescriptor,DecoderSpecificInfoSHALLalwaysbeused,andProfileLevelIndicationIndexDescriptorSHALLNOTbeused. objectTypeIndication=0x40(Audio) streamType=0x05(AudioStream) upStream=0 decSpecificInfo=AudioSpecificConfig(seeSection5.3.3.1.4)

5.3.3.2.5 AudioSpecificConfig ThesyntaxandvaluesforAudioSpecificConfigSHALLconformto[AAC]and[AACC],andthe

followingfieldsofAudioSpecificConfigSHALLbesettothespecifiedvalues: audioObjectType=2(AACLC) extensionAudioObjectType=5(SBR)ifSBRToolisused channelConfiguration=0or5or6or7or11or12or14 GASpecificConfig(seeSection5.3.3.1.5)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |73

5.3.3.2.5.1 channelConfiguration0 Thevalueof0forchannelConfigurationisallowedfor5.1‐channelstreamsonlyinthiscase,a

program_config_elementthatcontainsprogramconfigurationdataSHALLbeusedtospecifythecompositionofchannelelements.SeeSection5.3.3.1.6fordetailsontheprogram_config_element.ChannelassignmentSHALLNOTbechangedwithintheaudiostreamthatmakesupatrack.

5.3.3.2.6 GASpecificConfig ThesyntaxandvaluesforGASpecificConfigSHALLconformto[AAC]and[AACC],andthe

followingfieldsofGASpecificConfigSHALLbesettothespecifiedvalues: frameLengthFlag=0(1024linesIMDCT) dependsOnCoreCoder=0 extensionFlag=0 program_config_element(seeSection5.3.3.1.6)

5.3.3.2.7 program_config_element Thesyntaxandvaluesforprogram_config_element()(PCE)SHALLconformto[AAC],andthe

followingfieldsSHALLbesetasdefined: element_instance_tag=0 object_type=1(AACLC) num_front_channel_elements=2 num_side_channel_elements=0 num_back_channel_elements=1 num_lfe_channel_elements=1 num_assoc_data_elements=0or1 num_valid_cc_elements=0 mono_mixdown_present=0 stereo_mixdown_present=0 matrix_mixdown_idx_present=0or1 if (matrix_mixdown_idx_present = = 1) {

matrix_mixdown_idx=0to3 pseudo_surround_enable=0or1}

front_element_is_cpe[0]=0 front_element_is_cpe[1]=1 back_element_is_cpe[0]=1

5.3.3.3 MPEG‐4HEAACV2[5.1,7.1‐channel]ElementaryStreamConstraints

5.3.3.3.1 GeneralEncodingConstraintsMPEG‐4HEAACV2[5.1,7.1‐channel]elementarystreamsSHALLconformtotherequirementsoftheMPEG‐4AACprofileatLevel6asspecifiedin[AAC]withthefollowingrestrictions:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |74

TheelementarystreamSHALLbeaRawDatastream.ADTSandADIFSHALLNOTbeused. ThetransformframelengthofanAACframe(accessunit)SHALLbe1024samples(1024IMDCT

linesforlongand8times128forshortblocks. ThefollowingparametersSHALLNOTchangewithintheelementarystream:

AudioObjectType SamplingFrequency ChannelConfiguration

5.3.3.3.2 SyntacticElements ThesyntaxandvaluesforsyntacticelementsSHALLconformto[AAC]and[AACC].Thefollowing

elementsSHALLNOTbepresentinanMPEG‐4AACelementarystream: coupling_channel_element(CCE)

ThesyntaxandvaluesforsyntacticelementsSHALLconformto[AAC]and[AACC].ThefollowingelementsSHALLbepresentinanMPEG‐4AACelementarystream: dynamic_range_info()

5.3.3.3.2.1 6.1and7.1ChannelConfigurationsInadditiontotheabove,for6.1and7.1ChannelConfigurationfollowingelementsSHALLbepresentinanMPEG‐4AACelementarystream:

MPEG4_ancillary_data()

5.3.3.3.2.2 ArrangementofSyntacticElements SyntacticelementsSHALLbearrangedinthefollowing[AAC]i.e.orderingofchannelelements

SHALLfollowTable1.19–ChannelConfigurationof[AAC],forexample: <SCE><FIL‐<EXT‐SBR>><CPE><FIL‐<EXT‐SBR>><CPE><FIL‐<EXT‐SBR>><LFE>>…<FIL‐

<EXT‐DRC>><FIL><TERM>…forchannelConfiguration6(5.1‐channels)Note:Angledbrackets(<>)aredelimitersforsyntacticelements.

5.3.3.3.2.3 individual_channel_stream Thesyntaxandvaluesforindividual_channel_streamSHALLconformto[AAC]and[AACC].

ThefollowingfieldsSHALLbesetasdefined: gain_control_data_present=0;

5.3.3.3.2.4 ics_info Thesyntaxandvaluesforics_infoSHALLconformto[AAC]and[AACC].Thefollowingfields

SHALLbesetasdefined: predictor_data_present=0;

5.3.3.3.2.5 MaximumBitrateThemaximumbitrateofMPEG‐4HEAACV2[5.1,7.1‐Channel]elementarystreamsSHALLbecalculatedinaccordancewiththeAACbufferrequirementsasdefinedinISO/IEC14496‐3:2009,section4.5.3(288kbpsperfullaudiochannelat48kHzAACcoresamplingrate).OnlytherawdatastreamSHALLbeconsideredindeterminingthemaximumbitrate(system‐layerdescriptorsareexcluded).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |75

5.3.4 MPEG‐4 HE AAC v2

5.3.4.1 StorageofMPEG‐4HEAACv2ElementaryStreams

5.3.4.1.1 OverviewStorageofMPEG‐4HEAACv2elementarystreamswithinaDCCSHALLbeaccordingto[MP4].ThefollowingrequirementsSHALLbemetwhenstoringMPEG‐4HEAACv2elementarystreamsinaDCC.

AnaudiosampleSHALLconsistofasingleHEAACv2audioaccessunit. TheparametervaluesofAudioSampleEntry,DecoderConfigDescriptor,and

DecoderSpecificInfoSHALLbeconsistentwiththeconfigurationoftheMPEG‐4HEAACv2audiostream.

5.3.4.1.2 AudioSampleEntryBoxforMPEG‐4HEAACv2 ThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoMP4AudioSampleEntry

(‘mp4a’)definedin[MP4],andthefollowingfieldsSHALLbesetasdefined: channelcount=1(formonoorparametricstereo)or2(forstereo)

ForMPEG‐4AAC,the(codingnamespecific)BoxthatextendstheMP4AudioSampleEntryistheESDBoxdefinedinISO14496‐14[14],whichcontainsanES_Descriptor.

5.3.4.1.3 ESDBox TheESDBoxcontainsanES_Descriptor.ThesyntaxandvaluesforES_DescriptorSHALL

conformto[MPEG4S],andthefieldsoftheES_DescriptorSHALLbesettothefollowingspecifiedvalues.DescriptorsotherthanthosespecifiedbelowSHALLNOTbeused. ES_ID=0 streamDependenceFlag=0 URL_Flag=0 OCRstreamFlag=0(false) streamPriority=0 decConfigDescr=DecoderConfigDescriptor(seeSection5.3.4.1.3) slConfigDescr=SLConfigDescriptor,predefinedtype2

5.3.4.1.4 DecoderConfigDescriptor ThesyntaxandvaluesforDecoderConfigDescriptorSHALLconformto[MPEG4S],andthefields

ofthisdescriptorSHALLbesettothefollowingspecifiedvalues.Inthisdescriptor,DecoderSpecificInfoSHALLbeused,andProfileLevelIndicationIndexDescriptorSHALLNOTbeused. objectTypeIndication=0x40(Audio) streamType=0x05(AudioStream) upStream=0 decSpecificInfo=AudioSpecificConfig(seeSection5.3.4.1.4)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |76

5.3.4.1.5 AudioSpecificConfig ThesyntaxandvaluesforAudioSpecificConfigSHALLconformto[AAC]andthefieldsof

AudioSpecificConfigSHALLbesettothefollowingspecifiedvalues: audioObjectType=5(SBR) channelConfiguration=1(formonoorparametricstereo)or2(forstereo) underlyingaudioobjecttype=2(AACLC) GASpecificConfig(seeSection5.3.4.1.5)

ThisconfigurationusesexplicithierarchicalsignalingtoindicatetheuseoftheSBRcodingtool,andimplicitsignalingtoindicatetheuseofthePScodingtool.

5.3.4.1.6 GASpecificConfig ThesyntaxandvaluesforGASpecificConfigSHALLconformto[AAC],andthefieldsof

GASpecificConfigSHALLbesettothefollowingspecifiedvalues. frameLengthFlag=0(1024linesIMDCT) dependsOnCoreCoder=0 extensionFlag=0

5.3.4.2 MPEG‐4HEAACv2ElementaryStreamConstraints

5.3.4.2.1 OverviewNote:MPEG‐4HEAACv2isthesupersetofMPEG‐4AAC,MPEG‐4HEAACandMPEG‐4HEAACv2.

5.3.4.2.2 GeneralEncodingConstraintsTheMPEG‐4HEAACv2elementarystreamasdefinedin[AAC]SHALLconformtotherequirementsoftheMPEG‐4HEAACv2ProfileatLevel2,exceptasfollows:

TheelementarystreamMAYbeencodedaccordingtotheMPEG‐4AAC,HEAACorHEAACv2Profile.UseoftheMPEG‐4HEAACv2profileisrecommended.

TheaudioSHALLbeencodedinmono,parametricstereoor2‐channelstereo. ThetransformlengthoftheIMDCTforAACSHALLbe1024samplesforlongand128forshort

blocks. TheelementarystreamSHALLbeaRawDatastream.ADTSandADIFSHALLNOTbeused. ThefollowingparametersSHALLNOTchangewithintheelementarystream:

AudioObjectType SamplingFrequency ChannelConfiguration BitRate

5.3.4.2.3 SyntacticElements ThesyntaxandvaluesforsyntacticelementsSHALLconformto[AAC].Thefollowingelements

SHALLNOTbepresentinanMPEG‐4HEAACv2elementarystream: coupling_channel_element(CCE) program_config_element(PCE).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |77

5.3.4.2.3.1 ArrangementofSyntacticElements SyntacticelementsSHALLbearrangedinthefollowingorderforthechannelconfigurationsbelow.

<SCE><FIL><TERM>…formonoandparametricstereo <CPE><FIL><TERM>...forstereo

5.3.4.2.3.2 ics_info Thesyntaxandvaluesforics_infoSHALLconformto[AAC].ThefollowingfieldsSHALLbesetas

defined: predictor_data_present=0

5.3.4.2.3.3 MaximumBitrateThemaximumbitrateofMPEG‐4HEAACv2elementarystreamsinaDCCSHALLbecalculatedinaccordancewiththeAACbufferrequirementsasdefinedinISO/IEC14496‐3:2009,section4.5.3.OnlytherawdatastreamSHALLbeconsideredindeterminingthemaximumbitrate(system‐layerdescriptorsareexcluded).

5.3.5 MPEG‐4 HE AAC v2with MPEG Surround

5.3.5.1 Overview

Note:MPEG‐4HEAACv2isthesupersetofMPEG‐4AAC,MPEG‐4HEAACandMPEG‐4HEAACv2.

5.3.5.2 StorageofMPEG‐4HEAACv2ElementaryStreamswithMPEGSurround

StorageofMPEG‐4HEAACv2elementarystreamsthatcontainMPEGSurroundspatialaudiodatawithinaDCCSHALLbeaccordingto[MP4]and[AAC].TherequirementsdefinedinSection5.3.4.1SHALLbemetwhenstoringMPEG‐4HEAACv2elementarystreamscontainingMPEGSurroundspatialaudiodatainaDCC.Additionally:

ThepresenceofMPEGSurroundspatialaudiodatawithinanMPEG‐4AAC,HEAACorHEAACv2elementarystreamSHALLbeindicatedusingexplicitbackwardcompatiblesignalingasspecifiedin[AAC]. ThempsPresentFlagwithintheAudioSpecificConfigSHALLbesetto1.

5.3.5.3 MPEG‐4HEAACv2withMPEGSurroundElementaryStreamConstraints

5.3.5.3.1 337BGeneralEncodingConstraintsTheelementarystreamasdefinedin[AAC]and[MPS]SHALLbeencodedaccordingtothefunctionalitydefinedintheMPEG‐4AAC,HEAACorHEAACv2ProfileatLevel2,incombinationwiththefunctionalitydefinedinMPEGSurroundBaselineProfileLevel4,withthefollowingadditionalconstraints:

TheaudioSHALLbeencodedinmono,parametricstereoor2‐channelstereo. ThetransformlengthoftheIMDCTforAACSHALLbe1024samplesforlongand128forshort

blocks. TheelementarystreamSHALLbeaRawDatastream.ADTSandADIFSHALLNOTbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |78

ThefollowingparametersSHALLNOTchangewithintheelementarystream: AudioObjectType SamplingFrequency ChannelConfiguration BitRate

TheMPEGSurroundpayloaddataSHALLbeembeddedwithinthecoreelementarystream,asspecifiedin[AAC]andSHALLNOTbecarriedinaseparateaudiotrack.

ThesamplingfrequencyoftheMPEGSurroundpayloaddataSHALLbeequaltothesamplingfrequencyofthecoreelementarystream.

SeparatefillelementsSHALLbeemployedtoembedtheSBR/PSextensiondataelementssbr_extension_data()andtheMPEGSurroundspatialaudiodataSpatialFrame().

ThevalueofbsFrameLengthSHALLbesetto15,31or63,resultingineffectiveMPEGSurroundframelengthsof1024,2048or4096timedomainsamplesrespectively.

AllaudioaccessunitsSHALLcontainanextensionpayloadoftypeEXT_SAC_DATA. TheintervalbetweenoccurrencesofSpatialSpecificConfiginthebit‐streamSHALLNOT

exceed500ms.WithinthecorrespondingSpatialFrame()thevalueofbsIndependencyFlagSHALLbesettoone.

Toensureconsistentdecoderbehaviorduringtrickplayoperations,thefirstAudioSampleofeachfragmentSHALLcontaintheSpatialSpecificConfigstructure.WithinthecorrespondingSpatialFrame()thevalueofbsIndependencyFlagSHALLbesettoone.

5.3.5.3.2 SyntacticElements ThesyntaxandvaluesforsyntacticelementsSHALLconformto[AAC]and[MPS].Thefollowing

elementsSHALLNOTbepresentinanMPEG‐4HEAACv2elementarystreamthatcontainsMPEGSurrounddata: coupling_channel_element(CCE) program_config_element(PCE).

5.3.5.3.2.1 ArrangementofSyntacticElements SyntacticelementsSHALLbearrangedinthefollowingorderforthechannelconfigurationsbelow:

<SCE><FIL><FIL><TERM>…formonoandparametricstereocoreaudiostreams <CPE><FIL><FIL><TERM>...forstereocoreaudiostreams

5.3.5.3.2.2 ics_info Thesyntaxandvaluesforics_infoSHALLconformto[AAC].ThefollowingfieldsSHALLbesetas

defined: predictor_data_present=0

5.3.5.3.2.3 MaximumBitrateThemaximumbitrateofMPEG‐4HEAACv2elementarystreamsthatcontainMPEGSurroundspatialaudiodataSHALLbecalculatedinaccordancewiththeAACbufferrequirementsasdefinedinISO/IEC14496‐

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |79

3:2009,section4.5.3.OnlytherawdatastreamSHALLbeconsideredindeterminingthemaximumbitrate(system‐layerdescriptorsareexcluded).

5.4 MPEG‐H3DAudioFormat

5.4.1 Storage of MPEG‐H 3D AudioElementary Streams

5.4.1.1 Overview

StorageofMPEG‐H3DAudioelementarystreamswithinaDCCSHALLbeaccordingto[MHA],withthefollowingadditionalconstraints:

AnaudiosampleSHALLconsistofasingleMPEG‐H3DAudioaccessunit. TheparametervaluesofMHADecoderConfigurationRecordandMHASampleEntrySHALL

beconsistentwiththeconfigurationoftheMPEG‐H3DAudiostream.

5.4.1.2 AudioSampleEntryBoxforMPEG‐H3DAudio

ThesyntaxandvaluesoftheaudiosampleentrySHALLconformtoMHASampleEntry(‘mha1’)asdefinedin[MHA],andthefollowingfieldsSHALLbesetasdefined:

channelcountSHALLbesetto‘0’(inapplicable).TheMPEG‐H3DAudiodecoderiscapableofrenderingascenetoanygivenspeakersetup.ThereferenceChannelLayoutcarriedintheMHADecoderConfigurationRecordSHALLbeusedtosignalthepreferredreproductionlayoutforthisstreamandreplacesthechannelcountaccordingto[MHA].

configisanMHAConfigurationBoxwhichcontainstheMHADecoderConfigurationRecord.

5.4.1.3 MPEG‐H3DAudioDecoderConfigurationRecord

ThesyntaxandvaluesofMHADecoderConfigurationRecordSHALLconformto[MHA],andthefollowingfieldsSHALLbesetasdefined:

referenceChannelLayoutSHALLbe‘ChannelConfiguration’accordingto[CICP].

5.4.2 MPEG‐H 3D AudioElementary Stream Constraints

5.4.2.1 GeneralEncodingConstraints

MPEG‐H3DAudioSHALLconformto[MHA]withthefollowingrestrictions ThefollowingparametersSHALLnotchangewithintheMPEG‐H3DAudioelementarystream:

samplingfrequency audioframelength referenceloudspeakerlayout numberofaudiochannels numberofaudioobjects

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |80

numberoftransportchannels

5.4.2.2 MaximumBitrate

ThemaximumbitrateofMPEG‐H3DAudioelementarystreamsinaDCCSHALLbecalculatedinaccordancewiththebufferrequirementsasdefinedin[MHA].OnlytherawdatastreamSHALLbeconsideredindeterminingthemaximumbitrate(systemlayerdescriptorsareexcluded).

5.5 AC‐3,EnhancedAC‐3,MLP,AC‐4andDTSFormatTimingStructure

UnliketheMPEG‐4audioformats,theDTSandDolbyformatsdonotoverlapbetweenframes.Synchronizedframesrepresentacontiguousaudiostreamwhereeachaudioframerepresentsanequalsizeblockofsamplesatagivensamplingfrequency.SeeFigure52‐forillustration.

Figure5‐2–Non‐AACbit‐streamexample

Additionally,unlikeAACaudioformats,theDTSandDolbyformatsdonotrequireexternalmetadatatosetupthedecoder,astheyarefullycontainedinthatregard.Descriptordataisprovided,however,toprovideinformationtothesystemwithoutrequiringaccesstotheelementarystream,astheESistypicallyencryptedintheDCC.

5.6 DolbyFormats

5.6.1 AC‐3 (Dolby Digital)

5.6.1.1 StorageofAC‐3ElementaryStreams

5.6.1.1.1 OverviewStorageofAC‐3elementarystreamswithinaDCCSHALLbeaccordingtoAnnexFof[EAC3].

AnaudiosampleSHALLconsistofasingleAC‐3frame.

1 2 3 4 5 6

Sequence of Synchronized Frames

1 2 3 4 5 6Decoded PCM audio

1 2 3 4 5 6Source PCM audio

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |81

NotethatperAnnexFof[EAC3]theaudiostreamcanbeencodedeither"bigendian"or"littleendian"byteorder.BigendianSHOULDbeused.

5.6.1.1.2 AudioSampleEntryBoxforAC‐3ThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoAC3SampleEntry(‘ac-3’)asdefinedinAnnexFof[EAC3].TheconfigurationoftheAC‐3elementarystreamisdescribedintheAC3SpecificBox(‘dac3’)withinAC3SampleEntry,asdefinedinAnnexFof[EAC3].ForconveniencethesyntaxandsemanticsoftheAC3SpecificBoxarereplicatedinSection5.5.1.1.2.

5.6.1.1.3 AC3SpecificBoxThesyntaxoftheAC3SpecificBoxisshownbelow:Class AC3SpecificBox { unsigned int(2) fscod; unsigned int(5) bsid; unsigned int(3) bsmod; unsigned int(3) acmod; unsigned int(1) lfeon; unsigned int(5) bit_rate_code; unsigned int(5) reserved = 0; }

5.6.1.1.3.1 SemanticsThefscod,bsid,bsmod,acmodandlfeonfieldshavethesamemeaningandaresettothesamevalueastheequivalentparametersintheAC‐3elementarystream.Thebit_rate_code fieldisderivedfromthevalueoffrmsizcodintheAC‐3bit‐streamaccordingtoTable52‐.

Table5‐2–bit_rate_codebit_rate_code Nominalbitrate(kbit/s)00000 3200001 4000010 4800011 5600100 6400101 8000110 9600111 11201000 12801001 16001010 19201011 22401100 25601101 32001110 38401111 44810000 51210001 57610010 640

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |82

ThecontentsoftheAC3SpecificBoxSHALLNOTbeusedtoconfigureorcontroltheoperationofanAC‐3audiodecoder.

5.6.1.2 AC‐3ElementaryStreamConstraints

5.6.1.2.1 OverviewAC‐3elementarystreamsSHALLcomplywiththesyntaxandsemanticsasspecifiedin[EAC3],notincludingAnnexE.AdditionalconstraintsonAC‐3audiostreamsarespecifiedinthissection.

5.6.1.2.2 GeneralEncodingConstraintsAC‐3elementarystreamsSHALLbeconstrainedasfollows:

TheminimumbitrateofanAC‐3elementarystreamSHALLbe64x103bits/second. Thefollowingbit‐streamparametersSHALLremainconstantwithinanAC‐3elementarystreamfor

thedurationofanAC‐3audiotrack: bsid bsmod acmod lfeon fscod frmsizcod

5.6.1.2.3 AC‐3synchronizationframeconstraints AC‐3synchronizationframesSHALLcomplywiththefollowingconstraints:

bsid–bit‐streamidentification:ThisfieldSHALLbesetto1000b(8),or110b(6)whenthealternatebit‐streamsyntaxdescribedinAnnexDof[EAC3]isused.

frmsizecod–framesizecode:ThisfieldSHALLbesettoavaluebetween001000bto100101b(64Kbpsto640Kbps).

acmod–audiocodingmode:Allaudiocodingmodesexceptdualmono(acmod =000b)definedinTable4‐3of[EAC3]arepermitted.

5.6.1.2.4 MaximumBitrateThemaximumbitrateofAC‐3elementarystreamsSHALLbecalculatedasthesamplesizedividedbytheduration.Note:TheminimumsamplesizeforAC‐3is256bytes(64Kbps).TherewillonlybeonesizevalueforthewholetrackasthestreamisCBR.Thedurationofthesampleis0.032seconds.

5.6.2 Enhanced AC‐3 (Dolby Digital Plus)

5.6.2.1 StorageofEnhancedAC‐3ElementaryStreams

5.6.2.1.1 OverviewStorageofEnhancedAC‐3elementarystreamswithinaDCCSHALLbeaccordingtoAnnexFof[EAC3].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |83

AnaudiosampleSHALLconsistofthenumberofsyncframesrequiredtodeliversixblocksofaudiodatafromeachsubstreamintheEnhancedAC‐3elementarystream(definedasanEnhancedAC‐3AccessUnit).

ThefirstsyncframeofanaudiosampleSHALLbethesyncframethathasastreamtypevalueof0(independent)andasubstreamIDvalueof0.

ForEnhancedAC‐3elementarystreamsthatconsistofsyncframescontainingfewerthan6blocksofaudio,thefirstsyncframeofanaudiosampleSHALLbethesyncframethathasastreamtypevalueof0(independent),asubstreamIDvalueof0,andhasthe“convsync”flagsetto“1”.

NotethatperAnnexFof[EAC3]theaudiostreamcanbeencodedeither"bigendian"or"littleendian"byteorder.BigendianSHOULDbeused.

5.6.2.1.2 344BAudioSampleEntryBoxforEnhancedAC‐3ThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoEC3SampleEntry(‘ec-3’)definedinAnnexFof[EAC3].TheconfigurationoftheEnhancedAC‐3elementarystreamisdescribedintheEC3SpecificBox(‘dec3’),withinEC3SampleEntry,asdefinedinAnnexFof[EAC3].ForconveniencethesyntaxandsemanticsoftheEC3SpecificBoxarereplicatedinSection5.5.2.1.2.

5.6.2.1.3 345BEC3SpecificBoxThesyntaxandsemanticsoftheEC3SpecificBoxareshownbelow.ThesyntaxshownisasimplifiedversionofthefullsyntaxdefinedinAnnexFof[EAC3],astheEnhancedAC‐3encodingconstraintsspecifiedinSection5.5.2.2restrictthenumberofindependentsubstreamsto1,soonlyasinglesetofindependentsubstreamparametersisincludedintheEC3SpecificBox.class EC3SpecificBox { unsigned int(13) data_rate; unsigned int(3) num_ind_sub; unsigned int(2) fscod; unsigned int(5) bsid; unsigned int(5) bsmod; unsigned int(3) acmod; unsigned int(1) lfeon; unsigned int(3) reserved = 0; unsigned int(4) num_dep_sub; if (num_dep_sub > 0) { unsigned int(9) chan_loc; } else { unsigned int(1) reserved = 0; } }

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |84

5.6.2.1.3.1 Semantics data_rate–thisfieldindicatesthebitrateoftheEnhancedAC‐3elementarystreaminkbit/s.For

EnhancedAC‐3elementarystreamswithinaDCC,theminimumvalueofthisfieldis32. num_ind_sub–Thisfieldindicatesthenumberofindependentsubstreamsthatarepresentinthe

EnhancedAC‐3bit‐stream.Thevalueofthisfieldisonelessthanthenumberofindependentsubstreamspresent.ForEnhancedAC‐3elementarystreamswithinaDCC,thisfieldisalwayssetto0(indicatingthattheEnhancedAC‐3elementarystreamcontainsasingleindependentsubstream).

fscod–Thisfieldhasthesamemeaningandissettothesamevalueasthefscodfieldinindependentsubstream0.

bsid–Thisfieldhasthesamemeaningandissettothesamevalueasthebsidfieldinindependentsubstream0.

bsmod–Thisfieldhasthesamemeaningandissettothesamevalueasthebsmodfieldinindependentsubstream0.Ifthebsmodfieldisnotpresentinindependentsubstream0,thisfieldSHALLbesetto0.

acmod–Thisfieldhasthesamemeaningandissettothesamevalueastheacmodfieldinindependentsubstream0.

lfeon–Thisfieldhasthesamemeaningandissettothesamevalueasthelfeonfieldinindependentsubstream0.

num_dep_sub–Thisfieldindicatesthenumberofdependentsubstreamsthatareassociatedwithindependentsubstream0.ForEnhancedAC‐3elementarystreamswithinaDCC,thisfieldMAYbesetto0or1.

chan_loc–Ifthereisadependentsubstreamassociatedwithindependentsubstream,thisbitfieldisusedtoidentifychannellocationsbeyondthoseidentifiedusingtheacmodfieldthatarepresentinthebit‐stream.Foreachchannellocationorpairofchannellocationspresent,thecorrespondingbitinthechan_locbitfieldissetto"1",accordingtoTable53‐.Thisinformationisextractedfromthechanmapfieldofthedependentsubstream.

Table5‐3–chan_locfieldbitassignmentsBit Location0 Lc/Rcpair1 Lrs/Rrspair2 Cs3 Ts4 Lsd/Rsdpair5 Lw/Rwpair6 Lvh/Rvhpair7 Cvh8 LFE2

ThecontentsoftheEC3SpecificBoxSHALLNOTbeusedtocontroltheconfigurationoroperationofanEnhancedAC‐3audiodecoder.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |85

5.6.2.2 EnhancedAC‐3ElementaryStreamConstraints

5.6.2.2.1 OverviewEnhancedAC‐3elementarystreamsSHALLcomplywiththesyntaxandsemanticsasspecifiedin[EAC3],includingAnnexE.AdditionalconstraintsonEnhancedAC‐3audiostreamsarespecifiedinthissection.

5.6.2.2.2 346BGeneralEncodingConstraintsEnhancedAC‐3elementarystreamsSHALLbeconstrainedasfollows:

TheminimumbitrateofanEnhancedAC‐3elementarystreamSHALLbe32x103bits/second. AnEnhancedAC‐3elementarystreamSHALLalwayscontainatleastoneindependentsubstream

(streamtype0)withasubstreamIDof0.AnEnhancedAC‐3elementarystreamMAYalsoadditionallycontainonedependentsubstream(streamtype1).

Thefollowingbit‐streamparametersSHALLremainconstantwithinanEnhancedAC‐3elementarystreamforthedurationofanEnhancedAC‐3track: Numberofindependentsubstreams Numberofdependentsubstreams Withinindependentsubstream0:

o bsido bsmod o acmod o lfeon o fscod

Withindependentsubstream0:o bsid o acmod o lfeon o fscod o chanmap

5.6.2.2.3 Independentsubstream0constraintsIndependentsubstream0consistsofasequenceofEnhancedAC‐3synchronizationframes.ThesesynchronizationframesSHALLcomplywiththefollowingconstraints:

bsid–bit‐streamidentification:Ifindependentsubstream0istheonlysubstreamintheEnhancedAC‐3elementarystream,thisfieldSHALLbesetto10000b(16).IftheEnhancedAC‐3elementarystreamcontainsbothindependentsubstream0anddependentsubstream0,thisfieldSHALLbesetto00110(6),01000(8)or10000(16).

Whenbsid=10000b(16),then: strmtyp–streamtype:ThisfieldSHALLbesetto00b(StreamType0–independent

substream);and substreamid–substreamidentification:ThisfieldSHALLbesetto000b(substreamID=

0). acmod–audiocodingmode:Allaudiocodingmodesexceptdualmono(acmod=000b)definedin

Table4‐3of[EAC3]arepermitted.Audiocodingmodedualmono(acmod=000b)SHALLNOTbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |86

5.6.2.2.4 DependentsubstreamconstraintsDependentsubstream0consistsofasequenceofEnhancedAC‐3synchronizationframes.ThesesynchronizationframesSHALLcomplywiththefollowingconstraints:

bsid–bit‐streamidentification:ThisfieldSHALLbesetto10000b(16). strmtyp–streamtype:ThisfieldSHALLbesetto01b(StreamType1–dependentsubstream). substreamid–substreamidentification:ThisfieldSHALLbesetto000b(substreamID=0). acmod–audiocodingmode:Allaudiocodingmodesexceptdualmono(acmod=000b)definedin

Table4‐3of[EAC3]arepermitted.Audiocodingmodedualmono(acmod=000b)SHALLNOTbeused.

5.6.2.2.5 Substreamconfigurationfordeliveryofmorethan5.1channelsofaudioTodelivermorethan5.1channelsofaudio,bothindependent(StreamType0)anddependent(StreamType1)substreamsareincludedintheEnhancedAC‐3elementarystream.Thechannelconfigurationofthecompleteelementarystreamisdefinedbytheacmodparametercarriedintheindependentsubstream,andtheacmodandchanmapparameterscarriedinthedependentsubstream.TheloudspeakerlocationssupportedbyEnhancedAC‐3aredefinedin[SMPTE428].Thefollowingrulesapplytochannelnumbersandsubstreamuse:

Whenmorethan5.1channelsofaudioaretobedelivered,independentsubstream0ofanEnhancedAC‐3elementarystreamSHALLbeconfiguredasadownmixofthecompleteprogram.

Additionalchannelsnecessarytodeliverupto7.1channelsofaudioSHALLbecarriedindependentsubstream0.

5.6.2.2.6 MaximumBitrateThemaximumbitrateofEnhancedAC‐3elementarystreamsSHALLbecalculatedasthesamplesizedividedbytheduration.Note:TheminimumsamplesizeofEnhancedAC‐3is128bytes(32Kbps).Astherearealwayssixblocksofaudiodatafromeverysubstreampresentinthesample,thedurationofeachsampleisthesameasAC‐3–0.032seconds.

5.6.3 MLP (Dolby TrueHD)

5.6.3.1 StorageofMLPelementarystreams

5.6.3.1.1 OverviewStorageofMLPelementarystreamswithinaDCCSHALLbeaccordingto[MLPISO].

AnaudiosampleSHALLconsistofasingleMLPaccessunitasdefinedin[MLP].

5.6.3.1.2 AudioSampleEntryBoxforMLPThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoMLPSampleEntry(‘mlpa’)definedin[MLPISO].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |87

WithinMLPSampleEntry,thesampleRatefieldhasbeenredefinedasasingle32‐bitintegervalue,ratherthanthe16.16fixed‐pointfielddefinedintheISObasemediafileformat.Thisenablesexplicitsupportforsamplingfrequenciesgreaterthan48kHz.TheconfigurationoftheMLPelementarystreamisdescribedintheMLPSpecificBox(‘dmlp’),withinMLPSampleEntry,asdescribedin[MLPISO].ForconveniencethesyntaxandsemanticsoftheMLPSpecificBoxarereplicatedinSection5.5.3.1.2.

5.6.3.1.3 MLPSpecificBoxThesyntaxandsemanticsoftheMLPSpecificBoxareshownbelow:Class MLPSpecificBox { unsigned int(32) format_info; unsigned int(15) peak_data_rate; unsigned int(1) reserved = 0; unsigned int(32) reserved = 0; }

5.6.3.1.3.1 Semantics format_info–Thisfieldhasthesamemeaningandissettothesamevalueastheformat_info

fieldintheMLPbit‐stream. peak_data_rate –Thisfieldhasthesamemeaningandissettothesamevalueasthe

peak_data_rate fieldintheMLPbit‐stream.ThecontentsoftheMLPSpecificBoxSHALLNOTbeusedtocontroltheconfigurationoroperationofanMLPaudiodecoder.

5.6.3.2 MLPElementaryStreamConstraints

5.6.3.2.1 OverviewMLPelementarystreamsSHALLcomplywiththesyntaxandsemanticsasspecifiedin[MLP].AdditionalconstraintsonMLPaudiostreamsarespecifiedinthissection.

5.6.3.2.2 GeneralEncodingConstraintsMLPelementarystreamsSHALLbeconstrainedasfollows:

AllMLPelementarystreamsSHALLcomplywithMLPFormBsyntax,andthestreamtypeSHALLbeFBAstreams.

ThesamplerateofallsubstreamswithintheMLPbit‐streamSHALLbeidentical. ThefollowingparametersSHALLremainconstantwithinanMLPelementarystreamforthe

durationofanMLPaudiotrack. audio_sampling_frequency –samplingfrequency substreams –numberofMLPsubstreams min_chanandmax_chan ineachsubstream–numberofchannels 6ch_source_formatand8ch_source_format–audiochannelassignment substream_info–substreamconfiguration

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |88

5.6.3.2.3 MLPaccessunitconstraints Samplerate–ThesamplerateSHALLbeidenticalonallchannels. Samplingphase–ThesamplingphaseSHALLbesimultaneousforallchannels. Wordsize–ThequantizationofsourcedataandofcodeddataMAYbedifferent.Thequantization

ofcodeddataisalways24bits.Whenthequantizationofsourcedataisfewerthan24bits,thesourcedataispaddedto24bitsbyaddingbitsofzero(‘0’)astheleastsignificantbit(s).

2‐chdecodersupport–ThestreamSHALLincludesupportfora2‐chdecoder. 6‐chdecodersupport–ThestreamSHALLincludesupportfora6‐chdecoderwhenthetotal

streamcontainsmorethan6channels. 8‐chdecodersupport–ThestreamSHALLincludesupportforan8‐chdecoder.

5.6.3.2.4 LoudspeakerAssignmentsTheMLPelementarystreamsupports2‐channel,6‐channeland8‐channelpresentations.Loudspeakerlayoutoptionsaredescribedforeachpresentationinthestream.PleaserefertoAppendixEof“MeridianLosslessPacking‐TechnicalReferenceforFBAandFBBstreams”Version1.0.TheloudspeakerlocationssupportedbyMLParedefinedin[SMPTE428].

5.6.3.2.5 MaximumBitrateThemaximumbitrateofMLPelementarystreamsSHALLbecalculatedaccordingtoMLPTechRef[MLP]Section8.8.1.

5.6.4 AC‐4

5.6.4.1 StorageofAC‐4ElementaryStreams

5.6.4.1.1 OverviewStorageofAC‐4elementarystreamswithinaDCCSHALLbeaccordingtoAnnexEof[AC4].

5.6.4.1.2 344BAudioSampleEntryBoxforAC‐4ThesyntaxandvaluesoftheAudioSampleEntryboxSHALLconformtoAC4SampleEntry(‘ac-4’)definedinAnnexE,clause3of[AC4].TheconfigurationoftheAC‐4elementarystreamisdescribedintheAC4SpecificBox(‘dac4’),withintheAC4SampleEntry,asdefinedinAnnexE,clause4of[AC4].AdditionalrulesforAC‐4audiotracksinfragmentedISOBMFFmediaformataredefinedinAnnexE,clause5of[AC4].

5.6.4.2 AC‐4ElementaryStreamConstraints

5.6.4.2.1 OverviewAC‐4elementarystreamsSHALLcomplywiththesyntaxandsemanticsasspecifiedin[AC4].AdditionalconstraintsonAC‐4audiostreamsarespecifiedinthissection.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |89

5.6.4.2.2 346BGeneralEncodingConstraintsAC‐4elementarystreamsSHALLbeconstrainedasfollows:

TheminimumbitrateofanAC‐4elementarystreamSHALLbe32x103bits/second.

5.6.4.2.3 MaximumBitrateThemaximumbitrateofAC‐4elementarystreamsSHALLbecalculatedasthesumofallsamplesizesdividedbytheaccumulateddurationofallsamples.

5.7 DTSFormats

5.7.1 Storage of DTS elementary streams

StorageofDTSformatswithinaDCCSHALLbeaccordingtothisspecification. AnaudiosampleSHALLconsistofasingleDTSaudioframe,asdefinedin[DTS].

5.7.1.1 AudioSampleEntryBoxforDTSFormats

ThesyntaxandvaluesoftheAudioSampleEntryBoxSHALLconformtoDTSSampleEntry.TheparametersampleRateSHALLbesettoeitherthesamplingfrequencyindicatedbySFREQinthecoresubstreamortothefrequencyrepresentedbytheparameternuRefClockCodeintheextensionsubstream.TheconfigurationoftheDTSelementarystreamisdescribedintheDTSSpecificBox(‘ddts’),withinDTSSampleEntry.ThesyntaxandsemanticsoftheDTSSpecificBoxaredefinedinthefollowingsection.TheparameterchannelcountSHALLbesettothenumberofdecodableoutputchannelsinbasicplayback,asdescribedinthe(‘ddts’) configurationbox.

5.7.1.2 DTSSpecificBox

ThesyntaxandsemanticsoftheDTSSpecificBoxareshownbelow.class DTSSpecificBox { unsigned int(32) size; //Box.size unsigned char[4] type=‘ddts’; //Box.type unsigned int(32) DTSSamplingFrequency; unsigned int(32) maxBitrate; unsigned int(32) avgBitrate; unsigned char reserved = 0; bit(2) FrameDuration; // 0=512, 1=1024, 2=2048, 3=4096 bit(5) StreamConstruction; // Table 5-4 bit(1) CoreLFEPresent; // 0=none; 1=LFE exists bit(6) CoreLayout; //  

StreamConstructionCoreSubstream ExtensionSubstream

Core XCH X96 XXCH Core XXCH X96 XBR XLL LBR

1

2

3

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |90

StreamConstructionCoreSubstream ExtensionSubstream

Core XCH X96 XXCH Core XXCH X96 XBR XLL LBR

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

Table 5-5 bit(14) CoreSize; // FSIZE, Not to exceed 4064 bytes bit(1) StereoDownmix // 0=none; 1=emb. downmix present bit(3) RepresentationType; // Table 5-6 bit(16) ChannelLayout; // Table 5-7 bit(1) MultiAssetFlag = 0; bit(1) LBRDurationMod = 0; bit(1) ExpansionBoxPresent; // 0=no ExpansionBox, 1=ExpansionBox present bit(5) reserved = 0; DTSExpansionBox[] boxes; // zero or more expansion boxes }

5.7.1.2.1 Semantics DTSSamplingFrequency–Themaximumsamplingfrequencystoredinthecompressedaudio

stream. maxBitrate–Thepeakbitrate,inbitspersecond,oftheaudioelementarystreamfortheduration

ofthetrack.Thecalculatedvaluewillberoundeduptothenearestinteger. avgBitrate–Theaveragebitrate,inbitspersecond,oftheaudioelementarystreamforthe

durationofthetrack.Thecalculatedvaluewillberoundeduptothenearestinteger. FrameDuration–Thiscoderepresentsthenumberofaudiosamplesdecodedinacompleteaudio

accessunitatDTSSamplingFrequency.

CoreLayout–ThisparameterisidenticaltotheDTSCoresubstreamheaderparameterAMODE[DTS]andrepresentsthechannellayoutofthecoresubstreampriortoapplyinganyinformationstoredinanyextensionsubstream.See 

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |91

StreamConstructionCoreSubstream ExtensionSubstream

Core XCH X96 XXCH Core XXCH X96 XBR XLL LBR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

Table5‐5.Ifnocoresubstreamexists,thisparameterSHALLbeignored. CoreLFEPresent–IndicatesthepresenceofanLFEchannelinthecore.Ifnocoreexists,this

valueSHALLbeignored. StreamConstructon–Providescompleteinformationontheexistenceandoflocationof

extensionsinanysynchronizedframe.SeeTable5‐4. ChannelLayout–ThisparameterisidenticaltonuSpkrActivitymask definedintheextension

substreamheader[DTS].This16‐bitparameterthatprovidescompleteinformationonchannelscodedintheaudiostreamincludingcoreandextensions.SeeTable5‐7.ThebinarymasksofthechannelspresentinthestreamareaddedtogethertocreateChannelLayout.

StereoDownmix –Indicatesthepresenceofanembeddedstereodownmixinthestream.Thisparameterisnotvalidforstereoormonostreams.

CoreSize–ThisparameterisderivedfromFSIZEinthecoresubstreamheader[DTS]anditrepresentsacoreframepayloadinbytes.Inthecasewhereanextensionsubstreamexistsinanaccessunit,thisrepresentsthesizeofthecoreframepayloadonly.ThissimplifiesextractionofjustthecoresubstreamfordecodingorexportingoninterfacessuchasS/PDIF.ThevalueofCoreSizewillalwaysbelessthanorequalto4064bytes.InthecasewhenCoreSize=0,CoreLayoutandCoreLFEPresentSHALLbeignored.ChannelLayoutwillbeusedtodeterminechannelconfiguration.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |92

RepresentationType –ThisparameterisderivedfromthevaluefornuRepresentationtypeinthesubstreamheader[DTS].Thisindicatesspecialpropertiesoftheaudiopresentation.SeeTable5‐6.ThisparameterisonlyvalidwhenallflagsinChannelLayoutaresetto0.IfChannelLayout≠0,thisvalueSHALLbeignored.

Channel Layout‐Providescompleteinformationonchannelscodedintheaudiostreamincludingcoreandextensions.Thebinarymasksofthechannelspresent,asshowninTableTable5‐7,areaddedtogethertocreateChannelLayout.

MultiAssetFlag – Thisflagshallbesetifthestreamcontainsmorethanoneasset.ThisalsoimpliesthataDTSextensionsubstreamispresent.Multipleassetstreamsshallusethe‘dtsh’codingtype.Whenmultipleassetsexist,theremainingparametersintheDTSSpecificBoxonlyreflectthecodingparametersofthefirstasset.

LBRDurationMod – ThisflagindicatesaspecialcaseoftheLBRcodingbandwidth,resultingin1/3or2/3bandlimiting.TheresultofthisistheLBRframedurationis50%largerthanindicatedinFrameDuration.Forexample,whenthisflagissetto1,theFrameDurationis6144samplesinsteadof4096samples.

ExpansionBoxPresent - Thisflagindicatesthatatleast1boxoccupiestheExpansionBoxplaceholder.

DTSExpansionBox – Thisbox,ifpresent,willcontainadditionalprivateboxes.IfExpansionBoxPresent=1,oneormoreadditionalprivateboxesto‘ddts’arepresent.Playbackdevicesnotcapableofsupportingtheseboxeswillbeabletorelyonthedefinedparametersin‘ddts’forbasicplaybackcapability.SelectprivateboxesthatmayappearintheExpansionBoxaredefinedinsection5.7.1.3.

Table5‐4–StreamConstruction

StreamConstructionCoreSubstream ExtensionSubstream

Core XCH X96 XXCH Core XXCH X96 XBR XLL LBR

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |93

StreamConstructionCoreSubstream ExtensionSubstream

Core XCH X96 XXCH Core XXCH X96 XBR XLL LBR

19

20

21

Table5‐5–CoreLayout

CoreLayout Description0 Mono(1/0)2 Stereo(2/0)4 LT,RT(2/0)5 L,C,R(3/0)6 L,C,R,S(2/1)7 L,R,S(3/1)8 L,R.LS,RS(2/2)

9L,C,R,LS,RS(3/2)

Table5‐6–RepresentationTypeRepresentationType Description000b Audioassetdesignatedformixingwithanotheraudioasset001b Reserved

010bLt/RtEncodedformatrixsurrounddecoding;itimpliesthattotalnumberofencodedchannelsis2

011bAudioprocessedforheadphoneplayback;itimpliesthattotalnumberofencodedchannelsis2

100b NotApplicable101b–111b Reserved

Table5‐7–ChannelLayoutNotation LoudspeakerLocationDescription BitMasks NumberofChannels

C Centerinfrontoflistener 0x0001 1

LR Left/Rightinfront 0x0002 2

LsRs Left/Rightsurroundonsideinrear 0x0004 2

LFE1 Lowfrequencyeffectssubwoofer 0x0008 1

Cs Centersurroundinrear 0x0010 1

LhRh Left/Rightheightinfront 0x0020 2

LsrRsr Left/Rightsurroundinrear 0x0040 2

Ch CenterHeightinfront 0x0080 1

Oh Overthelistener’shead 0x0100 1

LcRc Betweenleft/rightandcenterinfront 0x0200 2

LwRw Left/Rightonsideinfront 0x0400 2

LssRss Left/Rightsurroundonside 0x0800 2

LFE2 Secondlowfrequencyeffectssubwoofer 0x1000 1

LhsRhs Left/Rightheightonside 0x2000 2

Chr Centerheightinrear 0x4000 1

LhrRhr Left/Rightheightinrear 0x8000 2

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |94

5.7.1.3 DTSExpansionBox

IfExpansionBoxPresentissetto1,thenoneormoreprivateboxesreferredtoasDTSExpansionBoxescanbefoundattheendofthe‘ddts’box,fillingtheremainingspaceofthebox.Asdefinedin[ISO]section4.2,boxeswithanunrecognizedtypearetobeignored.ThissectiondefinesselectDTSExpansionBoxes.

5.7.1.3.1 ExtendedParametersbox TheExtendedParametersboxcontainsadditionalmetadatainanextensiblemanner.Ifpresent,theExtendedParametersboxexistsintheExpansionBoxdescribedintheprecedingsection.class ExtendedParameters extends FullBox (‘epba’, version = 0, 0) { bit(1) ChannelLayoutExtFlag; // 0 = no ChannelLayoutExt, 1 = present bit(7) ReservedFlags; // shall be set to 0; if (ChannelLayoutExtFlag == 1) { bit(16) ChannelLayoutExt; } }

5.7.1.3.1.1 Semantics

ChannelLayoutExtFlag–IfChannelLayoutExtFlagissetto1,thenChannelLayoutExtispresent. ReservedFlags–These flags are reserved for future definition and for the purposes of this 

specification shall be set to 0.

ChannelLayoutExt–extensiontoChannelLayout,accordingtoTable5‐8. Table5‐8‐ChannelLayoutExt

BitMasks LoudspeakerLocationDescription NumberofChannels

0x0001 Centerbelowinfront 1

0x0002 Left/Rightbelowinfront 2

0x0004–0x8000 Reserved

5.7.2 Restrictions on DTS Formats

ThissectiondescribestherestrictionsthatSHALLbeappliedtotheDTSformatsencapsulatedinaDCC.

5.7.2.1 Generalconstraints

ThefollowingconditionsSHALLNOTchangeinaDTSaudiostreamoraCoresubstream: DurationofSynchronizedFrame BitRate SamplingFrequency AudioChannelArrangement LowFrequencyEffectsflag Extensionassignment

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |95

ThefollowingconditionsSHALLNOTchangeinanExtensionsubstream: DurationofSynchronizedFrame SamplingFrequency AudioChannelArrangement LowFrequencyEffectsflag Embeddedstereoflag ExtensionsassignmentdefinedinStreamConstruction

5.7.2.2 MaximumBitrate

ThemaximumbitrateofDTSelementarystreamsSHALLbecalculatedfromasingleaudioframe(onesample),bydividingthesizeinbitsofthelargestsamplebythetimedurationofthatsample.Note:maximumbitrateisrepresentedintheDTSSampleEntryasmaxBitrate.Thisisa32‐bitintegervaluerepresentedinbits/secondandiscalculatedonlyfromtheaudioelementarystream,excludinganyandallotherISOBMFFconstructions.Thevalueiscalculatedusingfloatingpointarithmeticandanyfractionalremainderinthecalculationisroundeduptotheintegerportionoftheresultandthatintegerisusedtorepresentthevalue.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |96

6 SubtitleElementaryStreams

6.1 Overview

ThischapterdefinestheCFFsubtitleelementarystreamformat,howitisstoredinaDCCasatrack,andhowitissynchronizedandpresentedincombinationwithvideo.Theterm“subtitle”inthisdocumentisusedtomeanavisualpresentationthatisprovidedsynchronizedwithvideoandaudiotracks.Subtitlesarepresentedforvariouspurposesincludingdialoglanguagetranslation,contentdescription,“closedcaptions”fordeafandhardofhearing,andotherpurposes.Subtitletracksaredefinedwithanewmediatypeandmediahandler,comparabletoaudioandvideomediatypesandhandlers.Subtitletracksuseasimilarmethodtostoreandaccesstimed“samples”thatspandurationsontheMovietimelineandsynchronizewithothertracksselectedforpresentationonthattimelineusingthebasicmediatracksynchronizationmethodofISOBaseMediaFileFormat.CFFsubtitlesaredefinedusingtheTimedTextMarkupLanguage(TTML),asdefinedbythe[SMPTE‐TT]standard,whichisderivedfromtheW3C“TimedTextMarkupLanguage”[W3C‐TT]standard.Withthisapproach,[SMPTE‐TT]XMLdocumentscontrolthepresentationofsubtitlesduringtheirsampleduration,analogoustothewayanISOmediafileaudiosamplecontainsasyncframeoraccessunitofaudiosamplesandpresentationinformationspecifictoeachaudiocodecthatcontrolthedecodingandpresentationofthecontainedaudiosamplesduringthelongerdurationoftheISOmediafilesample.The[W3C‐TT]standardisanXMLmarkuplanguageprimarilydesignedforthepresentationandinterchangeofcharactercodedtextusingfontsets(textsubtitles).The[SMPTE‐TT]standardextendsthe[W3C‐TT]standardtosupportthepresentationofstoredbitmappedimages(imagesubtitles)andtosupportthestorageofdatastreamsforlegacysubtitleandcaptionformats(e.g.CEA‐608).Textandimagesubtitleseachhaveadvantagesforsubtitlestorageandpresentation,soitisusefultohaveonecommonsubtitlingformatthatiscapableofprovidingeitheratextsubtitlestreamoranimagesubtitlestream.Advantagesoftextsubtitlinginclude:

Textsubtitlesrequireminimalsizeandbandwidth

Devicescanpresenttextsubtitleswithdifferentstyles,sizes,andlayoutsfordifferentdisplays,viewing

conditionsanduserpreferences

Textsubtitlescanbeconvertedtospeechandtactilereadouts(forvisuallyimpaired)\

Textsubtitlesaresearchable

Advantagesofimagesubtitlinginclude:

Imagesubtitlesenablepublisherstofullycontrolpresentationofcharacters(includingglyphs,characterlayout,size,overlayetc.)

Imagesubtitlesenablepublisherstoaddgraphicalelementsandeffectstopresentation

Imagesubtitlesprovideaconsistentsubtitlingpresentationacrossallplaybackenvironments

CFFsubtitletrackscanbeeithertextsubtitletracksorimagesubtitletracks,i.e.themixingoftextandimagesubtitleswithinonetrackisnotsupported.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |97

Inordertooptimizestreaming,progressiveplayback,andrandomaccessusernavigationofvideoandsubtitles,[ISOTEXT]andthisspecificationdefinehow[SMPTE‐TT]documentsarestoredasmultipledocumentsinanISOBaseMediaTrackandhow,inthecaseofanimagesubtitletrack,associatedimagefilesarestoredasmultiplefilesinanISOBaseMediaTrack.ImagefilesarestoredseparatelyasItemsineachsampleandreferencedfromanadjacent[SMPTE‐TT]documentinordertolimitthemaximumsizeofeachdocument,whichwilldecreasedownloadtimeandplayermemoryrequirements.

6.2 CFF‐TTFormat

6.2.1 Definition

CFF‐TTdocumentsSHALLconformtotheSMPTETimedTextspecification[SMPTE‐TT],withtheadditionalconstraintsdefinedinthisspecification.

6.2.2 CFF‐TT Text Encoding

CFF‐TTdocumentsSHALLuseUTF‐8characterencodingasspecifiedin[UNICODE].AllUnicodeCodePointscontainedwithinCFF‐TTdocumentsSHALLbeinterpretedasdefinedin[UNICODE].

6.2.3 CFF TimedText Profiles

The[SMPTE‐TT]formatprovidesameansforspecifyingacollectionofmandatoryandoptionalfeaturesandextensionsthatmustormightbesupported.ThiscollectionisreferredtoasaTimedTextProfile.Inordertofacilitateinteroperability,thisspecificationdefinestheCFFTimedTextProfilesderivedfromtheSMPTETTProfiledefinedin[SMPTE‐TT].TwoTimedTextProfilesaredefinedbythisspecification–textandimage.CFF‐TTdocumentsSHALLconformtoeitherthetextprofile(seeSection6.2.2.4)orimageprofile(seeSection6.2.2.5).NotethatthemixingoftextandimagesubtitleswithinoneCFF‐TTdocumentisnotsupported.

6.2.3.1 CFFTTMLExtension–forcedDisplayMode

6.2.3.1.1 DefinitionTheforcedDisplayModeTTMLextensionisdefinedtosupportthesignalingofablockofsubtitlecontentthatisidentifiedas“Forced”subtitlecontent.“Forced”subtitlecontentissubtitlecontentthatrepresentsaudio(e.g.foreignlanguage)ortext(e.g.asign)thatisnottranslatedintheaudio/videopresentation.

6.2.3.1.2 XMLNamespacehttp://www.decellc.org/schema/2012/01/cff‐tt‐metaTherecommendedprefixforthisnamespaceis“cff:”.

6.2.3.1.3 XMLDefinition

Values: false|true

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |98

Initial: false

Appliesto: body,div,p,region,span

Inherited: yes

Percentages: N/A

Animatable: discreteNote:AlthoughtheforcedDisplayModeattribute,likealltheTTMLstyleattributes,hasnodefinedsemanticsona<br>contentelement,forcedDisplayModewillapplytoa<br>contentelementifitiseitherdefinedonanancestorcontentelementofthe<br>contentelementoritisappliedtoaregionelementcorrespondingtoaregionthatthe<br>contentelementisbeingflowedinto.TheforcedDisplayModeTTMLextensionisanxs:Booleandatatypeattribute.

6.2.3.1.4 XMLSchemaDocumentURIreference:cff-tt-meta-{DMEDIA_VERSION_POINTS}.xsdNotes:

{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexA. InanycasewheretheXMLschemadocumentconflictswiththisspecification,thisspecificationis

authoritative. URIisdefinedin[RFC3986]

6.2.3.1.5 XMLExampleSnippet<div> <p region="subtitle1" begin="00:05:00" end="00:05:15" cff:forcedDisplayMode="true"> This subtitle is forced. </p> </div>

6.2.3.1.6 LayoutandFlowWhenonly“Forced”subtitlecontentisdisplayed,contentnotsignaledforcedDisplayMode=”true”SHALLbehiddenbutusedforlayoutandflowi.e.thiscontentwillbeequivalentto

tts:visibility=”hidden”.Notethatsettingtts:visibility=”hidden”onallelementswithinaregionwillleavetheregionvisibleifithastts:showBackground=”always”(thedefault).

6.2.3.2 CFFTTMLExtension–progressivelyDecodable

6.2.3.2.1 DefinitionTheprogressivelyDecodableTTMLextensionisdefinedtosupportthesignalingofwhetherthedocumentcanbeprogressivelydecoded.Whensettotrue,thisextensionsignalsthatthedocumenthas

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |99

beendesignedtobeprogressivelydecodablebyadecoder.Adocumentthatincludesattp:progressivelyDecodableattributewithvalue"true"onthe<tt>elementSHALLconformtothefollowing:

1. noattributeorelementoftheTTMLtimingvocabularySHALLbepresentwithinthe<head>element;and

2. giventwoIntermediateSynchronicDocumentsAandBwithpresentationtimesTAandTB,respectively,TASHALLNOTbegreaterthanTBifAmapstoa<p>elementthatoccursearlierinthedocumentthanany<p>elementtowhichBmaps;and

3. childelementsof<p>SHALLNOThaveanattributeoftheTTMLtimingvocabulary;and4. noelementSHALLreferenceanotherelementthatoccursafteritinthedocument.

Notes: Elementswithidenticalresolvedbegintimesneedtobeintheorderdesiredforflow.

6.2.3.2.2 XMLNamespacehttp://www.decellc.org/schema/2012/01/cff‐tt‐metaTherecommendedprefixforthisnamespaceis“cff:”.

6.2.3.2.3 XMLDefinition

Values: false|true

Initial: false

Appliesto: tt

Inherited: no

Percentages: N/A

Animatable: N/ATheprogressivelyDecodableTTMLextensionisanxs:Booleandatatypeattribute.

6.2.3.2.4 XMLSchemaDocumentURIreference:cff-tt-meta-{DMEDIA_VERSION_POINTS}.xsdNotes:

{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE. InanycasewheretheXMLschemadocumentconflictswiththisspecification,thisspecificationis

authoritative. URIisdefinedin[RFC3986]

6.2.3.2.5 XMLExampleSnippet<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:tts="http://www.w3.org/ns/ttml#styling"

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |100

xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cff="http://www.decellc.org/schema/2012/01/cff-tt-meta" xsi:schemaLocation="http://www.w3.org/ns/ttml cff-tt-text-ttaf1-dfxp-{DMEDIA_VERSION_POINTS}.xsd http://www.decellc.org/schema/2012/01/cff-tt-meta cff-tt-meta-{DMEDIA_VERSION_POINTS}.xsd" xml:lang="es" ttp:frameRate="24" ttp:frameRateMultiplier="1000 1001" ttp:timeBase="media" cff:progressivelyDecodable=”true” >

Note: {DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

6.2.3.3 GeneralProfileRestrictions

6.2.3.3.1 FeatureRestrictionsThefollowingTTMLrestrictionsSHALLapplytoallCFFTimedTextdocuments.

Table6‐1–CFFGeneralTTMLFeatureRestrictionsFEATURE CONSTRAINT#cellResolution SHALLNOTbeused.#clockMode SHALLNOTbeused.

#color Note:Asrequiredin[SMPTE‐TT],theinitialvalueoftts:coloris"white".

#dropMode SHALLNOTbeused.

#extent-region

•ThemaximumsizeSHALLbespecifiedandSHALLbesmallerthanorequaltotherootcontainer.•regionspresentedinthesameSubtitleEventSHALLNOToverlap(seeSection6.6foradefinitionof“SubtitleEvent”andSection6.2.2.3.2foradefinitionofwhenaregionis“presented”).

#extent-root

tts:extentSHALLNOTbespecifiedonthe<tt>elementiftrack_size_is_aspect_ratioissetintheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’),oreitherthewidthorheightvaluesintheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’)aresetto0.Ifunitofmeasurepx(pixel)lengthvaluesareusedintheCFF‐TTdocument,thentts:extentSHALLbepresentonthe<tt>element.

Iftts:extentisspecifiedonthe<tt>element,itSHALLbeequaltothewidthandheightvaluesintheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’).

Iftts:extentisnotspecifiedonthe<tt>element,thespatialextentoftherootcontainerisdeterminedperSection6.2.4.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |101

#frameRate

•Ifspecified,ttp:frameRateandttp:frameRateMultiplierattributesSHALLcollectivelymatchtheframerateoftheassociatedvideotrack.•Ifnotspecified,theframerateSHALLbetheframerateoftheassociatedvideotrack.

#frameRateMultiplier

•Ifspecified,ttp:frameRateandttp:frameRateMultiplierattributesSHALLcollectivelymatchtheframerateoftheassociatedvideotrack.•Ifnotspecified,theframerateSHALLbetheframerateoftheassociatedvideotrack.

#length Theunitofmeasurepx(pixel)SHALLbethesameunitofmeasureasthatusedfortheassociatedvideotrack.

#length-cell SHALLNOTbeused.#length-negative SHALLNOTbeused.

#length-percentage

The“pixel”valueequatedwithany"percentage"lengthvalueSHALLbeapixelontheCFF‐TTCoordinateSystem.Tocalculatethepixel,the“roundtonearest”roundingalgorithmSHALLbeutilizedwiththe“roundhalf‐up”tiebreakruleapplied.Note:seeSection6.2.3formoredetailsontheCFF‐TTCoordinateSystem.

#markerMode SHALLNOTbeused.

#origin

•regionsSHALLbecontainedwithintherootcontainer.•regionspresentedinthesameSubtitleEventSHALLNOToverlap(seeSection6.6foradefinitionof“SubtitleEvent”andSection6.2.2.3.2foradefinitionofwhenaregionis“presented”).Note:perthe#length‐cellrestrictiondefinedabove,itisprohibitedtouse"c"(cell)scalarunitrepresentations.

#overflow SHALLNOTbeused.#pixelAspectRatio SHALLNOTbeused#subFrameRate SHALLNOTbeused.

#tickRate

ifspecified,ttp:tickRateSHALLbesettothesamevalueasthatofthetimescaleparameterinthesubtitletrack'sMediaHeaderBox(‘mdhd’).if#time-offset-with-ticksexpressionstimeExpressionvaluesareusedintheCFF‐TTdocument,ttp:tickRateSHALLbepresentonthe<tt> elementandcomplywiththeconstraintdefinedabove.

#timeBase-clock SHALLNOTbeused.

#timeBase-media

timeBase SHALLbe“media”wheretimezeroisthestartofthesubtitletrackdecodetimeonthemediatimeline.Notethattimezerodoesnotresetwitheverysubtitlefragmentandmediatimeisaccumulatedacrosssubtitlefragments.

#timeBase-smpte SHALLNOTbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |102

#timing

•Thesamesyntax(clock-timeoroffset-time)SHOULDbeusedthroughouttheCFF‐TTdocument.•OffsettimeexpressionsusingthetickmetricSHOULDNOTusefractionalticks.•ExplicitlydefinedtimingSHALLNOTextendbeyondthetimespanoftheCFF‐TTdocument’ssubtitlesampleontheISOmediatimeline.Note:#time-offset-with-framesexpressionsaretranslatedtomediatimewiththefollowingequation(whereMisthemediatimeinseconds):M 60 hours 60 minutes seconds

frames

ttp: frameRateMultiplier ttp: frameRate

Note:#time-offset-with-ticksexpressionsarecalculatedfrommediatimewiththefollowingequation(whereMisthemediatimeinseconds):Tick ceiling M ttp: tickRate

6.2.3.3.2 ElementRestrictionsThefollowingTTMLrestrictionsSHALLapplytoallCFFTimedTextdocuments.

Table6‐2–CFFGeneralTTMLElementRestrictionsELEMENT CONSTRAINT

body AllcontentpresentedinaSubtitleEventSHALLbeassociatedwithaDocumentInstancecontentregioni.e.suchcontentSHALLNOTbedirectlyplacedintheRootContainerRegion.

region

NumberofregionspresentedinthesameSubtitleEventSHALLbe<=4(seeSection6.6foradefinitionofSubtitleEvent).AregionSHALLbeconsidered“presented”ifallfourofthefollowingaretrue:1)Theregiondoesnothaveatts:opacity="0.0"(notethat“1.0”isthedefaultvalueofthetts:opacityattribute);and2)Theregiondoesnothaveatts:visibility="hidden"(notethat“visible”isthedefaultvalueofthetts:visibilityattribute);and3)Theregiondoesnothaveatts:display="none"(notethat"auto"isthedefaultvalueofthetts:displayattribute);and4)contentisselectedintotheregionatthetimeoftheSubtitleEvent,ortheregionhasatts:showBackground=“always”andatts:backgroundColorwithnon‐transparentalpha(notethat“always”isthedefaultvalueofthetts:showBackgroundattribute).

ttThe<tt>elementSHALLincludeanxmlnsattributewithorwithoutaprefix)with“http://www.w3.org/ns/ttml”

6.2.3.3.3 AttributeRestrictionsThefollowingTTMLrestrictionsSHALLapplytoallCFFTimedTextdocuments.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |103

Table6‐3–GeneralTTMLAttributeRestrictionsELEMENT CONSTRAINT

xml:lang

Ifspecified,thexml:langattributeSHALLmatchtheSubtitle/LanguageMulti‐TrackRequiredMetadata(seeSection2.1.2.1)ifMulti‐TrackRequiredMetadataispresentintheDCC.Note:xml:langMAYbesettoanemptystring.

6.2.3.4 TextSubtitleProfile

6.2.3.4.1 XMLSchemaDocumentURIreference:“cff-tt-text-ttaf1-dfxp-{DMEDIA_VERSION_POINTS}.xsd” Notes:

{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.Note:InanycasewheretheXMLschemadocumentconflictswiththisspecification,thisspecificationisauthoritative.

URIisdefinedin[RFC3986]

6.2.3.4.2 xsi:schemaLocationCFFTimedTextdocumentscontainedwithinatextsubtitletrackSHOULDhaveanxsi:schemaLocationattributedefinedonthe<tt>element.Thevalueofthisxsi:schemaLocationattributeistobesetasfollows:

“http://www.w3.org/ns/ttmlcff‐tt‐text‐ttaf1‐dfxp‐{DMEDIA_VERSION_POINTS}.xsd”SHOULDbeincluded.

IftheforcedDisplayModeextensiondefinedinSection6.2.2.1ortheprogressivelyDecodableextensiondefinedinSection6.2.2.2isusedinthedocument,“http://www.decellc.org/schema/2012/01/cff‐tt‐metacff‐tt‐meta‐{DMEDIA_VERSION_POINTS}.xsd”SHOULDbeincluded.

Thebuilt‐inXMLSchemanamespaces“http://www.w3.org/2001/XMLSchema”and“http://www.w3.org/2001/XMLSchema‐instance”andanynamespacedeclarationwhichhasaprefixbeginningwiththethree‐lettersequence"xml"SHOULDNOTbeincluded.

AllotherschemasforallthenamespacesdeclaredinthedocumentSHOULDbeincludedwiththefollowingexception:ifaschemadefinesmultiplenamespaces,itSHOULDonlybepresentinthexsi:schemaLocationonce(forexample,only...ns/ttmlisrecommendedtobeincluded,notboth...ns/ttmland...ns/ttml#style).

Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

6.2.3.4.3 FeaturerestrictionsInadditiontotherestrictionsdefinedinSection6.2.2.3.1,thefollowingrestrictionsSHALLapplytoCFFTimedTextdocumentscontainedwithinatextsubtitletrack.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |104

Table6‐4‐CFFTextSubtitleTTMLFeatureRestrictionsFEATURE CONSTRAINT

#extent-region

•lengthexpressionsSHALLuse"px"(pixel)scalarunitsor"percentage"representation."em"(typographyunitofmeasure)SHALLNOTbeused.Note:perthe#length‐cellrestrictiondefinedinTable61‐,itisprohibitedtouse"c"(cell)scalarunitrepresentations.•SHOULDbelargeenoughfortextcontentlayoutwithoutclippinginaccordancewiththeHypotheticalRenderModeldefinedinSection6.6.4.2.

#fontFamily •Atts:fontFamilyofeither“monospaceSerif”or“proportionalSansSerif”SHOULDbespecifiedforallpresentedtextcontent.•Atts:fontFamilyof“default”SHALLbeequivalentto“monospaceSerif”.

#fontSize-anamorphic

SHALLNOTbeused.

#origin

"em"(typographyunitofmeasure)SHALLNOTbeused.Note:perthe#length‐cellrestrictiondefinedabove,itisprohibitedtouse"c"(cell)scalarunitrepresentations.

#profile

AdocumentSHALLcontainattp:profileelementunderthe<head>element,wheretheuseattributeofthatelementisspecified“http://www.decellc.org/profile/cff‐tt‐text‐{DMEDIA_VERSION_POINTS}”.Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

#textOutline Ifspecified,theborderthicknessSHALLbe10%orlessthantheassociatedfontsize.

#textOutline-blurred

SHALLNOTbeused.

6.2.3.4.4 SMPTEExtensionRestrictionsInadditiontotherestrictionsdefinedinSection6.2.2.3.1,thefollowingrestrictionsSHALLapplytoCFFTimedTextdocumentscontainedwithinantextsubtitletrack.

Table6‐5‐CFFTextSubtitleTTMLSMPTEExtensionRestrictionsEXTENSION CONSTRAINT#backgroundImage SHALLNOTbeused.#backgroundImageHorizontal SHALLNOTbeused.#backgroundImageVertical SHALLNOTbeused.#image SHALLNOTbeused.

6.2.3.5 ImageSubtitleProfile

6.2.3.5.1 XMLSchemaDocumentURIreference:“cff-tt-image-ttaf1-dfxp-{DMEDIA_VERSION_POINTS}.xsd”URIreference:“cff-tt-image-smpte-tt-{DMEDIA_VERSION_POINTS}.xsd”

Notes: {DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE. InanycasewheretheXMLschemadocumentconflictswiththisspecification,thisspecificationis

authoritative. URIisdefinedin[RFC3986]

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |105

6.2.3.5.2 xsi:schemaLocationCFFTimedTextdocumentscontainedwithinanimagesubtitletrackSHOULDhavean‘xsi:schemaLocation’attributedefinedonthe‘<tt>’element.Thevalueofthisxsi:schemaLocationattributeistobesetasfollows:

“http://www.w3.org/ns/ttmlcff‐tt‐image‐ttaf1‐dfxp‐{DMEDIA_VERSION_POINTS}.xsd”andhttp://www.smpte‐ra.org/schemas/2052‐1/2010/smpte‐ttcff‐tt‐image‐smpte‐tt‐{DMEDIA_VERSION_POINTS}.xsd”SHOULDbeincluded.

IftheforcedDisplayModeextensiondefinedinSection6.2.2.1ortheprogressivelyDecodableextensiondefinedinSection6.2.2.2isusedinthedocument,“http://www.decellc.org/schema/2012/01/cff‐tt‐metacff‐tt‐meta‐{DMEDIA_VERSION_POINTS}.xsd”SHOULDbeincluded.

Thebuilt‐inXMLSchemanamespaces“http://www.w3.org/2001/XMLSchema”and“http://www.w3.org/2001/XMLSchema‐instance”andanynamespacedeclarationwhichhasaprefixbeginningwiththethree‐lettersequence"xml"SHOULDNOTbeincluded.

AllotherschemasforallthenamespacesdeclaredinthedocumentSHOULDbeincludedwiththefollowingexception:ifaschemadefinesmultiplenamespaces,itSHOULDonlybepresentinthexsi:schemaLocationonce(forexample,only...ns/ttmlisrecommendedtobeincluded,notboth...ns/ttmland...ns/ttml#style).

Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

6.2.3.5.3 FeatureRestrictionsInadditiontotherestrictionsdefinedinSection6.2.2.3.1,thefollowingrestrictionsSHALLapplytoCFFTimedTextdocumentscontainedwithinanimagesubtitletrack.

Table6‐6‐CFFImageSubtitleTTMLFeatureRestrictionsFEATURE CONSTRAINT#bidi SHALLNOTbeused.#color SHALLNOTbeused.

#content <p>,<span>,<br>SHALLNOTbeused.#direction SHALLNOTbeused.#displayAlign SHALLNOTbeused.#fontFamily SHALLNOTbeused.#fontSize SHALLNOTbeused.#fontStyle SHALLNOTbeused.#fontWeight SHALLNOTbeused.#length-em SHALLNOTbeused.#lineBreak-uax14 SHALLNOTbeused.#lineHeight SHALLNOTbeused.#nested-div SHALLNOTbeused.#nested-span SHALLNOTbeused.#padding SHALLNOTbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |106

#profile

AdocumentSHALLcontainattp:profileelementwheretheuseattributeofthatelementisspecified“http://www.decellc.org/profile/cff‐tt‐image‐{DMEDIA_VERSION_POINTS}”.Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

#textAlign SHALLNOTbeused.#textDecoration SHALLNOTbeused.#textOutline SHALLNOTbeused.#wrapOption SHALLNOTbeused.#writingMode-vertical SHALLNOTbeused.

6.2.3.5.4 ElementRestrictionsInadditiontotherestrictionsdefinedinSection6.2.2.3.1,thefollowingrestrictionsSHALLapplytoCFFTimedTextdocumentscontainedwithinanimagesubtitletrack.

Table6‐7–CFFImageSubtitleTTMLElementRestrictionsELEMENT CONSTRAINT

div

Ifasmpte:backgroundImageattributeisappliedtoa<div>,thewidthandheightoftheregionextentassociatedwiththe<div>SHALLequatetothewidthandheightoftheimagesourcereferencedbythesmpte:backgroundImage.Note:seethe#length‐percentageconstraintinTable61‐formoreinformationonequatinga"percentage"lengthrepresentationofaregiontopixelsintheimagesourcereferencedbythesmpte:backgroundImage.

region

ForeachSubtitleEvent,thereSHALLbeatmostone<div>withthesmpte:backgroundImageattributeappliedassociatedwithany“presented”region(seeSection6.6foradefinitionof“SubtitleEvent”andSection6.2.2.3.2foradefinitionofwhenaregionis“presented).

6.2.3.5.5 SMPTEExtensionRestrictionsInadditiontotherestrictionsdefinedinSection6.2.2.3.1,thefollowingTTMLrestrictionsSHALLapplytoCFFTimedTextdocumentscontainedwithinanimagesubtitletrack.

Table6‐8‐CFFImageSubtitleTTMLSMPTEExtensionRestrictionsEXTENSION CONSTRAINT

#backgroundImageHorizontal SHALLNOTbeused.Note:thesmpte:backgroundImage attribute remainsavailableforuse.

#backgroundImageVertical SHALLNOTbeused.Note:thesmpte:backgroundImage attribute remainsavailableforuse.

#image <smpte:image> SHALLNOTbeused. 

6.2.4 CFF‐TT Coordinate Plane

TheCFF‐TTrootcontaineroriginSHALLbe"00".

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |107

TheCFF‐TTrootcontainerspatialextentisdeterminedbasedonfieldvalueswithintheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’)asfollows:

1. widthandheightaresettonon‐zerovalues,andtrack_size_is_aspect_ratioisnotused:thespatialextentoftheCFF‐TTrootcontainerissettotheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’)widthandheightvaluesper[ISOTEXT];

2. widthandheightaresettonon‐zerovalues,andtrack_size_is_aspect_ratioisused:thespatialextentoftheCFF‐TTrootcontainerSHALLbesettothewidthandheightoftheassociatedvideotrack;

3. widthandheightaresettozerovalues:thespatialextentoftheCFF‐TTrootcontainerSHALLbesettothewidthandheightoftheassociatedvideotrack.

Notes: PerSection6.2.3.3.1:iftts:extentisspecifiedonthe<tt>element,itmustequalthewidthand

heightvaluesintheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’);andifunitofmeasurepx(pixel)lengthvaluesareusedintheCFF‐TTdocument,thentts:extentmustbepresentonthe<tt>element.

ThevaluesoftheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’)arenormativelyconstrainedinSection6.7.2,includingarequirementthatifaspectratioisdefinedbytheCFF‐TTtrack’sTrackHeaderBox(‘tkhd’),itmustmatchtheaspectratiooftheassociatedvideotrack.

Thematrixvaluesinthevideoandsubtitletrackheadersarethedefaultvalue.Thepositionofthesubtitledisplayregionisdeterminedonthenotional‘square’(uniform)griddefinedbytherootcontainerextent.Thedisplayregion‘tts:origin’valuesdeterminetheposition,andthe‘tts:extent’valuesdeterminethesizeoftheregion.Figure61‐illustratesanexampleofthesubtitledisplayregionposition.Note:Subtitlescanonlybeplacedwithintheencodedvideoactivepicturearea.Ifsubtitlesneedtobeplacedoverblackmattingareas,theadditionalmattingareasneedtobeconsideredanintegralpartofthevideoencodingandincludedwithinthevideoactivepictureareaforencoding.

Figure6‐1–Exampleofsubtitledisplayregionposition

InFigure61‐,theparametersaredenotedasfollows:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |108

Vw,Vh–Videotrackheaderwidthandheight,respectively. [ISO]co‐ordinateorigin‐theoriginoftheCFF‐TTrootcontainer. Sw,Sh–Subtitletrackwidthandheight,respectivelywhichisalsothespatialextentoftheCFF‐TT

rootcontainer. Ew,Eh–CFF‐TTdisplayregion‘tts:extent’.

Ox,Oy–CFF‐TTdisplayregion‘tts:origin’.  Regionarea–areadefinedintheCFF‐TTdocumentthatsetstherenderinginwhichtextisflowed

orimagesaredrawn. Displayarea–renderingareaoftheCFF‐TTprocessor.

6.2.5 CFF‐TT External Time Interval

TheCFF‐TTDocument'sExternalTimeIntervalSHALLequalthedurationofthesubtitletrackontheISOmediatimeline.Theexternaltimeintervalisthetemporalbeginningandendingofadocumentinstanceasspecifiedin[W3C‐TT]andincorporatedin[SMPTE‐TT].

6.3 CFF‐TTSubtitleEventandVideoFrameSynchronization

CFF‐TTisdesignedtosynchronizewithvideoatthevideoframelevel‐thatis,SubtitleEvents(seeSection6.6)willfirstbedisplayedonaspecificframeofvideoonthevideoframegridandwillberemovedonaspecificframeofvideoonthevideoframegrid.Thefollowingequationisusedtocalculatethevideoframerepresentedbyamediatimevaluecalculatedfroma‘<timeExpression>’valueinaCFF‐TTdocument(whereMisthemediatimeinseconds):

F ceiling M ttp: frameRateMultiplier ttp: frameRate InordertodeterminethevideoframewithwhichaSubtitleEventisactuallyfirstdisplayedorremovedfroma‘<timeExpression>’valueinaCFF‐TTdocument,thevideoframeSHALLbecalculatedfromthe‘<timeExpression>’valueandthetimingmodeldefinedinSection6.6.2SHALLbeapplied.Note:Section6.2.2.3requiresthatthevalueof‘ttp:frameRate’isthatofthevideotrack(andifsetinthedocumentitisrequiredtobeequaltothevideotrackframerate).

6.4 CFF‐TTEncodedImageFormat

ImagesSHALLconformtoPNGimagecodingasdefinedinSections7.1.1.3and15.1of[MHP],withthefollowingadditionalconstraints:

PNGimagesSHALLNOTberequiredtocarryapHYschunkindicatingpixelaspectratioofthebitmap.Ifpresent,thepHYschunkSHALLindicatesquarepixels.

Note:Ifnopixelaspectratioiscarried,thedefaultofsquarepixelswillbeassumed.

6.5 CFF‐TTStructure

6.5.1 Track Format

ACFFsubtitletrackiseitheratextsubtitletrackoranimagesubtitletrack.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |109

TextsubtitletracksSHALLcontainoneormoreCFF‐TTXMLdocumentsallofwhicharecompliantwithSection6.2.2.4.TextsubtitletracksSHALLNOTcontainanyimagedata.TextsubtitletracksSHALLcomplywith[ISOTEXT].ImagesubtitletracksSHALLcontainoneormoreCFF‐TTXMLdocuments,allofwhicharecompliantwithSection6.2.2.5.CFF‐TTdocumentsinimagesubtitletracksSHALLincorporateimagesintheirpresentationbyreferenceonlyandimagesarenotconsideredwithinthedocumentsizelimit.Inthiscase,referencedimagesSHALLbestoredinthesamesampleasthedocumentthatreferencesthemandSHALLNOTexceedthemaximumsizesspecifiedininTable69‐.ImagesubtitletracksSHALLcomplywith[ISOTEXT].Note:

Per[ISOTEXT],eachCFF‐TTdocumentinaCFFsubtitletrackisstoredinasinglesubtitlesamplewhichisa“syncsample”,meaningthatitisindependentlydecodable.

“syncsample”inmoviefragmentscannotbesignaledbytheabsenceoftheSyncSamplebox(‘stss’)orbythepresenceoftheSyncSamplebox(‘stss’),sincethisboxisnotdesignedtolistsyncsamplesinmoviefragments.Instead,signalingcanbeachievedbyothermeanssuchassettingthe'sample_is_non_sync_sample'flagto"0"inthe'default_sample_flags'fieldintheTrackExtendsbox(‘trex’).

6.5.2 Sample Format

6.5.2.1 Definition

SubtitlesamplestorageSHALLcomplywith[ISOTEXT].Inimagesubtitletracks,eachsubtitlesampleSHALLalsocontainallimagesreferencedintheCFF‐TTdocumentandstorageofimagesSHALLcomplywith[ISOTEXT].EachsubtitletrackfragmentSHALLcontainexactlyonesubtitlesample.

Figure6‐2–StorageofimagesfollowingtherelatedSMPTETTdocumentinasample

6.5.2.2 Images

Imageformatsusedforsubtitles(i.e.PNG)SHALLbespecifiedinamannersuchthatallofthedatanecessarytoindependentlydecodeanimage(i.e.colorlook‐uptable,bitmap,etc.)isstoredtogetherwithinasinglesub‐sample.ThetotalsizeofimagedatastoredinasampleSHALLNOTexceedthevaluesindicatedinTable69‐.“Imagedata”SHALLincludealldatainthesampleexceptfortheCFF‐TTdocument,whichSHALLbestoredatthebeginningofeachsampletocontrolthepresentationofanyimagesinthatsample.TheCFF‐TTdocumentSHALLreferenceeachimageusingaURN,per[ISOTEXT],oftheform:urn:dece:container:subtitleimageindex:<index>.<ext> Where:

Doc Image Image Etc.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |110

<index>isasdefinedin[ISOTEXT]. <ext>isasdefinedin[ISOTEXT].

Note:ACFF‐TTdocumentmightreferencethesameimagemultipletimeswithinthedocument.Insuchcases,therewillbeonlyonesub‐sampleentryintheSub‐SampleInformationBox(‘subs’)forthatimage,andtheURIusedtoreferencetheimageeachtimewillbethesame.However,ifanimageisusedbymultipleCFF‐TTdocuments,thatimageisrequiredtobestoredonceineachsampleforwhichadocumentreferencesit.Anexampleofimagereferencingisshownbelow:<head> <layout> <region tts:extent="250px 50px" tts:origin="200px 800px" xml:id="r1"/> <region tts:extent="200px 50px" tts:origin="200px 800px" xml:id="r2"/> </layout> </head> <body> <div region="r1" smpte:backgroundImage="urn:dece:container:subtitleimageindex:1.png"/> <div region="r2" smpte:backgroundImage="urn:dece:container:subtitleimageindex:2.png"/> </body>

6.5.2.3 Constraints

CFF‐TTsubtitlesamplesSHALLNOTexceedthefollowingconstraints:Table6‐9–ConstraintsonSubtitleSamples

Property ConstraintCFF‐TTdocumentsize SingleXMLdocumentsize<=500x210bytes

6.6 CFF‐TTHypotheticalRenderModel

Figure6‐3–BlockDiagramofHypotheticalRenderModel

ThisSectiondefinestheCFF‐TTHypotheticalRenderModel.CFF‐TTdocumentsSHALLNOTexceedthelimitsandconstraintsdefinedbythismodel.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |111

6.6.1 Functional Model

ThehypotheticalrendermodelforCFF‐TTsubtitlesisshowninFigure63‐.ItincludesseparateinputbuffersD(j)andEI(j)foroneCFF‐TTdocument,andasetofimagescontainedinonesample,respectively.Eachbufferhasaminimumsizedeterminedbythemaximumdocumentandsamplesizespecified.TheDocumentObjectModel(DOM)buffers,DB(j)andDB(j‐1),storetheDOMsproducedbyparsingaCFF‐TTdocument.DOMbuffersdonothaveaspecifiedsizebecausetheamountofmemoryrequiredtostorecompileddocumentsdependsonhowmuchmemoryamediahandlerimplementationusestorepresentthem.ACFF‐TTprocessorimplementationcandetermineasufficientsizebasedondocumentsizelimitsandworst‐casecodecomplexity.ThemodelincludestwoDOMbuffersinordertoenabletheprocessingandpresentationofthecurrentlyactiveCFF‐TTdocumentinDB(j‐1)whilethenextCFF‐TTdocumentisreceivedandparsedinDB(j)inpreparationforitbecomingactive.SeeSection6.6.2formoreinformationonthetimingmodelofwhendocumentsareactiveandinactive.Forthepurposesofperformingpresentationprocessing,theactivetimedurationoftheCFF‐TTdocumentisdividedintoasequenceofSubtitleEvents.ForanygivenSubtitleEventE ,allvisiblepixelsforSubtitle

EventE arepainted.

ASubtitleEventSHALLoccurwheneverthereisanychangetosubtitlepresentation.EachSubtitleEventisassociatedwithanintermediatesynchronicdocument.[W3C‐TT]Section9.3.2,asincorporatedby[SMPTE‐TT],dictateswhenanintermediatesynchronicdocumentisconstructed.Note:Achangetosubtitlepresentationcausedbythe<set>animationelementwillresultinanewSubtitleEvent.ThePresentationCompositorretrievespresentationinformationforeachSubtitleEventfromtheapplicableDocDOM(accordingtothecurrentsubtitlefragment);presentationinformationincludespresentationtime,regionpositioning,styleinformation,etc.associatedwiththeSubtitleEvent.ThePresentationCompositorconstructsanintermediatesynchronicdocumentfortheSubtitleEvent,inaccordancewith[W3C‐TT]Section9.3.2,asincorporatedby[SMPTE‐TT],andpaintsthecorrespondingSubtitleEventintothePresentationBufferP(n).TheGlyphBuffersG(n)andG(n‐1)areusedtostorerenderedglyphsacrossSubtitleEvents,allowingglyphstobecopiedintothePresentationBufferinsteadofrendered,amorecostlyoperation.ThisenablesscenarioswherethesameglyphsareusedinmultiplesuccessiveSubtitleEvents,e.g.toconveyaCEA‐608/708‐styleroll‐up.TopaintSubtitleEventE(n),thePresentationCompositorhasaccessinGlyphBufferG(n‐1)totheglyphsusedduringSubtitleEventE(n‐1)andinGlyphBufferG(n)toallglyphsusedduringSubtitleEventE(n).OnceprocessingofaSubtitleEventiscompleted,thePresentationBufferP(n)iscopiedtoP(n‐1)andtheGlyphBufferG(n)toG(n‐1).ThePresentationBufferP(n)actsasa“backbuffer”inthemodel(the“backbuffer”isthesecondarybufferinthis“doublebuffer”model–itisusedtostoretheresultofeverypaintoperationinvolvedincreatingtheSubtitleEventbutitisnotusedforthedisplayofSubtitleEventinthismodel).ThePresentationBufferP(n‐1)storesaSubtitleEventavailablefordisplaywithvideoandactsasa“frontbuffer”inthemodel(the“frontbuffer”istheprimarybufferinthis“doublebuffer”model–itisusedforthedisplayofthecompletedSubtitleEventinthismodel).TheVideoPlanestoreseachframeofdecodedvideo.ThePresentationBuffers,P(n)andP(n‐1),havethesamehorizontalandverticalsizeastheCFF‐TTrootcontainer.TheSubtitlePlaneandVideoPlanehavethesamehorizontalandverticalsizedefinedforthevideotrack.IfthewidthorheightofthePresentationBufferdonotexactlymatchthecorrespondingdimensionsoftheassociatedvideotrack,theoutputofthe

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |112

PresentationBufferisproportionallyscaledtothewidthandheightoftheassociatedvideotrackbeforeitiswrittenontheSubtitlePlane.Aftervideo/subtitleshavebeencomposited,theresultingimageisthenprovidedoverexternalvideointerfacesifanyand/orpresentedonanintegrateddisplay.Theaboveprovidesanoverviewofahypotheticalmodelonly.AnyCFF‐TTprocessorimplementationofthismodelisallowedaslongastheobservedpresentationbehaviorofthismodelissatisfied.Inparticular,someCFF‐TTprocessorimplementationsmightrender/paintandscaletodifferentresolutionsthantheSMPTETTrootcontainerinordertooptimizepresentationforthedisplayconnectedto(orintegratedaspartof)theCFF‐TTprocessorimplementationbutinsuchcasesCFF‐TTprocessorimplementationsarerequiredtomaintainthesamesubtitleandvideorelativeposition(regardlessofdifferencesinresolutionbetweenthedisplayandSMPTETTrootcontainer).

6.6.2 Timing Model

Although,perSection6.2.4allCFF‐TTDocumentshaveanExternalTimeIntervalequaltothesubtitletrackduration,onlyoneCFF‐TTdocumentispresentedatanyonepointintimebytherendermodel.TherendermodelpresentsaCFF‐TTdocumentonlywhentheCFF‐TTdocumentisactive.ACFF‐TTdocumentisactiveonlyduringthetimespanofitsassociatedsubtitlesampleontheISOmediatimelineandatallothertimestheCFF‐TTdocumentisinactive.ConsequentlyallpresentationdefinedintheCFF‐TTdocumentwillbeshownwhenthedocumentisactive.Anyportionofpresentationassociatedwithatimewhenthedocumentisinactivewillnotbepresentedwiththefollowingexception‐ifthedocumentbecomesinactiveduringacodedvideoframe,thepresentationwillcontinueuntilthenextnearestcodedvideoframeatwhichtimeanypresentationdefinedintheCFF‐TTdocumentwillnotbeshown.Thistimingrelationshipisdefinedin[ISOTEXT]anddepictedinFigure64‐below.Therefore,duringplaybackofasubtitletrack,attheendofasubtitlesampletheDocumentassociatedwiththesubtitlesamplewillbecomeinactiveandtheDocumentassociatedwiththenextsubtitlesample,whichisimmediatelyadjacentontheISOmediatimeline,willimmediatelybecomeactiveatthestartofthenextsubtitlesample–thussubtitlepresentationwillcontinueseamlesslyoversubtitlesamples(andfragments)ontheISOmediatimelinewithoutinterruptiontosubtitlepresentation.Note:Thetimespanofthesubtitlesamplealwaysstartsatthetimerepresentedbythesumofallprevioussubtitlesampledurationsandalwayslastsforthelengthoftimerepresentedbythesample_durationdeterminedfromthedefault_sample_durationandsample_durationfieldsassociatedwiththesubtitlesample.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |113

Figure6‐4–TimerelationshipbetweenCFF‐TTdocumentsandtheCFF‐TTtrackISOmediatimelineTheperformanceavailableforpaintingSubtitleEventsisboundedbyconstraintsonkeyaspectsofthemodel,e.g.drawingandrenderingrates–seeAnnexA,BandC.Wheneverapplicable,theseconstraintsarespecifiedrelativetotherootcontainerdimensions,allowingCFF‐TTDocumentstobeauthoredindependentlyofvideoresolution.ThePresentationCompositorstartspaintingpixelsforthefirstSubtitleEventintheCFF‐TTdocumentatthedecodetimeofthesubtitlefragment.IfSubtitleEventE isnotthefirstinaCFF‐TTdocument,the

PresentationCompositorstartspaintingpixelsforSubtitleEventE atthe“starttime”oftheimmediately

precedingSubtitleEventE .AlldataforSubtitleEventE ispaintedtothePresentationBufferfor

eachSubtitleEvent.ForeachSubtitleEvent,thePresentationCompositorclearsthepixelswithintherootcontainer(exceptforthefirstSubtitleEventE )andthenpaints,accordingtostackingorder,allbackgroundpixelsforeach

region,thenpaintsallpixelsforbackgroundcolorsassociatedwithtextorimagesubtitlecontentandthenpaintsthetextorimagesubtitlecontent.ThePresentationCompositorneedstocompletepaintingfortheSubtitleEventE priortothestarttimeofSubtitleEventE .Theduration,inseconds,forpaintinga

SubtitleEventinthePresentationBufferisasfollowsforanygivenSubtitleEventE withintheCFF‐TT

document:

DURATION ES

BDraw C

Where: S isthenormalizedsizeofthetotaldrawingareaforSubtitleEventE ,asdefinedbelow.

BDrawisthenormalizedbackgrounddrawingperformancefactor(seeAnnexA,B,CforthebackgrounddrawingperformancefactordefinedforeachProfile).

C istheduration,inseconds,forpaintingthetextorimagesubtitlecontentforSubtitleEvent

E .SeethedetailsdefinedinSection6.7andSection6.8below.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |114

Note:BDraweffectivelysetsalimitonfillingsregions‐forexample,assumingthattherootcontainerisultimatelyrenderedat19201080resolution,aBDrawof12s‐1wouldcorrespondtoafillrateof1920 1080 12/s 23.7 2 pixels/s.

ThenormalizedsizeofthetotaldrawingareaforthefirstSubtitleEventE thatistobedecodedby

theCFF‐TTprocessorimplementationfortheCFF‐TTsubtitletrackisdefinedas:

S NSIZE E . R TBG

Where: risthenumberofregionsthatarepresentedinthisSubtitleEvent.SeeSection6.2.2.3.2fora

definitionofwhenaregionisconsideredtobepresented. NSIZE E . R isequalto:

widthofR heightofR rootcontainerheight rootcontainerwidth

R isaregionthatwillbepresentedintheSubtitleEventE .

TBG isthetotalnumberof‘tts:backgroundColor’attributesassociatedwiththegiven

regionR inthisSubtitleEvent(see“Notesaboutthemodel”belowforadefinitionofwhena

‘tts:backgroundColor’attributeisassociatedwitharegioninaSubtitleEvent).Example:ForaregionR withtts:extent="250px 50px"withinarootcontainerwith

tts:extent="1920px 1080px",NSIZE E . R =0.603.

ThetotalnormalizeddrawingareaforSubtitleEventE afterpresentationofthefirstSubtitleEvent

E isdefinedas:

S CLEAR E PAINT E

Where: CLEAR E =1andcorrespondstotherootcontainerinitsentirety.

PAINT E isafunctionwhichcalculatesthenormalizedareathatistobepaintedforanyregions

thatareusedinSubtitleEventE inaccordancewiththefollowing:

PAINT E NSIZE E . R NBG

Where: risthenumberofregionsthatarepresentedinthisSubtitleEvent.SeeSection6.2.2.3.2fora

definitionofwhenaregionisconsideredtobepresented. NSIZE E . R isequalto:

widthofR heightofR rootcontainerheight rootcontainerwidth R isaregionthatwillbepresentedintheSubtitleEventE .

NBG isthetotalnumberof‘tts:backgroundColor’attributesassociatedwiththe

givenregionR inthisSubtitleEvent(see“Notesaboutthemodel”belowforadefinitionof

whena‘tts:backgroundColor’attributeisassociatedwitharegioninaSubtitleEvent).

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |115

Atthe“starttime”ofSubtitleEventE ,thecontentofthePresentationBufferisinstantaneously

transferredtotheSubtitlePlaneandblendedwithvideoatthevideoframecorrespondingtothe“starttime”ofSubtitleEventE (orthesubsequentvideoframeifthe“starttime”doesnotalignwithaframeof

videoonthevideoframegrid).ThecontentoftheSubtitlePlaneisinstantaneouslyclearedatthevideoframecorrespondingtothe“finishtime”ofSubtitleEventE (orthesubsequentvideoframeifthe“finish

time”doesnotalignwithaframeofvideoonthevideoframegrid).Notesaboutthemodel:

ToensureconsistencyofthePresentationBuffer,anewSubtitleEventrequiresclearingoftherootcontainer.

Each‘tts:backgroundColor’attributeassociatedwitharegioninaSubtitleEventrequiresanadditionalfilloperationforallregionpixels. A‘tts:backgroundColor’attributeisassociatedwitharegioninaSubtitleEvent

whena‘tts:backgroundColor’attributeisexplicitlyspecified(eitherasanattributeintheelement,orbyreferencetoadeclaredstyle)inthefollowingcircumstances: Itisspecifiedonthe‘region’layoutelementthatdefinestheregion. Itisspecifiedona‘div’,‘p’,‘span’or‘br’contentelementthatistobe

flowedintotheregionforpresentationintheSubtitleEvent(see[W3C‐TT],asincorporatedin[SMPTE‐TT],formoredetailsonwhenacontentelementisfollowedintoaregion).

Itisspecifiedona‘set’animationelementthatistobeappliedtocontentelementsthataretobeflowedintotheregionforpresentationintheSubtitleEvent(see[W3C‐TT],asincorporatedin[SMPTE‐TT],formoredetailsonwhena‘set’animationelementisappliedtocontentelements).

Evenifaspecified‘tts:backgroundColor’isthesameasspecifiedonthenearestancestorcontentelementoranimationelement,specifyingany‘tts:backgroundColor’willrequireanadditionalfilloperationforallregionpixels.

ThePresentationCompositorretainsstateoversubtitlefragmentsi.e.whenasubtitlefragmentchangeoccursduringpresentationofaCFF‐TTsubtitletrack,thefirstSubtitleEventintheCFF‐TTdocumentassociatedwiththenewsubtitlefragmentistreatedasSubtitleEventE andthelast

SubtitleEventintheCFF‐TTdocumentassociatedwiththeprevioussubtitlefragmentistreatedasSubtitleEventE .

ItispossibleforthecontentofSubtitleEventE tobeoverwrittenintheSubtitlePlanewith

SubtitleEventE priortoSubtitleEventE beingcompositedwithvideo‐thiswouldhappen

whenthecontentofSubtitleEventE wasintheSubtitlePlanebuthadnotyetbeencomposited

withvideoasanewframeofvideohadnotyetbeenpresentedsincethe“starttime”ofSubtitleEventE ),andthe“starttime”ofSubtitleEventE occurredbeforethenewframeofvideo

waspresented.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |116

6.6.3 ImageSubtitles

Figure6‐5–BlockDiagramofCFF‐TTImageSubtitleHypotheticalRenderModel

ThissectiondefinestheperformancemodelappliedtoCFFimagesubtitles.Inthemodel,encodedimagesarestoredintheEncodedImageBufferE(j).TheImageDecoderdecodesencodedimagesintheEncodedImageBufferE(j)totheDecodedImageBufferDI(j)withtheimagedecodingrate(seeAnnexA,B,CfortheimagedecodingratedefinedforeachProfile).TwoDecodedImageBuffers,DI(j)andDI(j‐1),areusedinordertoallowthePresentationCompositortoprocessthecurrentlyactiveCFF‐TTdocumentinDI(j‐1)whilethenextCFF‐TTdocumentisbeingprocessedinDI(j)inpreparationforpresentation‐thisallowsimagesubtitlesreferencedbyCFF‐TTdocumentsfromtwoconsecutivesamples/fragmentstobedisplayedwithoutdelay.Notethatboththe“current”subtitlefragmentandthe“next”subtitlefragmentMAYbeacquiredanddecodedpriortopresentationtime.ThePresentationCompositorbehavesasspecifiedinSections6.6.1and6.6.2.ThePresentationCompositorpaintsallpixelsforimagestobepresentedintheSubtitleEventusingthecorrespondingrasterdataintheDecodedImageBuffer.Theduration,inseconds,forpaintingaSubtitleEventinthePresentationBufferisasfollowsforanygivenSubtitleEventE :

DURATION ES

BDrawC

Forimage‐basedCFF‐TTsubtitles,C isasfollows:

C NSIZE E . I

ICpy

Where: isthenumberofdivelementswhichhaveasmpte:backgroundImageattributethatis

associatedwitharegionwhichispresentedinSubtitleEventE .SeeSection6.2.2.3.2foradefinitionofwhenaregionisconsideredtobepresented.

NSIZE E . I isequalto:

widthofI heightofI rootcontainerheight rootcontainerwidth I isanimagesubtitlethatwillbepresentedinSubtitleEventE .

ICpyisthenormalizedimagecopyperformancefactor(seeAnnexBandCfortheimagecopyperformancefactordefinedforeachProfile).

Note:Imagedecodingperformanceisnotincludedintheaboveequationsasthemodelrequiresthattheimagesassociatedwithasubtitlefragmentaredecodedinfullintooneofthe(two)decodedimagebuffersinadvanceofthestartofthesubtitlefragmentpresentationtime.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |117

6.6.4 Text Subtitles

Figure6‐6–BlockDiagramofCFF‐TTTextSubtitleHypotheticalRenderModel

6.6.4.1 PerformanceModel

ForeachglyphdisplayedinSubtitleEventE(n),thePresentationCompositorwill:1) ifanidenticalglyphispresentinGlyphBufferG(n),copytheglyphfromGlyphBufferG(n)tothe

PresentationBufferP(n)usingtheGlyphCopier;or2) ifanidenticalglyphispresentinGlyphBufferG(n‐1),i.e.anidenticalglyphwaspresentinSubtitle

EventE(n‐1),copyusingtheGlyphCopiertheglyphfromGlyphBufferG(n‐1)toboththeGlyphBufferG(n)andthePresentationBufferP(n);or

3) OtherwiserenderusingtheGlyphRenderertheglyphintothePresentationBufferP(n)andGlyphBufferG(n)usingthecorrespondingstyleinformation.

TwoglyphsareidenticalifandonlyifthefollowingTTMLstylesareidentical: tts:color

tts:fontFamily

tts:fontSize

tts:fontStyle

tts:fontWeight

tts:textDecoration

tts:textOutline Figure67‐providesanexampleofPresentationCompositorbehavior.

 Figure6‐7–ExampleofTextSubtitlePresentationCompositorBehavior

TheNormalizedRenderedGlyphAreaofagivenrenderedglyphisdefinedas:Normalized Rendered Glyph Area (fontSize as percentage of root container height)2

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |118

Note:TheNormalizedRenderedGlyphAreacalculationdoesnottakeintoaccountglyphdecorations(e.g.underline),glypheffects(e.g.outline)oractualglyphaspectratio.ACFF‐TTprocessorimplementationcandetermineanactualbuffersizeneedsbasedonworst‐caseglyphsizecomplexity.TheNormalizedSizeoftheGlyphBuffersG(n)orG(n‐1)isdefinedas:Normalized Glyph Buffer Size sum of the Normalized Rendered Glyph Area of the glyphs stored in the buffer within a given time

Note:SettingamaximumGlyphBufferNormalizedSizeeffectivelysetsalimitonthetotalnumberofdistinctglyphspresentinanygivenSubtitleEventE(n).Forexample,assumingamaximumNormalizedGlyphBufferSizeof1andthedefaulttts:fontSizeof1careused,theglyph'sheightaspercentageof

rootcontainerheightis ,andthemaximumnumberofdistinctglyphsthatcanbebufferedis

1 225glyphs.Inthisexample,animplementationrenderingat1920x1080wouldneedto

allocateaglyphbuffernosmallerthan 1920 32 1080 15 225 ~1Mpixels.SeeAnnexA,B,CforGlyphBufferNormalizedSizelimitsdefinedforeachProfile.Theduration,inseconds,forpaintingaSubtitleEventinthePresentationBufferiscalculatedasfollowsforanygivenSubtitleEventE :

DURATION ES

BDrawC

Fortext‐basedCFF‐TTsubtitles,C iscalculatedasfollowsforeachSubtitleEventE(n):

C 1

RenNRGA

1GCpy

NRGA

Where: cnisthetotalnumberofglyphsrenderedintothePresentationBufferP(n)inSubtitleEventE(n). Ren isthetextrenderingperformancefactoroftheithrenderedglyphintheSubtitleEventE .

GCpyisthenormalizedglyphcopyperformancefactorforglyphsthatarecopiedtothePresentationBufferP(n)usingtheGlyphCopier.

NRGA andNRGA aretheNormalizedRenderedGlyphAreaoftheithrenderedglyphandjthcopied

glyph,respectively. isthetotalnumberofcopiedglyphstothePresentationBufferP(n)usingtheGlyphCopierin

SubtitleEventE(n).TheC calculationSHALLincludeonlyglyphsinregionelementspresentedintheSubtitleEventE –see

Section6.2.2.3.2foradefinitionofwhenaregionisconsideredtobepresented.TheC calculationSHALLNOTincludeacharacter(UnicodeCodePoint)ifitdoesnotresultinachangeto

presentation(e.g.theCodePointisignoredbytheCFF‐TTProcessor).SeeAnnexA,B,CforthedefinitionofRenandGCpyforeachProfile.Note:GCpyeffectivelysetsalimitonanimatingglyphs.Forexample,assumingthattherootcontainerisultimatelyrenderedat19201080resolutionandnoregionsneedtohavebackgroundcolorpainted(soonlyaCLEAR E operationisrequiredforthenormalizeddrawingareafortheSubtitleEvent),aGCpy

andBDrawof12s‐1wouldmeanthatagroupof160glyphswithatts:fontSizeequalto5%ofthe

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |119

rootcontainerheightcouldbemovedatmostapproximately12 1 160 0.05 8.6timespersecond.Note:Ren effectivelysetsalimitontheglyphrenderingrate.Forexample,assumingthattherootcontainerisultimatelyrenderedata19201080resolution,aRen of1.2s‐1wouldmeanthatatmost120glyphswithafontSizeof108px(10%of1080pxandNGRA=0.01)couldberenderedeverysecond.

6.6.4.2 TextLayoutModel

Properregionsize,glyphsizingandglyphlayoutwillavoidclippingoftextcontent.Thewidthofaregionisindicatedbythetts:extent<length>parameterassociatedwithwidth.Thewidthofrenderedcharactersdependsonthewidthofindividualglyphsandthespacingbetweentheglyphs(kerning).Asthisparticulartoeachfont,thelayoutmodelassumesparticularreferencefontfamiliesasdefinedinAnnexD.3;fontsthatare‘metriccompatible’canbesubstituted(afontis‘metriccompatible’ifitdoesnotchangetextflow,althoughappearancemaybedifferent).GlyphspaintedintothePresentationBufferSHALLbelaidouthorizontallywiththefollowingparameters:

Behaviorisdefinedfortwofontfamilies(tts:fontFamily): “monospaceSerif” “proportionalSansSerif”

Iftextcontenthasa“monospaceSerif”or“proportionalSansSerif”tts:fontFamilyapplied,widthandspacing(kerning)isconsistentwiththeReferenceFontFamilyforthegiventts:fontFamily.

TheReferenceFontFamilyforagivensubtitlelanguageisdefinedinAnnexD.3. Notes:

Toguaranteethattextcontentflowedintoaregionrenderswithoutclipping,itisnecessaryforthetts:extent<length>(width)parametertobeatleastthesumeachglyphonthelineanditsassociatedspacing(kerning).Insufficient<length>moretypicallyresultsinverticalclippingastextflowmovessometexttounanticipatedadditionallines.

Theheightoftheregionisspecifiedbythetts:extent<length>parameterassociatedwithheight.Asspecifiedin[W3C‐TT]andincorporatedin[SMPTE‐TT],theheightofeachlineisafunctionofthesizeoflargestfontusedwithinthatlineandthetts:lineHeightsetting.GlyphspaintedintothePresentationBufferSHALLbelaidoutverticallywithinaregioninaccordancewiththefollowingparameters:

Atts:lineHeightof“100%”correspondswiththesizeofthelargestfontonaline.Forexample,alinewithcharactersof“10px”,“12px”and“14px”andatts:lineHeightof“100%”isequivalenttoatts:lineHeightof“14px”.

Inter‐baselineseparationisdefinedasfollows: Thevalueoftts:lineHeightiftts:lineHeightisspecified tts:lineHeight=”120%”iftts:lineHeight=”normal”(note:iftts:lineHeight

isnotspecified,“normal”isthedefaultvalueapplied). actuallineheightisroundeduptowholepixels.Forexample,alineheightof“12px”at

“120%”resultsin14.4pxandisroundedupto15px. Whitespaceinexcessoftts:fontHeightisallocatedevenly,withinapixel,topand

bottom(half‐leading).Notethatinter‐baselineseparationincludesanyleading.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |120

Notes: Toguaranteethatcontentflowedintoaregionrenderswithoutverticalclipping,itis

necessaryforthetts:extent<length>(height)parametertobeatleastthesumoftheactualheightofeachlineoftextintheregion.Forexample,threelinesof12pxcharacterswithatts:lineHeight=”normal”wouldrequirea<length>of(12px*120%*3)pixels.

Glyphsthatdonotextendbeyondthespecifictts:fontSizevaluewillnotcliptoporbottom.

6.6.5 Constraints

ThefollowingconstraintsapplytotheCFF‐TThypotheticalrendermodel.

Table6‐10–HypotheticalRenderModelConstraintsProperty ConstraintDocumentBufferSize 500x210bytesminimumforonedocument

DOMBufferSizes

Nospecificlimitations.TheDOMbuffersizesarelimitedbytheXMLdocumentsize,butthesizeoftheDOMbufferrelativetodocumentsizedependsonthespecificimplementation.Itisuptothedecoderimplementationtoensurethatsufficientmemoryisavailableforthe2DOMs.

6.7 DataStructureforCFF‐TTTrack

6.7.1 Introduction

Inthissection,theoperationalrulesforboxesandtheircontentsoftheCommonFileFormatforCFF‐TTsubtitletracksaredescribed.

6.7.2 Track Header Box (‘tkhd’)

TheTrackHeaderBox(‘tkhd’)SHALLconformtothedefinitioninSection2.3.5,withthefollowingadditionalormodifiedconstraints:

ThefollowingfieldsSHALLbesetasdefined: layer=‐1(infrontofvideoplane);and flags=thetrack_enabled,track_in_movie,andtrack_in_previewfields

SHALLeachbesetto1. ThewidthandheightfieldsSHALLbesetinaccordancewith[ISOTEXT]andwiththefollowing

additionalconstraints: Allsubtitletracks:ifthewidthandheightfieldsaresettoanon‐zerovalue,theaspect

ratiodefinedbythesefieldsSHALLmatchtheaspectratiooftheassociatedvideotrack;and Imagesubtitletracks:thewidthandheightSHALLbesettoanon‐zerovalueand

track_size_is_aspect_ratio_flagSHALLbesetto0;and

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |121

TextsubtitletrackswhichusescalarlengthsinoneormoreCFF‐TTdocuments:thewidthandheightfieldsSHALLbesettoanon‐zerovalueandthetrack_size_is_aspect_ratio_flagfieldSHALLbesetto0;and

TextsubtitletrackswhichdonotusescalarlengthsinanyCFF‐TTdocuments: thewidthandheightfieldsSHOULDbesettovalueswhichpreciselydefinethe

aspectratiooftherootcontainerandthetrack_size_is_aspect_ratio_flagfieldSHOULDbesetto1.

thewidthandheightfieldsMAYbesetto0,andifoneissetto0theotherSHALLbesetto0.Inthiscase,thetrack_size_is_aspect_ratio_flagfieldSHALLbesetto0.

OthertemplatefieldsSHALLbesettotheirdefaultvalues.

6.7.3 Movie Fragment Box(‘moof’)

MovieFragmentsinsubtitletracksarerequiredtoconformtothefollowingconstrains: EverysubtitletrackMovieFragmentexceptthelastMovieFragmentofasubtitletrackSHALLhave

adurationofatleastonesecond. ThelastMovieFragmentofasubtitletrackMAYhaveadurationoflessthanonesecond.

6.7.4 Media Header Box (‘mdhd’)

TheMediaHeaderBox(‘mdhd’)SHALLconformtothedefinitioninSection2.3.6,withthefollowingadditionalconstraint:

ThetimescaleSHALLbesettothesamevalueasthetimescaleoftheassociatedvideotrack’sMediaHeaderBox(‘mdhd’).

6.7.5 Handler Reference Box (‘hdlr’)

ThesyntaxandvaluesfortheHandlerReferenceBox(‘hdlr’)forCFF‐TTsubtitletracksSHALLconformto[ISO]withthefollowingadditionalconstraints:

Thehandler_type fieldSHALLbesetto“subt”

ThenamefieldoftheHandlerReferenceBox(‘hdlr’)forCFF‐TTsubtitletracksSHOULDbesettothevalueofthe"MetatadataMovie/TrackMetadata/Track/Subtitle/Type" assignedtotheCFF‐TTsubtitletrackinMulti‐TrackRequiredMetadata(seeSection2.1.2.1)whenMulti‐TrackRequiredMetadataispresentintheDCC.WhenthereismorethanoneTypevaluedefinedforthesubtitletrack,thevaluesSHALLbeconcatenatedandcomma‐separatedinthename fieldoftheHandlerReferenceBox(‘hdlr’).

6.7.6 Subtitle Media Header Box (‘sthd’)

ThesyntaxandvaluesfortheSubtitleMediaHeaderBox(‘sthd’)SHALLconformto[ISO]Section8.4.5.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |122

6.7.7 Sample Description Box (‘stsd’)

ForCFF‐TTsubtitletracks,theSampleDescriptionBox(‘stsd’)SHALLcontainaXMLSubtitleSampleEntrythatcomplieswith[ISOTEXT]withthefollowingadditionalconstraints:

ThenamespacefieldofXMLSubtitleSampleEntrySHALLlistalloftheXMLnamespacesdeclaredinanyoftheCFF‐TTtrackdocumentsinthetrackwiththefollowingexceptions: thebuilt‐inXMLSchemanamespaces“http://www.w3.org/2001/XMLSchema”and

http://www.w3.org/2001/XMLSchema‐instanceSHALLNOTbelisted. anynamespacedeclarationwhichhasaprefixbeginningwiththethree‐lettersequence

"xml"SHALLNOTbelisted. ifaschemadefinesmultiplenamespaces,itSHOULDonlybelistedonce(forexample,only

...ns/ttmlisrecommendedtobeincluded,notboth...ns/ttmland...ns/ttml#style).ThenamespacefieldSHALLNOTlistanyothernamespaces.SeealsotherequirementsdefinedinSection6.8.

Theschema_locationfieldofXMLSubtitleSampleEntrySHALLincludetheXMLschemasforallofthenamespacessetinthenamespacefield.SeealsotherequirementsdefinedinSection6.8.

Theauxiliary_mime_typefieldofXMLSubtitleSampleEntrySHALLbesetto“image/png”ifimagesareusedintheCFF‐TTsubtitletrack.

6.7.8 Sub‐Sample Information Box (‘subs’)

ThesyntaxandvaluesfortheSub‐SampleInformationBox(‘subs’)SHALLconformto[ISOTEXT].

6.7.9 Track Fragment Run Box (‘trun’)

OneTrackFragmentRunBox(‘trun’)SHALLbepresentineachsubtitletrackfragment.

Thedata-offset-present,sample-size-presentandsample-duration-presentflagsSHALLbesetandcorrespondingvaluesprovided.OtherflagsSHALLNOTbeset.

6.7.10 Track Fragment Random Access Box (‘tfra’)

OneTrackFragmentRandomAccessBox(‘tfra’)SHALLbestoredintheMovieFragmentRandomAccessBox(‘mfra’)foreachsubtitletrackiftheMovieFragmentRandomAccessBox(‘mfra’)ispresent.

The‘tfra’forasubtitletrackSHALLlisteachofitssubtitletrackfragmentsasarandomlyaccessiblesample.

6.8 SignalingforCFF‐TTTracks

6.8.1 Text Subtitle Tracks

ACFF‐TTtextsubtitletrackhasthefollowingcharacteristics: EachCFF‐TTDocumentinthesubtitletrackcomplieswiththerestrictionsdefinedinSection6.2.2.4. Thesubtitletrackdoesnotcontainanyimagefiles.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |123

ACFF‐TTtextsubtitletrackSHALLbesignaledasfollows: ThenamepsacefieldofXMLSubtitleSampleEntryintheCFF‐TTsubtitletrackSampleDescription

Box(‘stsd’)SHALLinclude“http://www.w3.org/ns/ttml”.

Theschema_locationfieldofXMLSubtitleSampleEntryintheCFF‐TTsubtitletrackSampleDescriptionBox(‘stsd’)SHALLinclude“http://www.w3.org/ns/ttml cff-tt-text-ttaf1-dfxp-{DMEDIA_VERSION_POINTS}.xsd”.

The “MetadataMovie/TrackMetadata/Track/Subtitle/Format”assignedtotheCFF‐TTsubtitletrackinMulti‐TrackRequiredMetadata(seeSection2.1.2.1)SHALLbesetto“Text”ifMulti‐TrackRequiredMetadataispresentintheDCC.

Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

6.8.2 ImageSubtitle Tracks

ACFF‐TTimagesubtitletrackhasthefollowingcharacteristics: EachCFF‐TTDocumentinthesubtitletrackcomplieswiththerestrictionsdefinedinSection6.2.2.5.ACFF‐TTimagesubtitletrackSHALLbesignaledasfollows:

ThenamepsacefieldofXMLSubtitleSampleEntryintheCFF‐TTsubtitletrackSampleDescriptionBox(‘stsd’)SHALLinclude“http://www.w3.org/ns/ttml”.

Theschema_locationfieldofXMLSubtitleSampleEntryintheCFF‐TTsubtitletrackSampleDescriptionBox(‘stsd’)SHALLinclude“http://www.w3.org/ns/ttml cff-tt-image-ttaf1-dfxp-{DMEDIA_VERSION_POINTS}.xsd”.

The “MetadataMovie/TrackMetadata/Track/Subtitle/Format”assignedtotheCFF‐TTsubtitletrackinMulti‐TrackRequiredMetadata(seeSection2.1.2.1)SHALLbesetto“Image”ifMulti‐TrackRequiredMetadataispresentintheDCC.

Note:{DMEDIA_VERSION_POINTS}isaparameter,definedinAnnexE.

6.8.3 Combined Subtitle Tracks

The “MetadataMovie/TrackMetadata/Track/Subtitle/Format”assignedtotheCFF‐TTsubtitletrackinMulti‐TrackRequiredMetadata(seeSection2.1.2.1)SHALLNOTbesetto“combined”.Note:“combined”CFF‐TTsubtitletracksareprohibitedperSection6.2.2.

6.9 SubtitleLanguageConsiderations

6.9.1 Overview

CFF-TT subtitle tracks are associated with a “language”. This Section is intended to provide additional information regarding CFF-TT subtitle “languages”. In this section, unless explicitly specified otherwise, the term “Primary Language Subtag” is as defined in [RFC5646] and specified Language Subtags are per those defined in [IANA-LANG].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |124

6.9.2 Recommended Unicode Code Points perSubtitle Language

Table6‐11 defines the set of Unicode Code Points that SHOULD be used in text-based CFF-TT subtitle tracks that are associated with a “language” containing the specified “Primary Language Subtag”. Unicode Code Points are per those defined in [UNICODE].

Table6‐11–RecommendedUnicodeCodePointsperLanguageLanguage(Informative)

PrimaryLangSubtags(Normative)

UnicodeCodePoints(Normative)

All “x‐ALL”(forthepurposesofthisspecification,this[RFC5646]privateusesubtagsequenceisconsideredtorepresentallpossiblelanguagesasdefinedin[IANA‐LANG])

(BasicLatin)U+0020‐U+007E(Latin‐1Supplement)U+00A0‐U+00FF(LatinExtended‐A)U+0152:LATINCAPITALLIGATUREOEU+0153:LATINSMALLLIGATUREOEU+0160:LATINCAPITALLETTERSWITHCARONU+0161:LATINSMALLLETTERSWITHCARONU+0178:LATINCAPITALLETTERYWITHDIAERESISU+017D:LATINCAPITALLETTERZWITHCARONU+017E:LATINSMALLLETTERZWITHCARON(LatinExtended‐B)U+0192:LATINSMALLLETTERFWITHHOOK(SpacingModifierLetters)U+02DC:SMALLTILDE (CombiningDiacriticalMarks)U+0301:COMBININGACUTEACCENT(GeneralPunctuation)U+2010‐U+2015:DashesU+2016‐U+2027:GeneralpunctuationU+2030‐U+203A:Generalpunctuation(Currencysymbols)U+20AC:EUROSIGN(LetterlikeSymbols)U+2103:DEGREESCELSIUSU+2109:DEGREESFAHRENHEITU+2120:SERVICEMARKSIGNU+2122:TRADEMARKSIGN(NumberForms)U+2153–U+215F:Fractions(MathematicalOperators)U+2212:MINUSSIGNU+221E:INFINITY(BoxDrawing)U+2500:BOXDRAWINGSLIGHTHORIZONTALU+2502:BOXDRAWINGSLIGHTVERTICALU+250C:BOXDRAWINGSLIGHTDOWNANDRIGHTU+2510:BOXDRAWINGSLIGHTDOWNANDLEFTU+2514:BOXDRAWINGSLIGHTUPANDRIGHTU+2518:BOXDRAWINGSLIGHTUPANDLEFT(BlockElements)U+2588:FULLBLOCK(GeometricShapes)U+25A1:WHITESQUARE(MusicalSymbols)U+2669:QUARTERNOTEU+266A:EIGHTHNOTEU+266B:BEAMEDEIGHTHNOTES

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |125

AlbanianLanguages(Informative)

PrimaryLangSubtags(Normative)

UnicodeCodePoints(Normative)

Albanian “sq” Sameasdefinedforthe“x‐ALL”subtagsequenceBalticLanguages(Informative)

PrimaryLangSubtags(Normative)

UnicodeCodePoints(Normative)

Latvian,Lithuanian “lv”,“lt” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐definedbelow(LatinExtended‐A)U+0100‐U+017F

FinnicLanguages(Informative)

PrimaryLangSubtags(Normative)

UnicodeCodePoints(Normative)

Finnish "fi" Sameasdefinedforthe“x‐ALL”subtagsequenceEstonian “et” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(Latin

Extended‐A)”whichisre‐definedbelow(LatinExtended‐A)U+0100‐U+017F

GermanicLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

Danish,Dutch/Flemish,English,German,Icelandic,Norwegian,Swedish

"da",“nl",“en”,"de","is","no","sv"

Sameasdefinedforthe“x‐ALL”subtagsequence

GreekLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

Greek “el” Sameasdefinedforthe“x‐ALL”subtagsequence(CombiningDiacriticalMarks)U+0308:COMBININGDIAERESIS(GreekandCoptic)U+0386:GREEKCAPITALLETTERALPHAWITHTONOSU+0387:GREEKANOTELEIAU+0388–U+03CE:Letters

RomanicLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

Catalan,French,Italian

“ca”,"fr","it" Sameasdefinedforthe“x‐ALL”subtagsequence

Portuguese,Spanish “pt”,“es” (Currencysymbols)U+20A1:COLONSIGNU+20A2:CRUZEIROSIGNU+20B3:AUSTRALSIGN

Romanian “ro” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”and“(LatinExtended‐B)”whichisre‐definedbelow(LatinExtended‐A)U+0100‐U+017F

(LatinExtended‐B)U+0192:LATINSMALLLETTERFWITHHOOKU+0218:LATINCAPITALLETTERSWITHCOMMABELOWU+0219:LATINSMALLLETTERSWITHCOMMABELOWU+021A:LATINCAPITALLETTERTWITHCOMMABELOWU+021B:LATINSMALLLETTERTWITHCOMMABELOW

SemiticLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

Arabic “ar” Sameasdefinedforthe“x‐ALL”subtagsequence

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |126

U+0609:ARABIC‐INDICPERMILLESIGNU+060C–U+060D:PunctuationU+061B:ARABICSEMICOLONU+061E:ARABICTRIPLEDOTPUNCTUATIONMARKU+061F:ARABICQUESTIONMARKU+0621–U+063A:BasedonISO8859‐6U+0640–U+064A:BasedonISO8859‐6U+064B–U+0652:PointsfromISO5559‐6U+0660–U+0669:Arabic‐IndicdigitsU+0670:ARABICLETTERSUPERSCRIPTALEFU+066A–U+066D:Punctuation

Hebrew “he” Sameasdefinedforthe“x‐ALL”subtagsequence(Hebrew)U+05B0–U+05C3:PointsandpunctuationU+05D0–U+05EA:BasedonISO8859‐8U+05F3–U+05F4:Additionalpunctuation

SlavicLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

Croatian,Czech,Polish,Slovenian,Slovak

“hr”,“cs”,“pl”,“sl”,“sk” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐definedbelow(LatinExtended‐A)U+0100‐U+017F

Bosnian,Bulgarian,Macedonian,Russian,Serbian,Ukrainian

“bs”,“bg”,“mk”,“ru”,“sr”,“uk”

Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐definedbelow(LatinExtended‐A)U+0100‐U+017F(SpacingModifierLetters)U+02BC:MODIFIERLETTERAPOSTROPHE(Cyrillic)U+0400–U+040F:CyrillicextensionsU+0410–U+044F:BasicRussianalphabetU+0450–U+045F:CyrillicextensionsU+048A–U+04F9:ExtendedCyrillic(LetterlikeSymbols)

6.9.2.1 U+2116:NUMEROSIGN

TurkicLanguages(Informative)

PrimaryLangSubtags(Normative)

UnicodeCodePoints(Normative)

Turkish “tr” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐defined

(LatinExtended‐A)U+0100‐U+017F

Kazakh “kk” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐defined

(LatinExtended‐A)U+0100‐U+017F

(Cyrillic)U+0400–U+040F:CyrillicextensionsU+0410–U+044F:BasicRussianalphabetU+0450–U+045F:CyrillicextensionsU+048A–U+04F9:ExtendedCyrillic

UgricLanguages(Informative)

PrimaryLangSubtags(Normative) UnicodeCodePoints(Normative)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |127

Hungarian “hu” Sameasdefinedforthe“x‐ALL”subtagsequence,exceptfor“(LatinExtended‐A)”whichisre‐definedbelow

(LatinExtended‐A)U+0100‐U+017F

(GeneralPunctuation)U+2052:COMMERCIALMINUSSIGN

(MiscellaneousMathematicalSymbols‐A)U+27E8:MATHEMATICALLEFTANGLEBRACKETU+27E9:MATHEMATICALRIGHTANGLEBRACKET

Note: it is expected that additional Language Subtags and associated Unicode Code Points will be added to a future release of this specification.

6.9.3 Reference Font Family per Subtitle Language

tts:fontFamily PrimaryLangSubtags ReferenceFontFamily

monospaceSerif AlllanguagesdefinedinD.2above. CourierNew:http://www.microsoft.com/typography/fonts/family.aspx?FID=10

proportionalSansSerif AlllanguagesdefinedinD.2abovewiththeexceptionofSemiticLanguages.

Arial:http://www.microsoft.com/typography/fonts/family.aspx?FID=8

Helvetica:http://www.linotype.com/en/526/Helvetica‐family.html

Notes: theReferenceFontFamilieswerechosenbecauseoftheircommonuse,generalavailabilityandthe

availabilityoflicense‐freemetricequivalentfontfamilies. PerSection6.6.4.2,fontsthatare‘metriccompatible’canbesubstitutedforReferenceFontFamily

(afontis‘metriccompatible’ifitdoesnotchangetextflow,althoughappearancemaybedifferent). It is expected that additional ReferenceFontFamilydefinitionsforotherLanguageswillbeaddedtoa

futurereleaseofthisspecification.

6.9.4 TypicalSubtitle Practice per Region (Informative)

Table6‐12 below provides an informative summary of subtitle languages commonly used in the listed regions. Primary language and Primary Language Subtag are indicated, with additional common region or script variant Language Subtags in brackets. Note that Table6‐11 provides Unicode Code Points associated with “Primary Language Subtag”.

Table6‐12–SubtitlesperRegion Region SubtitleLanguages(LangSubtags)

ALL(worldwide) English(“en”)

America(North)

ALL French(“fr”)[Québécois(“fr‐CA”)orParisian(“fr‐FR”)]

UnitedStates Spanish(“es”)[LatinAmerican(“es‐419”)]

America(CentralandSouth)

ALL Spanish(“es”)[LatinAmerican(“es‐419”)]

Brazil Portuguese(“pt”)[Brazilian(“pt‐BR”)]

Asia,MiddleEast,andAfrica

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |128

Region SubtitleLanguages(LangSubtags)

China Chinese(“zh”)[SimplifiedMandarin(“zh‐cmn‐Hans”)]

Egypt Arabic(“ar”)

HongKong Chinese(“zh”)[Cantonese(“zh‐yue”)]

India Hindi(“hi”)

Tamil(“ta”)

Telugu(“te”)

Indonesia Indonesian(“id”)

Israel Hebrew(“he”)

Japan Japanese(“ja”)

Kazakhstan Kazakh(“kk”)

Malaysia StandardMalay(“zsm”)

SouthKorea Korean(“ko”)

Taiwan Chinese(“zh”)[TraditionalMandarin(“zh‐cmn‐Hant”)]

Thailand Thai(“th”)

Vietnam Vietnamese(“vi”)

Europe

Benelux(Belgium,Netherlands,andLuxembourg)

French(“fr”)[Parisian(“fr‐FR”)]

Dutch/Flemish(“nl”)

Denmark Danish(“da”)

Finland Finnish(“fi”)

France French(“fr”)[Parisian(“fr‐FR”)]

Arabic(“ar”)

Germany German(“de”)

Turkish(“tr”)

Italy Italian(“it”)

Norway Norwegian(“no”)

Spain Spanish(“sp”)[Castilian(“sp‐ES”)]

Catalan(“ca”)

Sweden Swedish(“sv”)

Switzerland French(“fr”)[“fr‐CH”or“fr‐FR”]

German(“de”)[“de‐CH”]

Italian(“it”)[“it‐CH”]

Albania Albanian(“sq”)

Bulgaria Bulgarian(“bg”)

Croatia Croatian(“hr”)

CzechRepublic Czech(“cs”)

Estonia Estonian(“et”)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |129

Region SubtitleLanguages(LangSubtags)

Greece Greek(“el”)

Hungary Hungarian(“hu”)

Iceland Icelandic(“is”)

Latvia Latvian(“lv”)

Lithuania Lithuanian(“lt”)

Macedonia Macedonian(“mk”)

Poland Polish(“pl”)

Portugal Portuguese(“pt”)[Iberian(“pt‐PT”)]

Romania Romanian(“ro”)

Russia Russian(“ru”)

Serbia Serbian(“sr”)

Slovakia Slovak(“sk”)

Slovenia Slovenian(“sl”)

Turkey Turkish(“tr”)

Ukraine Ukrainian(“uk”)

Note: it is expected that additional Language Subtags will be added to future releases of this specification.

6.10 ClosedCaptionSubtitlesTranscodedfromCEA608orCEA708

Subtitletracksauthoredforthedeafandhardofhearing(closedcaptioning)aresignaledintherequiredmetadatawiththetype"SDH".AllsubtitletracksarerequiredtoconformtoaCFF‐TTProfilewhich,asnotedinSection6.2.2,arederivedfromtheSMPTETTProfiledefinedin[SMPTE‐TT].WhenSDHtracksaretranscodedfromCEA608[CEA608]bitstreamsthetracksSHALLconformwiththemetadataprovisionsdefinedinSMPTERP2052‐10[SMPTE‐608],Section5.3,specificallythatm608:channelSHALLbepresentandallothermetadatapresentintheoriginalCEA608bitstreamSHOULDbeincluded.TracksSHOULDcomplywiththeentiretyof[SMPTE‐608].WhenSDHtracksaretranscodedfromCEA708[CEA708]bitstreamsthetracksSHALLconformwiththemetadataprovisionsdefinedinSMPTERP2052‐11[SMPTE‐708],Section5.4.TracksSHOULDcomplywiththeentiretyof[SMPTE‐708].Whentunneldataisprovided,itSHALLcomplywiththetunnelencodingprovisionsof[SMPTE‐TT],[SMPTE‐608]and[SMPTE‐708]asappropriate.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |130

AnnexA.CFFParameters

TableA‐1–CurrentVersionParameter Value DescriptionDMEDIA_VERSION_NOPOINTS 210 ThisversionoftheDMediaspecification,withoutpoint

notation.DMEDIA_VERSION_POINTS 2.1.0 ThisversionoftheDMediaspecification,withpoint

notation.

 

TableA‐2–CompatibleVersionDMediaCompatibleVersion Description2.1.0 CommonFileFormat&MediaFormatsSpecificationV2.12.0.0 CommonFileFormat&MediaFormatsSpecificationV2.0

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |131

AnnexB.MediaProfiles

B.1. PDMediaProfile

B.1.1. Overview

ThePDMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforportabledevices.ThePDMediaProfileisidentifiedbythe‘cfpd’fourcharactercoderegisteredwith[MP4RA].

B.1.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection3,EncryptionofTrackLevelData,withtheadditionalconstraintsdefinedhere.

EncryptedtracksSHALLrestrictthevalueofdefault_IV_sizein‘tenc’to0x08,andthevalueofIV_sizein‘seig’(whensamplegroupsarepresent)to0x00or0x08;and

EachencryptedaudiotrackSHALLbeencryptedusingasinglekey;and EachencryptedvideotrackSHALLbeencryptedusingasinglekey;and SubtitletracksSHALLNOTbeencrypted.

Note:Encryptionisnotmandatory.

B.1.3. Constraints on Video

B.1.3.1. Overview

VideotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedhere.

ThevideotrackSHALLbeanAVCVideotrackasdefinedinSection4.3.

B.1.3.2. Constraintson[H264]ElementaryStreams

B.1.3.2.1. ProfileandLevel[H264]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H264]ProfileandLevelconstraints:

ConstrainedBaselineProfileasdefinedin[H264]. UptoLevel1.3asdefinedin[H264].

B.1.3.2.2. MaximumBitrate[H264]elementarystreamsconformingtothisMediaProfileSHALLNOTexceedthemaximumbitratedefinedby[H264]forthechosen[H264]ProfileandLevel(note:ConstrainedBaselineProfileatLevel1.3istheworsecasewitha768x103bits/secmaximumbitrate).SeeSection4.3.2.4formoreinformationonthecalculationof[H264]elementarystreammaximumbitrate.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |132

B.1.3.3. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R709].Presentationofcontentisassumedtooccuronadisplaywhichusestheelectro‐optictransferfunctionspecifiedin[R1886]withapeakluminanceof100cd/m2.Itisrecommendedthatcontentbegradedwithareferenceviewingenvironmentthatcomplieswith[R2035].

B.1.3.4. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

video_full_range_flag,ifpresent,SHALLbesetto0.

B.1.3.5. ConstraintsonPictureFormats

NALStructuredVideostreamsconformingtothisMediaProfileSHALLNOTexceedthefollowingcodedpictureformatconstraints:

Maximumencodedhorizontalsamplecountof416samples;and Maximumencodedverticalsamplecountof240samples;and Maximumframerateof30000÷1000(framerateiscalculatedasperSection4.3.2.5andSection

4.4.2.7).

B.1.4. Constraints on Audio

AudiotracksconformingtothisMediaProfileSHALLcomplywith: alloftherequirementsandconstraintsdefinedinSection5,AudioElementaryStreams,. oneoftheallowedcombinationsofaudioformat,maximumnumberofchannels,maximum

elementarystreambitrate,andsampleratedefinedbelow.TableB‐1–AllowedAudioFormatsinPDMediaProfile

AudioFormat Max.No.Channels SampleRate Max.Bitrate BitrateCalculationMPEG‐4AAC[2‐Channel] 2 48kHz 192Kbps Section5.3.2.2.2.4MPEG‐4HEAACv2 2 48kHz 192Kbps Section5.3.4.2.2.3MPEG‐4HEAACv2withMPEGSurround

5.1 48kHz 192Kbps Section5.3.5.2.2.3

B.1.5. Constraints on Subtitles

SubtitletracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection6,SubtitleElementaryStreams,withthefollowingadditionalconstraints:

ACFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)widthfieldvalueSHALLNOTexceedthemaximumhorizontalsamplecountdefinedinB.1.3.5,andtheCFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)heightfieldvalueSHALLNOTexceedthemaximumverticalsamplecountdefinedinB.1.3.5; and

ACFF‐TTsubtitletrackSHALLNOTexceedtheconstraintsdefinedinTableB‐2below;and

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |133

TableB‐2–HypotheticalRenderModelConstraints(General)Property ConstraintSubtitlefragment/samplesize Totalsamplesize<=500x210bytesNormalizedbackgrounddrawingperformancefactor(BDraw)

12(PerformanceFactor(1/s)

ACFF‐TTtextsubtitletrackSHALLNOTexceedtheconstraintsdefinedinTableB‐3below;andTableB‐3–HypotheticalRenderModelConstraints(Textsubtitle)

Property ConstraintMaximumNormalizedGlyphBufferSize 1(BufferSize)Normalizedglyphcopyperformancefactor(GCpy) 12(PerformanceFactor(1/s)Non‐CJKtextrenderingperformancefactor(Ren) 1.2(PerformanceFactor(1/s)CJKtextrenderingperformancefactor(Ren) 0.6(PerformanceFactor(1/s)

Note: “CJK”inTableB‐3represents“Chinese,Japanese,Korean”Glyphs. TableB‐3definedperformanceappliestoallsupportedfontstyles(includingoutline

border). CFF‐TTimagesubtitletracksSHALLNOTbeused.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |134

B.2. SDMediaProfile

B.2.1. Overview

TheSDMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforstandarddefinitiondevices.TheSDMediaProfileisidentifiedbythe‘cfsd’fourcharactercoderegisteredwith[MP4RA].

B.2.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection3,EncryptionofTrackLevelData,withtheadditionalconstraintsdefinedhere.

EncryptedtracksSHALLcomplywiththeconstraintsdefinedinAnnexB.1.2.Note:Encryptionisnotmandatory.

B.2.3. Constraints on Video

B.2.3.1. Overview

VideotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedhere.

B.2.3.2. Constraintson[H264]ElementaryStreams

B.2.3.2.1. ProfileandLevel[H264]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H264]ProfileandLevelconstraints:

ConstrainedBaselineProfileasdefinedin[H264]. UptoLevel3asdefinedin[H264].

B.2.3.2.2. MaximumBitrateH264]elementarystreamsconformingtothisMediaProfileSHALLNOTexceedthemaximumbitratedefinedby[H264]forthechosen[H264]ProfileandLevel(note:ConstrainedBaselineProfileatLevel3istheworsecasewithabe10x106bits/secmaximumbitrate).SeeSection4.3.2.4formoreinformationonthecalculationof[H264]elementarystreammaximumbitrate.

B.2.3.3. Constraintson[H265]ElementaryStreams

B.2.3.3.1. Profile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H265]Profile,TierandLevelconstraints:

MainProfileasdefinedin[H265]. MainTierasdefinedin[H265]. UptoLevel3.1asdefinedin[H265].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |135

B.2.3.3.2. MaximumBitrate[H265]elementarystreamsconformingtothisMediaProfileSHALLNOTexceedthemaximumbitratedefinedby[H265[forthechosen[H265]Profile,TierandLevel(note:MainProfile,MainTierandLevel3.1istheworsecasewitha10x106bits/secmaximumbitrate).SeeSection4.4.2.6formoreinformationonthecalculationof[H265]elementarystreammaximumbitrate.

B.2.3.4. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfile: SHOULDbeencodedusingthecolorparametersdefinedby[R709];and SHALLbeencodedwiththefollowingcolorparameters:

for24Hz,30Hz&60Hzcontent:thecolorparametersdefinedby[R709],orthecolorparametersdefinedfor525‐linevideosystemsasper[R601];or

for25Hz&50Hzcontent:thecolorparametersdefinedby[R709],orthecolorparametersdefinedfor625‐PALvideosystemsasper[R1700].

Presentationofcontentisassumedtooccuronadisplaywhichusestheelectro‐optictransferfunctionspecifiedin[R1886]withapeakluminanceof100cd/m2.Itisrecommendedthatcontentbegradedwithareferenceviewingenvironmentthatcomplieswith[R2035].

B.2.3.5. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

video_full_range_flag,ifpresent,SHALLbesetto0. colour_description_present_flagSHALLbesetto1ifthecolorparametersfrom

[R709]arenotused.

B.2.3.6. ConstraintsonPictureFormats

NALStructuredVideostreamsconformingtothisMediaProfileSHALLNOTexceedthefollowingcodedpictureformatconstraints:

Maximumencodedhorizontalsamplecountof854samples;and Maximumencodedverticalsamplecountof480samples;and Maximumframerateof60000÷1000(framerateiscalculatedasperSection4.3.2.5andSection

4.4.2.7).

B.2.4. Constraints on Audio

AudiotracksconformingtothisMediaProfileSHALLcomplywith: alloftherequirementsandconstraintsdefinedinSection5,AudioElementaryStreams,. oneoftheallowedcombinationsofaudioformat,maximumnumberofchannels,maximum

elementarystreambitrate,andsampleratedefinedineitherofthetablesbelow.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |136

TableB‐4–AllowedAudioFormatsinSDMediaProfileAudioFormat Max.No.

ChannelsSampleRate Max.Bitrate BitrateCalculation

MPEG‐4AAC[2‐Channel] 2 48kHz 192Kbps Section5.3.2.2.2.4MPEG‐4HEAACV2level4[5.1‐channel]

5.1 48kHz 1440Kbps Section5.3.3.2.2.5

MPEG‐H3DAudio 5.1 48kHz 2016Kbps Section5.4.2.2AC‐3(DolbyDigital) 5.1 48kHz 640Kbps Section5.5.1.2.3EnhancedAC‐3(DolbyDigitalPlus)

5.1 48kHz 3024Kbps Section5.5.2.2.5

AC‐4 5.1 48KHz 1512Kbps Section5.6.4.2.3DTS 5.1 48kHz 1536Kbps Section5.6.2.2DTS‐HD 5.1 48kHz 3018Kbps Section5.6.2.2

TableB‐5–AllowedEnhancedAudioFormatsinSDMediaProfileAudioFormat Max.No.

ChannelsSampleRate Max.Bitrate BitrateCalculation

MPEG‐4HEAACV2level6[5.1,7.1‐Channel]

7.1 48kHz 2016Kbps Section5.3.3.2.2.5

MPEG‐H3DAudio 7.1 48kHz 2592Kbps Section5.4.2.2EnhancedAC‐3(DolbyDigitalPlus)

7.1 48kHz 3024Kbps Section5.5.2.2.5

AC‐4 7.1 48kHz,96kHz,192kHz

6048Kbps Section5.6.4.2.3

DTS 6.1 48kHz 1536Kbps Section5.6.2.2 5.1 48kHz,96kHz 1536Kbps Section5.6.2.2DTS‐HD 7.1 48kHz,96kHz 6123Kbps Section5.6.2.2DTS‐HDMasterAudio 8 48kHz,96kHz,

192kHz24.5Mbps Section5.6.2.2

MLP(DolbyTrueHD) 8 48kHz,96kHz,192kHz

18Mbps Section5.5.3.2.4

B.2.5. Constraints on Subtitles

SubtitletracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection6,SubtitleElementaryStreams,withthefollowingadditionalconstraints:

ACFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)widthfieldvalueSHALLNOTexceedthemaximumhorizontalsamplecountdefinedinB.2.3.6,andtheCFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)heightfieldvalueSHALLNOTexceedthemaximumverticalsamplecountdefinedinB.2.3.6; and

ACFF‐TTsubtitletrackSHALLNOTexceedtheconstraintsdefinedinTableB‐2;and ACFF‐TTtextsubtitletrackSHALLNOTexceedtheconstraintsdefinedinTableB‐3;and ACFF‐TTimagesubtitletrackSHALLNOTexceedtheconstraintsdefinedinTableB‐6.

TableB‐6–HypotheticalRenderModelConstraints(Imagesubtitle)Property ConstraintReferenceimagesize Singleimagesize<=100x210bytes

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |137

EncodedImageBufferSize

500x210bytes.Note:Samplesizeislimitedto500x210bytes,butaCFF‐TTdocumentcanbearbitrarilysmall,sonearlytheentiresubtitlesamplecouldbefilledwithimagedata.

DecodedImageBuffersize2x220pixelsforeachofthetwoDecodedImageBuffers.ADecodedImageBuffercanbufferallde‐compressedimagesfromasubtitlesample.

ImageDecodingrate 1x220pixelspersecondNormalizedimagecopyperformancefactor(ICpy)

6(PerformanceFactor(1/s)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |138

B.3. HDMediaProfile

B.3.1. Overview

TheHDMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforhighdefinitiondevices.TheHDMediaProfileisidentifiedbythe‘cfhd’fourcharactercoderegisteredwith[MP4RA].

B.3.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection3,EncryptionofTrackLevelData,withtheadditionalconstraintsdefinedhere.

EncryptedtracksSHALLcomplywiththeconstraintsdefinedinAnnexB.1.2.Note:Encryptionisnotmandatory.

Note:Encryptionisnotmandatory.

B.3.3. Constraints on Video

VideotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedhere.

B.3.3.1. Constraintson[H264]ElementaryStreams

B.3.3.1.1. ProfileandLevel[H264]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H264]ProfileandLevelconstraints:

ConstrainedBaselineProfile,MainProfileorHighProfileasdefinedin[H264]. UptoLevel4asdefinedin[H264].

B.3.3.1.2. MaximumBitrate[H264]elementarystreamsconformingtothisMediaProfileSHALLNOTexceedthemaximumdefinedby[H264]forthechosen[H264]ProfileandLevel(note:HighProfileatLevel4istheworsecasewitha25.0x106bits/secmaximumbitrate).SeeSection4.3.2.4formoreinformationonthecalculationof[H264]elementarystreammaximumbitrate.

B.3.3.2. Constraintson[H265]ElementaryStreams

B.3.3.2.1. Profile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H265]Profile,TierandLevelconstraints:

MainProfileorMain10Profileasdefinedin[H265]. MainTierasdefinedin[H265]. UptoLevel4.1asdefinedin[H265].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |139

B.3.3.2.2. MaximumBitrate[H265]elementarystreamsconformingtothisProfileSHALLNOTexceedthemaximumdefinedby[H265]forthechosen[H265]Profile,TierandLevel(note:Main10Profile,MainTierandLevel4.1istheworsecasewitha20.0x106bits/secmaximumbitrate).SeeSection4.4.2.6formoreinformationonthecalculationof[H265]elementarystreammaximumbitrate.

B.3.3.3. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R709].Presentationofcontentisassumedtooccuronadisplaywhichusestheelectro‐optictransferfunctionspecifiedin[R1886]withapeakluminanceof100cd/m2.Itisrecommendedthatcontentbegradedwithareferenceviewingenvironmentthatcomplieswith[R2035].

B.3.3.4. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

video_full_range_flag,ifpresent,SHALLbesetto0.

B.3.3.5. ConstraintsonPictureFormats

NALStructuredVideostreamsconformingtothisMediaProfileSHALLNOTexceedthefollowingcodedpictureformatconstraints:

Maximumencodedhorizontalsamplecountof1920samples;and Maximumencodedverticalsamplecountof1080samples;and Maximumframerateof60000÷1000(framerateiscalculatedasperSection4.3.2.5andSection

4.4.2.7).

B.3.4. Constraints on Audio

AudiotracksconformingtothisMediaProfileSHALLcomplywith: alloftherequirementsandconstraintsdefinedinSection5,AudioElementaryStreams,. oneoftheallowedcombinationsofaudioformat,maximumnumberofchannels,maximum

elementarystreambitrate,andsampleratedefinedinAnnexB.2.4.

B.3.5. Constraints on Subtitles

SubtitletracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.2.5exceptasfollows:

ACFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)widthfieldvalueSHALLNOTexceedthemaximumhorizontalsamplecountdefinedinB.3.3.5,andtheCFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)heightfieldvalueSHALLNOTexceedthemaximumverticalsamplecountdefinedinB.3.3.5.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |140

B.4. xHDMediaProfile

B.4.1. Overview

ThexHDMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforhighdefinitiondevicessupportinghighbitrate.ThexHDMediaProfileisidentifiedbythe‘cfxd’coderegisteredwith[MP4RA].

B.4.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection3,EncryptionofTrackLevelData,withtheadditionalconstraintsdefinedhere.

EachencryptedaudiotrackSHALLbeencryptedusingasinglekey;and EachencryptedvideotrackMAYbeencryptedusingmorethanonekey;and SubtitletracksSHALLNOTbeencrypted;and ForagivenKID,InitializationVectorsSHALLNOTbere‐usedandSHALLfollowtheguidelines

outlinedin[CENC]Section9.2and9.3.ThisuniquenessconstraintappliestoallInitializationVectorsthatareexplicitlysetinthefileandthosethatareimplicitlygeneratedbyAES‐CTR.

Note:Encryptionisnotmandatory.

B.4.3. Constraints on Video

B.4.3.1. Overview

VideotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedhere.

B.4.3.2. Constraintson[H264]ElementaryStreams

B.4.3.2.1. ProfileandLevel[H264]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H264]ProfileandLevelconstraints:

ConstrainedBaselineProfile,MainProfileorHighProfileasdefinedin[H264]. UptoLevel4.1asdefinedin[H264].

B.4.3.2.2. MaximumBitrate[H264]elementarystreamsconformingtothisMediaProfileSHALLNOTexceedamaximuminputbitrateof40.0x106bits/sec.SeeSection4.3.2.4formoreinformationonthecalculationof[H264]elementarystreammaximumbitrate.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |141

B.4.3.3. Constraintson[H265]ElementaryStreams

B.4.3.3.1. Profile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H265]Profile,TierandLevelconstraints:

MainProfileorMain10Profileasdefinedin[H265]. MainTierorHighTierasdefinedin[H265]. UptoLevel4.1asdefinedin[H265].

B.4.3.3.2. MaximumBitrate[H265]elementarystreamsconformingtothisProfileSHALLNOTexceedamaximuminputbitrateof40.0x106bits/secmaximumbitrate).SeeSection4.4.2.6formoreinformationonthecalculationof[H265]elementarystreammaximumbitrate.

B.4.3.4. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R709].Presentationofcontentisassumedtooccuronadisplaywhichusestheelectro‐optictransferfunctionspecifiedin[R1886]withapeakluminanceof100cd/m2.Itisrecommendedthatcontentbegradedwithareferenceviewingenvironmentthatcomplieswith[R2035].

B.4.3.5. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

video_full_range_flag,ifpresent,SHALLbesetto0.

B.4.3.6. ConstraintsonPictureFormats

NALStructuredVideostreamsconformingtothisMediaProfileSHALLNOTexceedthefollowingcodedpictureformatconstraints:

Maximumencodedverticalsamplecountof1080samples. Maximumframerateof60000÷1000(framerateiscalculatedasperSection4.3.2.5andSection

4.4.2.7).

B.4.4. Constraints on Audio

AudiotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.3.4.

B.4.5. Constraints on Subtitles

SubtitletracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.3.5.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |142

B.5. UHDMediaProfile

B.5.1. Overview

TheUHDMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforUltra‐HDdefinitiondevices.TheUHDMediaProfileisidentifiedbythe‘cfud’fourcharactercoderegisteredwith[MP4RA].

B.5.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection3,EncryptionofTrackLevelData,withtheadditionalconstraintsdefinedhere.

EachencryptedaudiotrackSHALLbeencryptedusingasinglekey;and EachencryptedvideotrackMAYbeencryptedusingmorethanonekey;and SubtitletracksSHALLNOTbeencrypted;and ForagivenKID,InitializationVectorsSHALLNOTbere‐usedandSHALLfollowtheguidelines

outlinedin[CENC]Section9.2and9.3.ThisuniquenessconstraintappliestoallInitializationVectorsthatareexplicitlysetinthefileandthosethatareimplicitlygeneratedbyAES‐CTR.

Note:Encryptionisnotmandatory.

B.5.3. Constraints on Video

VideotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedhere.

ThevideotrackSHALLbeanHEVCVideotrackasdefinedinSection4.4.

B.5.3.1. Constraintson[H265]ElementaryStreams

B.5.3.1.1. Profile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowing[H265]Profile,TierandLevelconstraints:

MainProfileorMain10Profileasdefinedin[H265]. MainTierorHighTierasdefinedin[H265]. UptoLevel5.1asdefinedin[H265].

B.5.3.1.2. MaximumBitrate[H265]elementarystreamsconformingtothisProfileSHALLNOTexceedamaximuminputbitrateof100.0x106bits/sec;seeSection4.4.2.5formoreinformationonthecalculationof[H265]elementarystreammaximumbitrate.

B.5.3.2. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R709]orthecolorparametersdefinedby[R2020].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |143

Presentationofcontentisassumedtooccuronadisplaywhichusestheelectro‐optictransferfunctionspecifiedin[R1886]withapeakluminanceof100cd/m2.Itisrecommendedthatcontentbegradedwithareferenceviewingenvironmentthatcomplieswith[R2035].

B.5.3.3. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

colour_description_present_flagSHALLbesetto1ifthecolorparametersfrom[R709]arenotused.

colour_primariesSHALLbepresentandsetto9ifthecolorparametersfrom[R2020]areused.

chroma_sample_loc_type_top_fieldandchroma_sample_loc_type_bottom_fieldSHALLbepresentandsetto2,whencolorparametersfrom[R2020]areused.

transfer_chracteristicsSHALLbepresentandbesetto14ifthecolorparametersfrom[R2020]areused.

matrix_coefficientsSHALLbepresentandbesetto9ifthecolorparametersfrom[R2020]areused.

B.5.3.4. ConstraintsonPictureFormats

NALStructuredVideostreamsconformingtothisMediaProfileSHALLNOTexceedthefollowingcodedpictureformatconstraints:

Maximumencodedhorizontalsamplecountof3840samples;and Maximumencodedverticalsamplecountof2160samples. Maximumframerateof60000÷1000(framerateiscalculatedasperSection4.4.2.7).

B.5.4. Constraints on Audio

AudiotracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.3.4.

B.5.5. Constraints on Subtitles

SubtitletracksconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.3.5exceptasfollows:

ACFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)widthfieldvalueSHALLNOTexceedthemaximumhorizontalsamplecountdefinedinB.5.3.4,andtheCFF‐TTsubtitletrack’sTrackHeaderBox(‘tkhd’)heightfieldvalueSHALLNOTexceedthemaximumverticalsamplecountdefinedinB.5.3.4;and

ACFF‐TTimagesubtitletrackSHALLbeauthoredtonotexceedtheimagedecodingrateinTableB‐7.

TableB‐7–HypotheticalRenderModelConstraints(Imagesubtitle)

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |144

Property ConstraintImageDecodingrate 4x220pixelspersecond

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |145

B.6. HDR10MediaProfileDefinition

B.6.1. Overview

TheHDR10MediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforHighDynamicRangedevices.TheHDR10MediaProfileisidentifiedbythe‘cfh1’fourcharactercoderegisteredwithMP4RegistrationAuthority(http://mp4ra.org).

B.6.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.5.2.

B.6.3. Constraints on Video

VideotracksconformingtothisMediaProfileshallcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.5.3,withtheadditionalconstraintsdefinedhere.

B.6.3.1. Constraintson[H265]ElementaryStreams

B.6.3.1.1. 4 5 BProfile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowingHEVCProfile,TierandHEVCLevelconstraints: Main10Profileasdefinedin[H265].

B.6.3.2. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R2020].NALStructuredVideostreamsconformingtothisMediaProfileSHALLbegradedusingthereferenceelectro‐optictransferfunctionspecifiedin[SMPTE‐2084].

B.6.3.3. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

transfer_characteristicsSHALLbesetto16forthereferenceelectro‐optictransferfunctionspecifiedin[SMPTE‐2084].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |146

B.7. DolbyVision(“DV”)ProfileDefinition

B.7.1. Overview

TheDVMediaProfiledefinesaudio‐visualcontentinteroperabilitypointsforHighDynamicRangedevicesutilizingDolbyVisiontechnology.TheconfigurationofDolbyVisioninthisProfileiscomprisedofaBaseLayervideotrack(“BL”)withtheadditionofanEnhancementLayervideotrack(“DV‐EL”).TheBLisconformantwithanotherMediaProfiledefinedinthisspecificationandcanbedecodedbydevicessupportingthatMediaProfile.TheELconsistsofadditional[H264]or[H265]conformantvideoand/orDolbyVisionHDRmetadata.Forexample,whenanELisdecodedandcombinedwithadecodedBL,thisresultsinanenhancedHDRvideooutput(i.e.conformingtoRec2020&SMPTE2084).Note:TheDVELdoesnotnecessarilyconformtoallthe“videotrack”provisionsthroughoutthisspecification.See[DV]fordetails.Forexample,itmightnotusethe‘avc3’sampletype.TheDVMediaProfileisidentifiedbythe‘cfdv’fourcharactercodesregisteredwiththeMP4RegistrationAuthority(http://mp4ra.org).

B.7.2. Constraints on Encryption

TheDV‐ELvideotrackSHALLconformtotheencryptionconstraintsfortheBLvideotrack.

B.7.3. Constraints on Video

B.7.3.1. BaseLayer(“BL”)

TheBLvideotrackSHALLconformtooneoftheHD,xHD,UHDorHDR10MediaProfiles.

B.7.3.2. DVEnhancementLayer(“DV‐EL”)

TheDV‐ELbitstreamandtrackSHALLbeasdefinedin[DV].InadditiontoaBLvideotrack,thereSHALLalsobeaDV‐ELtrack.Note:From[DV],DV‐ELhasthefollowingproperties: canbeencodedin,andcomplieswith,either[H264]or[H265].AlthoughdecodingDV‐ELdoesnot

resultinviewablepictures,itdoesconformtothesyntaxof[H264]or[H265]asappropriate;and thesyntaxandvaluesforvisualsampleentryareeitherDolbyVisionAVCSampleEntry(‘dvav’)

orDolbyVisionHEVCSampleEntry(‘dvhe’);and theframerateandDPBsize(innumberofframes)areidenticaltotheBLvideotrack;and iftheBLsamplecontainsanIDRframe,theELsamplemusthaveanIDRframeatthesame

presentationtime;and fragmentdurationsandpresentationtimesareidenticaltotheBLvideotrack;and eachELhasoneandonlyoneassociatedBLandviceversa(i.e.tracksarepaired1:1.Note:TheDVELdoesnotnecessarilyconformtoallthe“videotrack”provisionsthroughoutthisspecification.See[DV]fordetails.Forexample,itmightnotusethe‘avc1’sampletype.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |147

B.7.3.3. MaximumBitrate

ThemaximumbitrateofDV‐ELSHALLbecalculatedbyimplementationofthebufferandtimingmodeldefinedineither[H264]or[H265]AnnexCasappropriateforthetypeofvideocoding.WhenDolbyVisionEnhancementLayertrackispresentthemaximumbitrateisfurtherconstrainedasfollows:thesumofthebitratesfortheBaseLayervideoandtheDV‐ELSHALLnotexceedthemaximumbitratethatappliestojusttheBaseLayervideointhatprofile.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |148

B.8. HDR12MediaProfileDefinition

B.8.1. Overview

Thesinglestream12‐bitHDRMediaProfiledefinesanaudio‐visualcontentinteroperabilitypointforHighDynamicRangedevicessupportingcontentencodedin12‐bitcolor.TheHDRMediaProfileisidentifiedbythe‘cfh2’fourcharactercoderegisteredwithMP4RegistrationAuthority(http://mp4ra.org).

B.8.2. Constraints on Encryption

ContentconformingtothisMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.5.2.

B.8.3. Constraints on Video

VideotracksconformingtothisMediaProfileshallcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.5.3,withtheadditionalconstraintsdefinedhere.

B.8.3.1. Constraintson[H265]ElementaryStreams

B.8.3.1.1. Profile,TierandLevel[H265]elementarystreamsconformingtothisMediaProfileSHALLcomplywiththefollowingHEVCProfile,Tier,Level,andMaximumBitrateconstraints:

Main12Profileasdefinedin[H265]

B.8.3.1.2. MaximumBitrate[H265]elementarystreamsconformingtothisProfileshallNOTexceedamaximuminputbitrateof150.0x106bits/sec;seeSection4.4.2.5formoreinformationonthecalculationof[H265]elementarystreammaximumbitrate.

B.8.3.2. ConstraintsonMastering

NALStructuredVideostreamsconformingtothisMediaProfileSHALLbeencodedusingthecolorparametersdefinedby[R2020].NALStructuredVideostreamsconformingtothisMediaProfileSHALLbegradedusingthereferenceelectro‐optictransferfunctionspecifiedin[SMPTE‐2084].

B.8.3.3. ConstraintsonEncoding

NALStructuredVideostreamsconformingtothisMediaProfile: SHALLhavethefollowingpre‐determinedvalues:

transfer_characteristicsSHALLbesetto16forthereferenceelectro‐optictransferfunctionspecifiedin[SMPTE‐2084].

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |149

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |150

AnnexC.DeliveryTargets

C.1. GeneralDownloadDeliveryTargetConstraints

C.1.1. Constraints on File Structure

DCCsconformingtoaDownloadDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection2,TheCommonFileFormat,withtheadditionalconstraintsdefinedasfollows:

TheDCCMovieFragmentSHALLcontainoneMediaDataBox(‘mdat’).

C.1.2. Constraints on Video

DCCsconformingtoaDownloadDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withtheadditionalconstraintsdefinedasfollows:

ForeachVideotrackthefollowingrequirementsapply: VideotrackMovieFragmentsSHALLstartwithSAPtype1or2. Videotracksutilizing(‘avc1’)sampleentriesasdefinedinSection4.3.1.1:everyAVC

videotrackfragmentSHALLcontainaTrickPlayBox(‘trik’). VideotrackswhichhaveoneormoreFragmentswithadurationgreaterthan3.003secs

andutilize(‘avc3’)sampleentriesasdefinedinSection4.3.1.1SHALLbesignaledintheTrackFragmentBox('traf')usingRandomAccessPoint(RAP)samplegroupingasdefinedin[ISO]Section10.4,withthefollowingadditionalconstraints: AllsyncsamplesSHALLbesignaledinaSampletoGroupBox(‘sbgp’)withthe

followingconstraints:o grouping_type:setto'rap 'o group_description_indexforthesyncsample:correspondstoa

VisualRandomAccessEntry intheSampleGroupDescriptionBox(‘sgpd’)withthefollowingfieldvalues

o num_leading_samples_known=1 o num_leading_samples=0

AllAVCRA‐Isamples(definedinSection4.2.6)SHALLbesignaledinaSampletoGroupBox(‘sbgp’)withthefollowingconstraints:

o grouping_type:setto'rap 'o group_description_indexfortheRAIsample:correspondstoa

VisualRandomAccessEntry intheSampleGroupDescriptionBox(‘sgpd’)withthefollowingfieldvalues

o num_leading_samples_known=1 o num_leading_samples=numberof“leadingsamples” o Notethata“leadingsample”inRAPSampleGroupingisdefinedasa

samplethatprecedestheRAPinpresentationorderand

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |151

immediatelyfollowstheRAPoranotherleadingsampleindecodingorder,andcannotbecorrectlydecodedwhendecodingstartsfromtheRAP.

Videotrackswhichutilize(‘hev1’)sampleentriesasdefinedinSection4.4.1.1SHALLsignalTypeofsyncsamplesusingsyncsamplesamplegroupingasdefinedin[ISOVIDEO]Section8.4.4.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |152

C.2. Multi‐TrackDownloadDeliveryTarget

C.2.1. Overview

TheMulti‐TrackDownloadDeliveryTargetisintendedforapplicationswhereastandaloneDCCismadeavailablefordownloaddelivery.TheMulti‐TrackDownloadDeliveryTargetisdefinedbythe‘cfd1’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].

C.2.2. Constraints on File Structure

DCCsconformingtothisDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexC.1.1withtheadditionalconstraintsdefinedasfollows:

TheFileTypeBox(‘ftyp’)SHALLlistthe‘cfd1’brandasacompatible_brand.

TheMetadataBox(‘meta’)containedintheMovieBox(‘moov’)forRequiredMulti‐TrackMetadataasdefinedinSection2.1.2.1SHALLbepresentintheDCC.

AFreeSpaceBox(‘free’)SHALLbethelastboxintheMovieBox(‘moov’).Note:thisprovidesreservedspaceforaddingDRM‐specificinformation.

TheDCCFooterSHALLcontainaMovieFragmentRandomAccessBox(‘mfra’).

C.2.3. Constraints on Encryption

C.2.3.1. ConstraintsonPDandSDMediaProfileEncryption

DCCsconformingtothisDeliveryTargetandthePDMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.1.2withtheadditionalconstraintsdefinedinthisSection.DCCsconformingtothisDeliveryTargetandSDMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.2.2withtheadditionalconstraintsdefinedinthisSection.

AllencryptedaudiotracksintheDCCSHALLbeencryptedusingthesamekey(“audiokey”). AllencryptedvideotracksintheDCCSHALLbeencryptedusingthesamekey(“videokey”). ThevideokeyandaudiokeySHALLbethesamekey.

C.2.3.2. ConstraintsonHDMediaProfileEncryption

DCCsconformingtothisDeliveryTargetandtheHDMediaProfileSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.3.2withtheadditionalconstraintsdefinedinthisSection.

AllencryptedaudiotracksintheDCCSHALLbeencryptedusingthesamekey(“audiokey”). AllencryptedvideotracksintheDCCSHALLbeencryptedusingthesamekey(“videokey”). ThevideokeySHOULDbeseparate(independentlychosen)fromtheaudiokey.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |153

C.2.3.3. ConstraintsonxHD,UHD,DV,HDR10andHDR12MediaProfileEncryption

DCCsconformingtothisDeliveryTargetandthexHD,UHD,DV,HDR10andHDR12MediaProfilesSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexB.4.2withtheadditionalconstraintsdefinedinthisSection.

AllencryptedaudiotracksintheDCCSHALLbeencryptedusingthesamekey(“audiokey”). videokeysSHOULDbeseparate(independentlychosen)fromtheaudiokey.

C.2.4. Constraints on Video

C.2.4.1. Overview

DCCsconformingtothisDeliveryTargetshallcomplywithalloftherequirementsandconstraintsdefinedinAnnexC.1.2withtheadditionalconstraintsdefinedasfollows:

DCCsSHALLcontainexactlyonevideotrack,andthatvideotrackSHALLconformtoSection4. AvideotrackfragmentSHALLhaveadurationnogreaterthan3.003seconds.

C.2.4.2. ConstraintsonSequenceParameterSets(SPS)

Theconditionofthefollowing[H264]fieldsSHALLNOTchangethroughoutanAVCVideotrackconformingtothisDeliveryTarget:

pic_width_in_mbs_minus1

pic_height_in_map_units_minus1Theconditionofthefollowing[H265]fieldsSHALLNOTchangethroughoutanHEVCVideotrackconformingtothisDeliveryTarget:

pic_width_in_luma_samples

pic_height_in_luma_samples

C.2.4.2.1. ConstraintsonVisualUsabilityInformation(VUI)ParametersTheconditionofthefollowingSHALLNOTchangethroughoutAVCVideotracksconformingtothisDeliveryTarget:

aspect_ratio_idc Bitrate[](calculatedbybit_rate_scaleandbit_rate_value_minus1)

CpbSize[](calculatedbycpb_size_scaleandcpb_size_value_minus1)TheconditionofthefollowingSHALLNOTchangethroughoutHEVCVideotracksconformingtothisDeliveryTarget:

aspect_ratio_idc

aspect_ratio_idc

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |154

cpb_cnt_minus1 bit_rate_scale bit_rate_value_minus1 cpb_size_scale

cpb_size_value_minus1

C.2.4.3. ConstraintsonPictureFormats

C.2.4.3.1. OverviewTheMediaProfiledefinitionsinAnnexBdefinepermittedpictureformats.ThisSectionprovidesmoredetailonpermittedpictureformatsperMediaProfileforDownloadDeliveryTargets.Constraintsaredefinedintheformofframesizeandframerate.

Framesizeisdefinedasthemaximumdisplaywidthandheightofthepictureinsquarepixelsaftercroppingandsubsamplerescalingisapplied.Foreachpictureformatdefined,oneormoreallowedvaluecombinationsarespecifiedforhorizontalandverticalsub‐samplefactors,whicharenecessaryforselectingvalidTrackHeaderBoxwidthandheightproperties,asspecifiedinSection2.3.5andSection4.2.1.

Whensub‐samplingisapplied,atleastoneofeitherthewidthortheheightoftheencodedpicturesizeSHALLmatchthevaluespecifiedinthe“MaxSizeEncoded”columninthefollowingTables.SeeSection4.5formoreinformation.

Framerateisdefinedasaratiocorrespondingtoarealnumber.ThisnumberSHALLprecisely(withnoroundingerrorpermitted)matchthevaluecalculatedperSection4.3.2.5andSection4.4.2.7).

aspect_ratio_idcSHALLbeencodedaslistedorsetto255andExtended_SARprovidedtomatchtheaspectratiodefined.

C.2.4.3.2. ConstraintsonPDMediaProfilePictureFormatsNALStructuredVideostreamsconformingtothePDMediaProfile(seeAnnexB.1)andthisDeliveryTargetSHALLcomplywiththepictureformatconstraintslistedbelow.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |155

TableC‐1–PictureFormatsandConstraintsofPDMediaProfilefor24Hz&30HzContentPictureFormats Sub‐sampleFactors EncodingParameters

Framesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

320x180 1.778

24000÷1000,24000÷1001,30000÷1000,30000÷1001

1 1 320x180 1

320x240 1.333

24000÷1000,24000÷1001,30000÷1000,30000÷1001

1 1 320x240 1

416x240(Note) 1.733

24000÷1000,24000÷1001,30000÷1000,30000÷1001

1 1 416x240 1

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |156

TableC‐2–PictureFormatsandConstraintsofPDMediaProfilefor25HzContentPictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

320x180 1.778 25000÷1000 1 1 320x180 1

320x240 1.333 25000÷1000 1 1 320x240 1

416x240(Note) 1.733 25000÷1000 1 1 416x240 1

Note:The416x240framesizecorrespondstoa15.6:9pictureaspectratio.RecommendationsforpreparingcontentinthisframesizeareavailableinSection6“VideoProcessingbeforeAVCCompression”of[ATSC].

C.2.4.3.3. ConstraintsonSDMediaProfilePictureFormatsNALStructuredVideostreamsconformingtotheSDMediaProfile(seeAnnexB.2)andthisDeliveryTargetSHALLcomplywiththepictureformatsconstraintslistedbelow.TableC‐3–PictureFormatsandConstraintsofSDMediaProfilefor24Hz,30Hz&60HzContentPictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

sar_width sar_height

640x480 1.333

24000÷1000,24000÷1001,30000÷1000,30000÷1001

1.1 1 704x480 3 ‐ ‐1 1 640x480 1 ‐ ‐0.75 1 480x480 14 ‐ ‐0.75 0.75 480x360 1 ‐ ‐0.5 0.75 320x360 15 ‐ ‐

640x480 1.33360000÷1000,60000÷1001

464/640 0.75 464x360 255 30 29

0.5 0.75 320x360 15 ‐ ‐

854x480

1.778

24000÷1000,24000÷1001

1 1 854x480 1 ‐ ‐704/854 1 704x480 5 ‐ ‐640/854 1 640x480 14 ‐ ‐640/854 0.75 640x360 1 ‐ ‐426/854 0.75 426x360 15 ‐ ‐

854x480

1.778

30000÷1000,30000÷1001

704/854 1 704x480 5 ‐ ‐640/854 1 640x480 14 ‐ ‐640/854 0.75 640x360 1 ‐ ‐426/854 0.75 426x360 15 ‐ ‐

854x480 1.778 60000÷1000,60000÷1001

426/854 0.75 426x360 15 ‐ ‐

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |157

TableC‐4–PictureFormatsandConstraintsofSDMediaProfilefor25Hz&50HzContentPictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

sar_width sar_height

640x480 1.333 25000÷1000

1.1 1.2 704x576 2 ‐ ‐1 1 640x480 1 ‐ ‐0.75 1 480x480 14 ‐ ‐0.75 0.75 480x360 1 ‐ ‐0.5 0.75 320x360 15 ‐ ‐

640x480 1.333 50000÷10000.75 0.75 480x360 1 ‐ ‐

0.5 0.75 320x360 15 ‐ ‐

854x480 1.778 25000÷1000

1 1 854x480 1 ‐ ‐704/854 1.2 704x576 4 ‐ ‐640/854 1 640x480 14 ‐ ‐640/854 0.75 640x360 1 ‐ ‐426/854 0.75 426x360 15 ‐ ‐

854x480 1.778 50000÷1000560/854 0.75 560x360 255 9 8426/854 0.75 426x360 15 ‐ ‐

C.2.4.3.4. ConstraintsonHDandxHDMediaProfilePictureFormatsNALStructuredVideostreamsconformingtotheHDMediaProfile(seeAnnexB.3)andxHDMediaProfile(seeAnnexB.4)andthisDeliveryTargetSHALLcomplywiththepictureformatconstraintslistedbelow.TableC‐5–PictureFormatsandConstraintsofHDandxHDMediaProfilefor24Hz,30Hz&60Hz

ContentPictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

1280x720 1.778

24000÷1000,24000÷1001,30000÷1000,30000÷1001,60000÷1000,60000÷1001

1 1 1280x720 1

0.75 1 960x720 14

0.5 1 640x720 16

1920x1080

1.778

24000÷1000,24000÷1001,30000÷1000,30000÷1001

1 1 1920x1080 1

0.75 1 1440x1080 14

0.75 0.75 1440x810 1

0.5 0.75 960x810 15

TableC‐6–PictureFormatsandConstraintsofHDandxHDMediaProfilefor25Hz&50HzContent

PictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

1280x720 1.77825000÷1000,50000÷1000

1 1 1280x720 1

0.75 1 960x720 14

0.5 1 640x720 16

1920x1080

1.778

25000÷1000

1 1 1920x1080 1

0.75 1 1440x1080 14

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |158

0.75 0.75 1440x810 1

0.5 0.75 960x810 15

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |159

C.2.4.3.5. ConstraintsonUHDMediaProfilePictureFormatsNALStructuredVideostreamsconformingtotheUHDMediaProfile(seeAnnexB.5)andthisDeliveryTargetSHALLcomplywiththepictureformatconstraintslistedbelow.TableC‐7–PictureFormatsandConstraintsofUHDMediaProfilefor24Hz,30Hz&60HzContent

PictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate Horiz. Vert. Max.sizeencoded

aspect_ratio_idc

3840x2160

1.778

24000÷1000,24000÷1001,30000÷1000,30000÷1001,48000÷1000,60000÷1000,60000÷1001

1 1 3840x2160 1

0.75 1 2880x2160 14

0.75 0.75 2880x1620 1

0.5 0.75 1920x1620 15

TableC‐8–PictureFormatsandConstraintsofUHDMediaProfilefor25Hzand50HzPictureFormats Sub‐sampleFactors EncodingParametersFramesize(widthxheight)

Pictureaspect

Framerate

Horiz.

Vert.

Max.sizeencoded

aspect_ratio_idc

3840x2160

1.778

25000÷1000,50000÷1000

1 1 3840x2160 1

0.75 1 2880x2160 14

0.75 0.75 2880x1620 1

0.5 0.75 1920x1620 15

C.2.4.3.6. ConstraintsonHDR10andHDR12MediaProfilePictureFormatsNALStructuredVideostreamsconformingtotheHDR10(seeAnnexB.6)orHDR12(seeAnnexB.8)MediaProfilesandthisDeliveryTargetSHALLcomplywiththepictureformatconstraintslistedbelow.

PictureFormatsandConstraintsofHDR10MediaProfilefor24Hz,30Hz&60HzContent:seeTableC‐5andTableC‐7.

PictureFormatsandConstraintsofHDR10MediaProfilefor25Hz&50HzContent:seeTableC‐6andTableC‐8.

C.2.5. Constraints on Audio

DCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinSection5,AudioElementaryStreams,withtheadditionalconstraintsdefinedhere.

ADCCSHALLcontainatleastoneMPEG‐4AAC[2‐Channel]audiotrack. ADCCSHALLNOTcontainmorethan32audiotracks. ADCCwithavideotrackwhichcomplieswiththeSDMediaProfileSHALLonlycontainaudiotracks

thatcorrespondwithTableB‐4“AllowedAudioFormatsinSDMediaProfile”.

C.2.6. Constraints on Subtitles

DCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinSection6,SubtitleElementaryStreamswiththefollowingadditionalconstraints:

TheassociatedvideotrackSHALLbethevideotrackintheDCC.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |160

ADCCMAYcontainzeroormoresubtitletracks,butSHALLNOTcontainmorethan255subtitletracks.

ThedurationofasubtitletrackSHALLNOTexceedthedurationofthelongestaudioorvideotrackintheDCC.

AsubtitletrackfragmentMAYhaveadurationuptothedurationofthelongestaudioorvideotrackintheDCC.

Asubtitletrack’sTrackHeaderBox(‘tkhd’)SHALLhavethesamewidthandheightvaluesasTrackHeaderBox(‘tkhd’)forthevideotrackintheDCC.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |161

C.3. Single‐TrackDownloadDeliveryTarget

C.3.1. Overview

TheSingle‐TrackDownloadDeliveryTargetisintendedtobeusedtogetherwith[DDMP]tosupportapplicationswhereaDCCismadeavailablefordownloaddeliveryaspartofaPresentationdefinedwithinaCommonMediaPackage:

UnliketheMulti‐TrackDCCsdefinedinAnnexC.2,aSingle‐TrackDCCisintendedtobeplayedtogethersimultaneouslywithotherSingle‐TrackDCCs.

A“Presentation”isasetofsingle‐trackDCCsthatareintendedtobeplayedtogether. Single‐trackDCCsandPresentationsfollowmostoftheencodingconstraintsofatrackinaMulti‐

TrackDCC(asdefinedinAnnexC.2)exceptwhereCommonMediaPackagemetadataisutilizedforequivalentfunctionality,suchasmetadatastorageandtrackdescriptionasdefinedin[DDMP].

See[DDMP]formoreinformationontheCommonMediaPackageandPresentations.TheSingle‐TrackDownloadDeliveryTargetisdefinedbythe‘cfd2’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].

C.3.2. Constraints on File Structure

DCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinAnnexC.1.1withtheadditionalconstraintsdefinedasfollows:

TheFileTypeBox(‘ftyp’)SHALLlistthe‘cfd2’brandasacompatible_brand. TheDCCSHALLcontainoneandonlyoneISOMediatrack. RequiredMulti‐TrackMetadata,asdefinedinSection2.1.2,andOptionalMulti‐TrackMetadata,as

definedinSection2.1.4,SHOULDNOTbepresent. AFreeSpaceBox(‘free’)SHOULDNOTbepresent.

TheDCCFooterSHALLcontainaMovieFragmentRandomAccessBox(‘mfra’).

C.3.3. Constraints on Encryption

DCCsconformingtothisDeliveryTargetSHALLcomplywiththeadditionalconstraintsdefinedinthisSection.

AllvideokeysSHOULDbeseparate(independentlychosen)fromaudiokeys.

C.3.4. Constraints on Video

Single‐TrackVideoDCCsconformingtothisDeliveryTargetSHALLcomplywiththevideoconstraintsdefinedinAnnexC.2.4withtheadditionalconstraints/exceptionsdefinedasfollows:

AVCVideotracksSHALLutilizethe(‘avc3’)in‐bandsampleentriesasperSection4.3.1.1.

C.3.5. Constraints on Audio

Single‐TrackAudioDCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinSection5,AudioElementaryStreams.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |162

APresentationutilizingthisDeliveryTargetSHALLcontainatleastoneMPEG‐4AAC[2‐Channel]audiotrack.

C.3.6. Constraints on Subtitles

Single‐TrackSubtitleDCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinSection6,SubtitleElementaryStreamswiththefollowingadditionalconstraints.

TheassociatedvideotrackSHALLbethevideotrackcontainedinthesamePresentationasthesubtitletrack.

Ifthesubtitletrack’sTrackHeaderBox(‘tkhd’)widthandheightvaluesarenon‐zero,thewidthorheightorbothwidthandheightSHOULDmatchtheassociateddimensiondefinedfor“FrameSize”inoneofthePictureFormatslistedinAnnexC.2.4.3.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |163

C.4. Pre‐PackagedDeliveryTarget

C.4.1. Overview

ThePre‐PackagedDeliveryTargetisintendedtobeusedtogetherwith[DDMP]tosupportapplicationswhereasingle‐trackDCCismadeavailablewithpre‐packageddeliveryaspartofaPresentationdefinedwithinaCommonMediaPackage;pre‐packageddeliverymeansthatthecontentisdeliveredincompleteforme.g.onanopticaldisc.DCCsconformingtothisDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexC.3exceptasdefinedbelow.ThePre‐PackagedDCCDeliveryTargetisdefinedbythe‘cfd3’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].

C.4.2. Constraints on File Structure

DCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinAnnexC.3.2withtheadditionalconstraintsandexceptionsdefinedasfollows:

TheFileTypeBox(‘ftyp’)SHALLlistthe‘cfd2’brandasacompatible_brandonlyifallrequirementsdefinedinAnnexC.3aresatisfied.

TheFileTypeBox(‘ftyp’)SHALLlistthe‘cfd3’brandasacompatible_brand.

TheDCCHeaderSHALLcontainoneSegmentIndexBox(‘sidx’).ThesampleatthestartofeachMovieFragmentSHALLbesignaledintheSegmentIndexBox(‘sidx’).

C.4.3. Constraints on Video

Single‐TrackVideoDCCsconformingtothisDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinAnnexC.3.4withtheadditionalconstraintsandexceptionsdefinedasfollows:

VideotrackMovieFragmentsSHALLstartwithSAPtype1,2,or3.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |164

C.5. StreamingDeliveryTarget

C.5.1. Overview

TheStreamingDeliveryTargetisintendedtobeusedtogetherwith[DStream]tosupportapplicationswhereasingle‐trackDCCismadeavailableforstreamingdeliveryaspartofanAdaptationSetwithina[DASH]MediaPresentationDescription:

UnliketheSingle‐TrackDCCsdefinedinAnnexC.3andC.4,aStreamingDCCisintendedtobeoneofseveralDCCsinan“AdaptationSet”.

An“AdaptationSet”isasetofsingle‐trackDCCsthatareinterchangeableencodedversionsofthesameContentwhichareseamlesslyswitchablein[DASH]adaptivestreamingapplications.

“SeamlesslySwitchable”meansdifferentMovieFragmentscanbeselectedinsequencefromdifferentDCCswithoutpresentationerrors.

A“MediaPresentationDescription”definesAdaptationSetsthatareintendedtobeplayedtogether(similartoaPresentationasdefinedinAnnexC.3).

See[DStream]formoreinformationontheAdaptationSetsandMediaPresentationDescriptions.TheStreamingDCCDeliveryTargetisdefinedbythe‘cfd4’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].

C.5.2. Constraints on File Structure

DCCsconformingtoaStreamingDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection2,TheCommonFileFormat,withadditionalconstraintsdefinedasfollows:

TheFileTypeBox(‘ftyp’)SHALLlistthe‘cfd4’brandasacompatible_brand.

TheDCCMovieFragmentSHALLcontainoneMediaDataBox(‘mdat’). TheDCCSHALLcontainoneandonlyoneISOMediatrack. TheSegmentIndexBox(‘sidx’),ifpresent,SHALLcomplywithSection2.3.21and[DASH]

Section6.3.4.

C.5.3. Constraints on Encryption

DCCsconformingtothisDeliveryTargetSHALLcomplywithadditionalconstraintsdefinedinthisSection. AllencryptedaudiotrackslistedbyaPeriodina[DStream]MPDSHOULDbeencryptedusingthe

samekey(“audiokey”).SeealsoAnnexC.5.7“ConstraintsonAdaptionSets". AllencryptedvideotrackslistedbyaPeriodina[DStream]MPDSHOULDbeencryptedusingthe

samekey(“videokey”).SeealsoAnnexC.5.7“ConstraintsonAdaptionSets". AllvideokeysSHOULDbeseparate(independentlychosen)fromtheaudiokeys.

C.5.4. Constraints on Video

C.5.4.1. Overview

DCCsconformingtoaStreamingDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedinSection4,VideoElementaryStreams,withadditionalconstraintsdefinedasfollows:

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |165

DCCsSHALLcontainexactlyonevideotrack,andthatvideotrackSHALLconformtoSection4. AVCVideotracksSHALLutilizethe(‘avc3’)in‐bandsampleentriesasperSection4.3.1.1. VideotrackMovieFragmentsSHALLstartwithSAPtype1or2. negativecompositionoffsetsintheTrackRunBox(‘trun’)(seeSection2.4)SHALLbeusedto

synchronizethecompositiontimesofvideosamplestothedecodetimeofothertrackssothateachsampleisframeaccuratelysynchronizedtothemovieand[DASH]MPDpresentationtimeline.Note:useofnegativecompositionoffsetsprovidesamechanismtomatchthepresentationtimeofthefirstvideoframetothedecodetimeofMovieFragments,andpreventsgapsoroverlapsinsamplepresentationtimeswhenswitchingbetween[DStream]Representationswithdifferentcompositionoffsetsduetodifferentnumbersofpicturesinthedecodedpicturebuffernecessarytodecodeandpresentthefirstvideoframe.[DStream]MPDs,SegmentIndexBox(‘sidx’)indexes,andSegmentaddressesarebasedonthepresentationtimelineofthemedia,butDCCMovieFragmentsarestoredandtimestampedwithdecodetime.

C.5.4.2. ConstraintsonPictureFormats

VideotracksconformingtothisDeliveryTargetMAYutilizedynamicsubsamplingofeachCodedVideoSequencewithinaDCCMovieFragmentbyallowingdifferentencodedhorizontalandverticalvideospatialsamplecountsineachCodedVideoSequence(seeSection4.5.4).Note:DynamicsubsamplingwithinaCSFfileisnormallyusedtoreducevideobitratepeaksandmaintainconsistentMediaSegmentsize.Note:NALStructuredVideoparametersetspreventtheneedtoinsertanInitializationSegmentpriortoeachMediaSegmentincasethedecodingparameterschangeduetodynamicsubsamplingoradaptiveswitchingbetweenDCCs([DASH]Representations);theparametersetsprovidetheinformationnecessaryfordisplaysystemstoscaleeachCodedVideoSequencetoacommondisplayresolutionandposition.

C.5.5. Constraints on Audio

Single‐TrackAudioDCCsconformingtoaStreamingDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedininSection5,AudioElementaryStreams.A[DStream]MPDutilizingthisDeliveryTargetSHALLcontainatleastoneMPEG‐4AAC[2‐Channel]audiotrack.

C.5.6. Constraints on Subtitles

Single‐TrackSubtitleDCCsconformingtoaStreamingDeliveryTargetSHALLcomplywiththerequirementsandconstraintsdefinedinSection6,SubtitleElementaryStreamswithadditionalconstraintsdefinedasfollows:

TheassociatedvideotrackSHALLbethevideotrackcontainedinthesamePeriodasthesubtitletrack.

Ifthesubtitletrack’sTrackHeaderBox(‘tkhd’)widthandheightvaluesarenon‐zero,thewidthorheightorbothwidthandheightSHOULDmatchtheassociateddimensiondefinedfor“FrameSize”inoneofthePictureFormatslistedinAnnexC.2.4.3.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |166

C.5.7. Constraints on Adaptation Sets

AdaptationSetsconformingtothisDeliveryTargetSHALLcomplywithalloftherequirementsandconstraintsdefinedin[DStream]withtheadditionalconstraintsdefinedasfollows:

AllencryptedaudiotrackswithinanAdaptionSetSHALLusethesamekey;and AllencryptedvideotrackswithinanAdaptionSetSHALLusethesamekey.;and AllvideotracksinthesameAdaptionSetSHALLhavematchingSampleEntrytype;and AllDCCAdaptationSetsina[DStream]MPDPeriodSHALLhavethesameMovieHeaderBox

(‘mvhd’)timescalevalue;and Note:Fora[DStream]Presentation,theMovieHeaderBox(‘mvhd’)timescaleis

appliedtotheentire[DASH]PresentationPeriod,whichisanindependenttimespanwithinthePresentation.ThistimescalevalueisindependentofthetracktimescaleintheMediaHeaderBox(‘mdhd’),whichisspecifictothemediainthecontainingtrack,andshouldbedifferentfordifferentmediasamplefrequenciesinthesamePeriod.

AllDCCsinthesameAdaptationSethavematchingTrackHeaderBox(‘tkhd’)fieldsasfollows: thevaluesofwidthandheightfieldsSHALLmatch;and thevaluesofthetimescalefieldSHALLmatch;and thevaluesofthetrack_IDfieldSHALLmatch;and

AllDCCsinthesameAdaptationSetSHALLhavethesamedefault_KIDvaluefortheTrackEncryptionBox(‘tenc’)ifthetrackisencrypted;and

AllDCCsinthesameAdaptationSetSHALLbe“timealigned”i.e.allDCCsinthesameAdaptationSetSHALLhavematchingtrackfragmentdurationsforallMovieFragmentswiththesamebaseMediaDecodeTimeandMovieFragmentsequence_number;and

AllDCCsinthesameAdaptationSetSHALLbe“spatiallyaligned”i.e.allencodedandcroppedsamplecountsSHALLbeexactratiosoftheNormalizedDisplayWidthandNormalizedDisplayHeight;and

AllDCCsinaGroupofAdaptationSetsMAYusethesametrack_IDvaluetoidentifyallDCCsandAdaptationSetsintheGroupi.e.[DStream]AdaptationSet@groupattributeinMPD=track_IDinthe‘tkhd’,‘trex’,and‘tfhd’boxes);and

[DStream]AdaptationSet@groupattributeSHALLfollowtheassignmentinTableC‐7.TableC‐9–[DStream]GroupAssignment

[DStream]Group TrackType1 PrimaryVideo2 SecondaryVideo5 MainAudio6 SecondaryAudio7 TertiaryAudio3 MainSubtitle4 SecondarySubtitle8 Other

Note:AnyDCCfileheaderintheAdaptationSetfollowedbyacontinuousandorderedsequenceofmoviefragmentsfromthatDCCoraDCCintheAdaptationSetwithlowervideocodecLevel,Profile,andTierwillformavalidDCCandthereforeconformto@bitstreamSwitching=”true”per[DASH].A

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |167

singleinitializationofaplayer’svideoparsing,decryption,decoding,andpresentationsystemissufficienttopresentmoviefragmentsselectedfromthatsubsetoftheAdaptationSet.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |168

AnnexD.InternetMediaTypeTemplateandParameters

TheMediaTypesignalingdefinedinthisSectionSHALLbeusedwhendeliveringDCCs. MediaTypeTemplate:SHALLbesetto“video/vnd.dece.mp4”. MediaTypeParameters:

profiles:SHALLlistallISObrandssignaledintheFileTypeBox(‘ftyp’)inaccordancewith[RFC6381]Section4.

profile-level-idc:SHALLlistthe[MP4RA]fourcharactercodewiththeMediaProfileofeachtrackinacommaseparatedlist,inascendingtrack_idorder.TheMediaProfileofthetrackisdefinedasfollows. Videotrack:SHALLdefinetheMediaProfileassociatedwiththeVideotrack. Audiotrack:SHALLsignalthelowestMediaProfilesupportedbytheAudiotrack

andtheEcosystem(s)inwhichthefilewillbeused.Forexample,aDCCtobeusedinanecosystemwhichsupportstheSDMediaProfileasthelowestMediaProfilewoulduse'cfsd'forastereoAACaudiotrack;thatsametrackwoulduse'cfpd'ifusedinanEcosysteminwhichthePortableDefinitionMediaProfileissupported.

Subtitletrack:SHALLsignaltheMediaProfileassociatedwiththeSubtitletrackasfollows: IftheSubtitletrackhasanyCFF‐TTdocumentthathasbeenauthoredfora

specificMediaProfileorsetofMediaProfiles,thelowestMediaProfilesupportedbytheSubtitletrackSHALLbesignaled. Note:CFF‐TTdocumentsareauthoredforaspecificMediaProfileif

theyconformtotheCFF‐TTImagebasedProfile,oriftheyconformtoCFF‐TTTextbasedProfileandoneormoreofthesedocumentsusesscalarlengthattributes.

IftheSubtitletrackcontainsCFF‐TTdocumentsthathaveallbeenauthoredtobeMediaProfileindependentthenthe‘cfad’coderegisteredwith[MP4RA]SHALLbesignalled. Note:CFF‐TTdocumentscanbeMediaProfileindependentifthey

conformtotheCFF‐TTTextbasedProfile,noscalarlengthattributesareusedandtheperformanceconstraintsdefinedinAnnexB.1.5arenotexceeded.

codecs:SHALLlisteachtrack,inascendingtrack_idorder,inaccordancewith[RFC6381]Section3.3.The[MP4RA]codecscodepointSHALLbeusedforvideoandaudiotracks.“cfft”SHALLbeusedforCFF‐TTtracksutilizingtheTextProfile(seeSection6.2.3.4)and“cffi”SHALLbeusedforCFF‐TTtracksutilizingtheImageProfile(seeSection6.2.3.5).

protection: SHALLlistwhichprotectionschemeappliestoeachtrack,inascendingtrack_idorderinacommaseparatedlist,usingthe[MP4RA]fourcharactercoderegisteredprotectionschemevalueor‘none’toindicatethatthetrackisnotprotected.

languages:SHALLlisttheassociatedlanguageofalltracks,inascendingtrack_idorderinacommaseparatedlist,inaccordancewith[RFC5646].ThevideotracklanguageSHOULDrepresenttheoriginalreleaselanguageofthecontent.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |169

AnnexE.TheDECEFileFormat

TheDECEFileFormatisbasedontheCommonFileFormat,withenhancementstosupporttheDECEEcosystem.See[DSystem]formoreinformationontheDECEEcosystem.

E.1. DECEFileFormat

ThisSectiondefinesanadaptionoftheCommonFileFormatfortheDECEEcosystem.TheDECEFileFormatisdefinedbythe‘uvvu’brand,whichisacodepointontheISOBaseMediaFileFormatdefinedby[ISO].Thebrand‘uvvu’SHALLincorporatesupportforallfeaturesofthe‘ccff’branddefinedinSection2withadditionalrequirementsdefinedinthisAnnex.

E.1.1. Extensions to the Common FileFormat

TheSectiondefinesadditionalboxesthatSHALLbesupportedbythebrand‘uvvu’inadditiontotheboxesrequiredbythe‘ccff’brand.

TableD‐1–AdditionalBoxesoftheDECEFileFormatNL0 NL1 NL2 NL3 NL4 NL5 FormatReq. Specification Descriptionbloc 0/1 AnnexE.1.1.1 BaseLocationBox ainf 0/1 AnnexE.1.1.2 AssetInformationBox

FormatReq.:Numberofboxesrequiredtobepresentinthecontainer,where‘*’means“zeroormore”and‘+’means“oneormore”.Avalueof"0/1"indicatesonlythataboxmightormightnotbepresentbutdoesnotstipulatetheconditionsofitsappearance.

E.1.1.1. BaseLocationBox(‘bloc’)

BoxType ‘bloc’

Container FileMandatory NoQuantity ZeroorOneTheBaseLocationBoxisafixed‐sizeboxthatcontainstheBaseLocationandPurchaseLocationstringsnecessaryforlicenseacquisition,asdefinedinSections8.3.2and8.3.3of[DSystem].TheBaseLocationBox(‘bloc’),ifpresentintheDCC:

SHOULDimmediatelyfollowtheFileTypeBox(‘ftyp’)intheDCCHeader;and

SHALLappearbeforetheMovieBox(‘moov’).

E.1.1.1.1. Syntaxaligned(8) class BaseLocationBox extends FullBox(‘bloc’, version=0, flags=0) { byte[256] baseLocation; byte[256] basePurlLocation; // optional byte[512] reserved = 0; }

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |170

E.1.1.1.2. Semantics baseLocation–SHALLcontaintheBaseLocationdefinedinSection8.3.2of[DSystem],followed

bynullbytes(0x00)toalengthof256bytes. basePurlLocation–optionallydefinestheBasePurlLocationasspecifiedinSection8.3.3of

[DSystem],followedbynullbytes(0x00)toalengthof256bytes.IfnoBasePurlLocationisdefined,thisfieldSHALLbefilledwithnullbytes(0x00).

Reserved–Reservespaceforfutureuse.ImplementationsconformantwiththisspecificationSHALLignorethisfield.

E.1.1.2. AssetInformationBox(‘ainf’)

TheAssetInformationBox(‘ainf’)SHOULDNOTbeused.Itisprovidedforbackwardscompatibilitywithpreviousreleasesofthisspecification.TheContentInformationBox(‘coin’)definedinSection2.2.2replacestheusetheAssetInformationBox(‘ainf’).BoxType ‘ainf’

Container MovieBox(‘moov’)Mandatory YesQuantity ZeroorOneTheAssetInformationBox(‘ainf’)containsfileinformationtoidentify,licenseandplaycontentwithintheDECEecosystem.TheAssetInformationBox(‘ainf’),ifpresentintheDCC:

SHOULDimmediatelyfollowtheContentInformationBox(‘coin’)intheDCCHeader;and

SHALLappearbeforetheMovieBox(‘moov’).

E.1.1.3. Syntax

aligned(8) class AssetInformationBox extends FullBox(‘ainf’, version=0, flags) { int(32) profile_version; string APID; Box other_boxes[]; // optional }

E.1.1.4. Semantics

flags –24‐bitintegerdefinedasfollows:hidden: whensetindicatesthatfileshouldnotbevisibletotheuser.Flagvalueis

‘0x000001’. profile_version–indicatestheMediaProfiletowhichthiscontainerfileconforms.Themost

significant8bitsdesignatetheprofile(PD,SD,HD,etc.)asdefinedintheAnnexesofthisspecification.Theleastsignificant24bitsSHALLbesettothe[UNICODE]UTF‐8representationofthisDMediaSpecificationasdefinedinAnnexA.,DMEDIA_VERSION_NOPOINTS.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |171

APID–indicatestheAssetPhysicalIdentifier(APID)ofthiscontainerfile,asdefinedinSection5.5.1“AssetIdentifiers”of[DSystem].

other_boxes –Availableforprivateandfutureuse.

E.1.2. Constraints on ISOBase Media File Format Boxes

E.1.2.1. FileTypeBox(‘ftyp’)

DCCsconformingtotheDECEFileFormatSHALLincludeaFileTypeBox(‘ftyp’)asspecifiedinSection2.3.1withthefollowingconstraints:

The‘uvvu’brandSHALLbesetasacompatible_brandintheFileTypeBox(‘ftyp’).Note:signalingofthe‘uvvu’brandindicatesthatthefilefullycomplieswiththerequirementsinthisAnnex. Ifthemajor_brandfieldissetto‘uvvu’,theminor_versionfieldSHALLbesetto

theintegerrepresentationofDMEDIA_VERSION_NOPOINTS(definedinAnnexA.).

E.1.3. Constraints on ‘ccff’ Boxes

E.1.3.1. ContentInformationBox(‘coin’)

DCCsconformingtotheDECEFileFormatshallincludeaContentInformationBox(‘coin’)asspecifiedinSection2.2.2withthefollowingconstraints:

Brand: Aniso_brandfieldSHALLbeincludedwiththevalue“uvvu”. Theversionfieldwhichaccompaniestheaboveiso_brandvalueSHALLbesettothe

integerrepresentationofDMEDIA_VERSION_NOPOINTS(definedinAnnexA.). Asset:

AnamespacefieldSHALLbeincludedwiththevalue“urn:dece”. Theasset_idfieldwhichaccompaniestheabovenamespacefieldSHALLbesettothe

AssetPhysicalIdentifier(APID)oftheDCC,asdefinedinSection5.5.1“AssetIdentifiers”of[DSystem].

E.2. MediaProfiles

TheMediaProfilesdefinedinAnnexB.arenotextendedorconstrainedbythe‘uvvu’brand.

E.3. DeliveryTargets

TheDeliveryTargetsdefinedinAnnexC.applytothe‘uvvu’brandwiththeadditionalrequirementsdefinedinthisSection.

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |172

E.3.1. Multi‐Track Download DeliveryTarget

DCCsconformingtothisDeliveryTargetandthe‘uvvu’brandSHALLcomplywiththerequirementsandconstraintsdefinedinAnnex0(Multi‐TrackDownloadDeliveryTarget)withtheadditionalrequirementsdefinedinthisSection.

E.3.1.1. ConstraintsonFileStructure

DCCsconformingtothisDeliveryTargetandthe‘uvvu’brandSHALLcomplywithalloftherequirementsandconstraintsdefinedinAnnexC.2.2withtheadditionalconstraintsdefinedasfollows:

TheBaseLocationBox(‘bloc’)SHALLbepresentintheDCC.

E.4. InternetMediaTypeTemplateandParameters

TheInternetMediaTypeTemplateandParameterrequirementsdefinedinAnnexD.applyfortheDECEFileFormat.

E.5. FileExtensions

ThefileextensionsdefinedinTableE‐1applyfortheDECEEcosystem.TableE‐1–DECEFileFormatFileExtensionRequirements

DCCType FileExtensionDECEMulti‐TrackDCC .uvuDECEVideoSingle‐TrackDCC .uvvDECEAudioSingle‐TrackDCC .uvaDECESubtitleSingle‐TrackDCC .uvt

E.6. DECEInteroperabilityPoints

TheTablesbelowdefinewhichcombinationsofMediaProfiles,DeliveryTargetsandmandatorycodecsaresupportedbytheDECEEcosystem.Thesecombinationsarecalled“InteroperabilityPoints”.TheseTablesusethefollowingheadings:

“InteroperabilityPoint”–identifiestheInteroperabilityPoint. “MediaProfile”–referstoaMediaProfiledefinedinAnnexB. “DeliveryTarget”–referstoaDeliveryTargetdefinedinAnnexC. “MandatoryVideoCodecs”–defineswhichvideocodecs,withinthelistedMediaProfile,are

mandatedbytheInteroperabilityPoint.ContentthatcomplieswiththeInteroperabilityPointwillhaveatleastonevideotrackavailablewhichisencodedwithamandatoryvideocodec.

“MandatoryAudioCodecs”–defineswhichaudiocodecswithinthelistedMediaProfilearemandatedbytheInteroperabilityPoint.ContentthatcomplieswiththeInteroperabilityPointwillhaveatleastoneaudiotrackavailablewhichisencodedwithamandatoryaudiocodec.

TableE‐2–AVCDownloadandPrepackagedInteroperabilityPointsInteroperabilityPoint Media

ProfileDeliveryTarget MandatoryVideoCodecs MandatoryAudioCodecs

SD‐MDL SD Multi‐TrackDownload AVC MPEG‐4AAC2‐Channel

CommonFileFormat&MediaFormatsSpecificationVersion2.1

©2009‐2015DigitalEntertainmentContentEcosystem(DECE)LLC P a g e |173

HD‐MDL HD Multi‐TrackDownload AVC MPEG‐4AAC2‐ChannelSD‐AVC‐SDL SD Single‐TrackDownload AVC MPEG‐4AAC2‐ChannelHD‐AVC‐SDL HD Single‐TrackDownload AVC MPEG‐4AAC2‐ChannelSD‐AVC‐PP SD Pre‐Packaged AVC MPEG‐4AAC2‐ChannelHD‐AVC‐PP HD Pre‐Packaged AVC MPEG‐4AAC2‐Channel

TableE‐3–AVCStreamingInteroperabilityPointsInteroperabilityPoint Media

ProfileDeliveryTarget MandatoryVideoCodecs MandatoryAudioCodecs

SD‐AVC‐STR SD Streaming AVC MPEG‐4AAC2‐ChannelHD‐AVC‐STR HD Streaming AVC MPEG‐4AAC2‐Channel

TableE‐4–HEVCDownloadandPrepackagedInteroperabilityPointsInteroperabilityPoint Media

ProfileDeliveryTarget MandatoryVideoCodecs MandatoryAudioCodecs

SD‐HEVC‐SDL SD Single‐TrackDownload AVCorHEVC MPEG‐4AAC2‐ChannelHD‐HEVC‐SDL HD Single‐TrackDownload AVCorHEVC MPEG‐4AAC2‐ChannelSD‐HEVC‐PP SD Pre‐Packaged AVCorHEVC MPEG‐4AAC2‐ChannelHD‐HEVC‐PP HD Pre‐Packaged AVCorHEVC MPEG‐4AAC2‐Channel

TableE‐5–HEVCStreamingInteroperabilityPointsInteroperabilityPoint Media

ProfileDeliveryTarget MandatoryVideoCodecs MandatoryAudioCodecs

SD‐HEVC‐STR SD Streaming AVCorHEVC MPEG‐4AAC2‐ChannelHD‐HEVC‐STR HD Streaming AVCorHEVC MPEG‐4AAC2‐Channel

Note:thePD,xHD,UHD,HDR10,DVandHDR12MediaProfilesarenotcurrentlysupportedbytheDECEEcosystemintheformofPhysicalAssets.

### END ### 

Recommended