diff --git a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/output.mpd b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/output.mpd index ff9e4854aa..b81c94aa08 100644 --- a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/output.mpd +++ b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/output.mpd @@ -9,8 +9,8 @@ sparks_dovi_5-video.mp4 - - + + diff --git a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/sparks_dovi_5-video.mp4 b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/sparks_dovi_5-video.mp4 index e9cec02667..2ffeb27d45 100644 Binary files a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/sparks_dovi_5-video.mp4 and b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/sparks_dovi_5-video.mp4 differ diff --git a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/stream_0.m3u8 b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/stream_0.m3u8 index bb712552eb..7cf213c127 100644 --- a/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/stream_0.m3u8 +++ b/packager/app/test/testdata/dolby-vision-profile-5-with-encryption/stream_0.m3u8 @@ -3,10 +3,10 @@ ## Generated with https://github.com/shaka-project/shaka-packager version -- #EXT-X-TARGETDURATION:3 #EXT-X-PLAYLIST-TYPE:VOD -#EXT-X-MAP:URI="sparks_dovi_5-video.mp4",BYTERANGE="1366@0" +#EXT-X-MAP:URI="sparks_dovi_5-video.mp4",BYTERANGE="1370@0" #EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",KEYFORMAT="identity" #EXTINF:2.002, -#EXT-X-BYTERANGE:185521@1446 +#EXT-X-BYTERANGE:185521@1450 sparks_dovi_5-video.mp4 #EXTINF:2.002, #EXT-X-BYTERANGE:197565 diff --git a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/output.mpd b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/output.mpd index 9f3adeabd8..0950e11dcd 100644 --- a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/output.mpd +++ b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/output.mpd @@ -9,8 +9,8 @@ sparks_dovi_8-video.mp4 - - + + @@ -21,8 +21,8 @@ sparks_dovi_8-video.mp4 - - + + diff --git a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/sparks_dovi_8-video.mp4 b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/sparks_dovi_8-video.mp4 index f1cf2372be..aaec54a4a8 100644 Binary files a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/sparks_dovi_8-video.mp4 and b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/sparks_dovi_8-video.mp4 differ diff --git a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/stream_0.m3u8 b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/stream_0.m3u8 index 7adec71977..14e6dc18cd 100644 --- a/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/stream_0.m3u8 +++ b/packager/app/test/testdata/dolby-vision-profile-8-with-encryption/stream_0.m3u8 @@ -3,10 +3,10 @@ ## Generated with https://github.com/shaka-project/shaka-packager version -- #EXT-X-TARGETDURATION:3 #EXT-X-PLAYLIST-TYPE:VOD -#EXT-X-MAP:URI="sparks_dovi_8-video.mp4",BYTERANGE="1366@0" +#EXT-X-MAP:URI="sparks_dovi_8-video.mp4",BYTERANGE="1370@0" #EXT-X-KEY:METHOD=SAMPLE-AES-CTR,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",KEYFORMAT="identity" #EXTINF:2.002, -#EXT-X-BYTERANGE:172013@1446 +#EXT-X-BYTERANGE:172013@1450 sparks_dovi_8-video.mp4 #EXTINF:2.002, #EXT-X-BYTERANGE:189474 diff --git a/packager/media/base/fourccs.h b/packager/media/base/fourccs.h index 594b359197..bfd8381925 100644 --- a/packager/media/base/fourccs.h +++ b/packager/media/base/fourccs.h @@ -45,6 +45,7 @@ enum FourCC : uint32_t { FOURCC_dac3 = 0x64616333, FOURCC_dac4 = 0x64616334, FOURCC_dash = 0x64617368, + FOURCC_dby1 = 0x64627931, FOURCC_ddts = 0x64647473, FOURCC_dec3 = 0x64656333, FOURCC_dfLa = 0x64664c61, diff --git a/packager/media/formats/mp4/mp4_muxer.cc b/packager/media/formats/mp4/mp4_muxer.cc index c8f28610e6..8dfd2fedbf 100644 --- a/packager/media/formats/mp4/mp4_muxer.cc +++ b/packager/media/formats/mp4/mp4_muxer.cc @@ -227,6 +227,10 @@ Status MP4Muxer::DelayInitializeMuxer() { ->h26x_stream_format()); if (codec_fourcc != FOURCC_NULL) ftyp->compatible_brands.push_back(codec_fourcc); + + // https://professional.dolby.com/siteassets/content-creation/dolby-vision-for-content-creators/dolby_vision_bitstreams_within_the_iso_base_media_file_format_dec2017.pdf + if (streams()[0].get()->codec_string().find("dvh") != std::string::npos) + ftyp->compatible_brands.push_back(FOURCC_dby1); } // CMAF allows only one track/stream per file.