Support Dolby Vision profile 8.1, 8.2, 8.4, 10.1, 10.4 signaling in HLS
and DASH.
Adds new option `--use_dovi_supplemental_codecs` (off by default) to use
SUPPLEMENTAL-CODECS in HLS and `scte214:supplementalCodecs` and
`scte214:supplementalProfiles` for DASH.
To maintain compatibility with existing players the current behavior of
using two entries in the manifest remains the default. This will be
changed in a future version where `use_dovi_supplemental_codecs` will
become on by default.
Adds Dolby Vision compatible brands, 'db1p', 'db2g', 'db4g', 'db4h',
'dby1' based on https://mp4ra.org/#/brands
---------
Co-authored-by: Xingzhao Yun <xyun@dolby.com>
After change to add forced command line ordering adaptation set IDs in
places were referenced by their sort index (the minimum representation
index they contained).
Instead always refer to adaptation sets by their own ID, and use the
index only as an optional sort key.
Fixes#1393
feat: Added audio specific configuration udts box to AudioSampleEntry
for MP4 input/output. DASH tags for DTS audio as specified in ETSI TS
103 491 and ETSI TS 102 114.
Closes#1301
---------
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Part of https://github.com/shaka-project/shaka-packager/issues/369
This adds read support for some MPEG-TS PMT elementary stream
descriptors:
- ISO639 Language Descriptor providing language code and audio type
- Maximum Bitrate Descriptor providing peak stream bandwidth
Those metadata are propagated to StreamInfo structures:
- StreamInfo.language field
- AudioStreamMetadata.max_bitrate field for audio streams
- audio type is currently not propagated - corresponding field has to be
added to AudioStreamMetadata
Test vector file containing those descriptors is provided.
This work was done over ~80 individual commits in the `cmake` branch,
which are now being merged back into `main`. As a roll-up commit, it is
too big to be reviewable, but each change was reviewed individually in
context of the `cmake` branch. After this, the `cmake` branch will be
renamed `cmake-porting-history` and preserved.
---------
Co-authored-by: Geoff Jukes <geoffjukes@users.noreply.github.com>
Co-authored-by: Bartek Zdanowski <bartek.zdanowski@gmail.com>
Co-authored-by: Carlos Bentzen <cadubentzen@gmail.com>
Co-authored-by: Dennis E. Mungai <2356871+Brainiarc7@users.noreply.github.com>
Co-authored-by: Cosmin Stejerean <cstejerean@gmail.com>
Co-authored-by: Carlos Bentzen <carlos.bentzen@bitmovin.com>
Co-authored-by: Cosmin Stejerean <cstejerean@meta.com>
Co-authored-by: Cosmin Stejerean <cosmin@offbytwo.com>
Added Dolby Vision backward compatible signalling, i.e. for Dolby Vision
profile 8, both base codec without Dolby Vision and HDR codec with Dolby
Vision are signalled.
This is achieved by using a new MuxerListener implementation
MultiCodecMuxerListener, which wraps multiple child MuxerListeners and
is able to delegate to the child MuxerListeners based on the codecs in
the stream.
Closes#341.
Change-Id: I1967bb1ed503087cdd011c364e5fb5647d516ca4
- Parse and extract transfer_characteristics from H264/H265 VUI
parameters.
- Set VIDEO-RANGE attribute in HLS according to HLS specification:
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-02#section-4.4.4.2
- Also added an end to end test.
Fixes#632.
Change-Id: Iadf557d967b42ade321fb0b152e8e7b64fe9ff3e
- Add relevant FOURCCs for Dolby Vision.
- Parse DOVIDecoderConfigurationRecord (dvcC, dvvC) to generate
Dolby Vision codec string.
- Propagate Dolby Vision configs (dvcC, dvvC, hvcE) from Demuxer
to Muxer.
- Add a Dolby Vision end to end test.
Support for backward compatibility signaling in DASH and HLS will be
added in a later CL.
Issue #341
Change-Id: If1385df5f48e04b59cb7661130bea48e26b453bf
Implemented according to bitstream spec at
https://aomediacodec.github.io/av1-spec/.
It will be used to do AV1 subsample encryption later.
Issue #453.
Change-Id: I84d8a2a780d95f2c9f430ee598838b97474cc0af
Note that TTML in ISO-BMFF is not supported yet.
Also updated packager_test.py:
- Added a test using TTML passthrough.
- Computed output extension from input extension unless output_format
is specified.
Fixes#478.
Change-Id: Ia917fc4ed3c326782791ed67601fba02ea28b11d
Implemented per AV1 Codec ISO Media File Format Binding at
https://aomediacodec.github.io/av1-isobmff/
And AOM AV1 codec mapping in Matroska/WebM at
https://github.com/Matroska-Org/matroska-specification/blob/av1-mappin/codec/av1.md
Note that AV1 specific boxes are not supported in this CL, i.e.
AV1 Forward Key Frame sample group entry 'av1f', AV1 Multi-Frame
sample group entry 'av1m' etc are not supported. These boxes are optional.
We will add support later if they are useful to the clients / players.
Encryption is not supported yet.
Issue #453.
Change-Id: I630432d0a9bf82d263ffaf40e57f67fc65eee902
Note that STYLE and REGION are not supported in mp4 container due to
spec limitation as 14496-30:2014 does not specify a way to signal
styles/regions inside mp4.
Closes#344.
Change-Id: I05c14df916f7b2c7ca4364ee9407e0eda4dc7a3f
In some ISO-BMFF files, there is an initial non-zero composition offset,
but there is no EditList present.
This is against ISO-BMFF spec recommentation [1] and we believe in most
cases it is just missing the EditList.
[1] 14496-12:2015 8.6.6.1
It is recommended that such an edit be used to establish a presentation
time of 0 for the first presented sample, when composition offsets are
used.
Issue: #112.
Fixes: b/110782437.
Change-Id: I23d33810ce536b09a1e22a2644828d824c1314f5
Created end-to-end tests for the segmented webvtt text in HLS. The
text stream is longer than both audio and video, so there are more
text segments than video/audio.
Change-Id: Ib860ccd3f2ac0048983fdeebe3847a0b9dcbc160
The old vtt sample data has the header as "WEBVTT FILE" which does
not reflect what the spec says it should be.
This changes it to "WEBVTT" as described in the WebVTT spec.
Change-Id: Ib54396a8b937501a835dafe966bf05b95b0b22c4
The IV was incorrectly updated across samples.
Created a new cryptor SampleAesEc3Cryptor specially for SAMPLE-AES
EC3 encryption / decryption. The new cryptor uses constant-iv, and
makes sure the IV is reset to the initial value at the beginning
of each audio frame and chained across syncframes within the the
audio frame.
Also added E-AC3 end to end test.
Fixes#279
Change-Id: I0aa60c17836daeef5ba433a05e5ff0906191d9ac
The spec allows having more than one 'mdat' boxes even if it is not
used.
This is happening on some mp4 files in the wild:
http://www.sample-videos.com/.
Fixes#298.
Change-Id: I729cc94bee095560b5c4b3ee8511323f25f7ad5a
Also added a few more command line flags for end to end test:
- no-remove_temp_files_after_test: do not remove test artifacts after
test
- encryption_key, encryption_iv: allow injecting encryption key/iv from
command line
Change-Id: I62084790e10fe6a385b90cb96d9515d8436b2a49
Added a flag --strip_parameter_set_nalus. When enabled, parameter
set NAL units, SPS/PPS for H264 and SPS/PPS/VPS for H265, are stripped
from frames when converting NAL byte stream (AnnexB stream) to NAL
unit stream, which generates avc1/hvc1; otherwise they are not
stripped, and avc3/hev1 is generated.
Parameter set NAL units should not be stripped if they are varying
in the frames otherwise the frames may fail to be decoded.
The flag is enabled by default as we don't usually see varying
SPS/PPS/VPS and it is more space efficient with them stripped.
Set --strip_parameter_set_nalus=false to disable the flag if there
are varying SPS/PPS/VPS in the frames. This addresses #206.
Change-Id: I34bde6f33069f9f77d51a510b39f58a0f0e141aa
- Also regenerated test content to insert an iframe every one
second: ffmpeg -i source.webm -auto-alt-ref 1 -g 30 out.webm
This makes sure the content is actually encrypted with one
second clear lead in end to end test.
Change-Id: I488143c148e2d6c45ba1586f6d0d835dc46db86e
The right way to detect the presence of a keyframe in a BlockGroup
is to look for the absence of the ReferenceBlock element [1].
Closes b/30433206
[1] https://matroska.org/technical/specs/index.html#ReferenceBlock
Change-Id: I2b3c8704cbabcd5cbee38448e5528425865561a4
This is needed to test encryption in end to end test since the video
is segmented in gop boundary by default. Due to the existence of clear
lead, the first segment is always left in clear.
Change-Id: Ie8d37a1740f9061515298cb9fb7b58983592cc5b
- Width/Height in tkhd box should be display resolution instead of
coded resolution.
- pasp was not generated earlier.
- Assuming SAR as 1:1 if it failed to be extracted successfully.
- Also update test files for mp4_media_parser_unittest.
This fixes Issue #35.
Change-Id: Iedbe6a44465aac6723b6ea2de30aed180821eccd
- Added logic to container parsers to extract pixel width and height.
- If the container doesn't contain the pixel width and height of the
stream and the stream is H264, this parses the SPS to get the
sar_width and sar_height.
- If extracted sar_width and sar_height are 0s then they imply 1s.
- Add hb2_v_frag.mp4 for test media. This does not have a
'pasp' box and has sar_width = 8 sar_height = 9.
Change-Id: I4a06ce95582547bec19adb7905e7612c5a1f359e