A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
As per the AV1 spec, the codec string may contain optional color values. These color values are critical for detecting HDR video streams - see Issue 1007 and Issue 1202. This PR extracts the missing color information from the mp4 colr atom, if present, and generates the full AV1 codec string. Writing the colr information to the muxed mp4 will come in a later PR.
As per the AV1 spec, the codec string may contain optional color values. These color values are critical for detecting HDR video streams - see Issue 1007 and Issue 1202. This PR extracts the missing color information from the mp4
colr
atom, if present, and generates the full AV1 codec string. Writing the colr information to the muxed mp4 will come in a later PR.References:
Testing
Manual: AV1 video WITH colr atom
Note: Presence of the colr atom in
hdr_av1_test.mp4
was verified withmp4dump
./out/Release/packager in=~/Downloads/bbbhdr_av1.mp4,stream=video,output=av1_with_colr.mp4 --mpd_output av1_with_colr.mpd
ffmpeg -i ~/Downloads/bbbhdr_av1.mp4 -c:v copy -an -seg_duration 2 -streaming 1 -utc_timing_url "https://time.akamai.com/?iso" -media_seg_name 'num_$Number%05d$.m4s' -init_seg_name 'num_init.m4s' -use_timeline 0 -f dash av1_with_colr.mpd
codecs="av01.1.01M.10.0.000.09.16.09.0"
:)Manual: AV1 video WITHOUT colr atom
Note: The lack of the colr atom in
av1-BBB.mp4
was verified withmp4dump
./out/Release/packager in=~/Downloads/av1-BBB.mp4,stream=video,output=av1_NO_colr.mp4 --mpd_output av1_NO_colr.mpd
ffmpeg -i ~/Downloads/av1-BBB.mp4 -c:v copy -an -seg_duration 2 -streaming 1 -utc_timing_url "https://time.akamai.com/?iso" -media_seg_name 'num_$Number%05d$.m4s' -init_seg_name 'num_init.m4s' -f dash av1_NO_colr.mp4
codecs="av01.0.08M.08"
:)Unittest
./out/Release/codecs_unittest
./out/Release/mp4_unittest
Format
git clang-format --style Chromium --binary /usr/bin/clang-format 80e024013df87a4bfeb265c8ea83cfa2a0c5db0f