-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avformat: validate dovi config in muxers #484
Conversation
2b84bea
to
8e5841c
Compare
Is it really necessary to check |
The intention for this is to not creating tv range profile 5 videos and the muxer will not affect ffprobe. The only problem is that this would prevent those buggy profile 5 videos being remuxed. Maybe we need to remove this check for Profile 5 videos as DoVi players tends to ignore what the container says. |
That's my concern. I haven't tested it yet, but the existing Profile 5 videos that are incorrectly tagged as TV range may not be streamed correctly over fMP4. |
I suggest putting these validations in the public area like my draft dovi-validation.patch |
movenc is slightly different as the code tag is in its own track instead of the par, so the interface needs to be modified slightly. |
+int ff_isom_validate_dovi_config(const AVDOVIDecoderConfigurationRecord *dovi,
+ AVCodecParameters *codec_par, int codec_tag); I saw that. We can use a separate parameter to handle |
ct-ng tools failed again... |
It seems that there is no way to pin the version number in |
debian/patches/0031-pass-dovi-sidedata-to-hlsenc-and-mpegtsenc.patch
Outdated
Show resolved
Hide resolved
debian/patches/0031-pass-dovi-sidedata-to-hlsenc-and-mpegtsenc.patch
Outdated
Show resolved
Hide resolved
f1db037
to
e4152b2
Compare
It is not the toolchain. It is the |
This isn't the first time some of Rust's downstream dependencies broke the build. We can wait a few hours and usually they will release a hotfix. |
I checked that and the version is already pinned in cargo.lock for cargo-c and its dependencies to not use the buggy version so adding |
FFmpeg tends to copy any available side packets from the input streams into the muxed output without considering their validity. This behavior is problematic for Dolby Vision configuration records, as invalid records might crash the player. I haven't found a better place to perform such validations with the current Dolby Vision handling process, so I had to place the validation code into each muxers.
This PR checks whether the Dolby Vision record is valid, meaning it is spec-compliant, so the player will likely handle it without issues in
movenc
,mpegtsenc
, andmatroskaenc
. It first verifies if the codec matches the profile, then checks if the base layer (BL) is encoded as required by the compatibility ID. If the compatibility ID is 0, it also checks if the codec tag is explicitly set to the dovi fourcc, as these videos will not have backward compatibility.The check in
mpegtsenc
is slightly stripped down as we are only passing HEVC with BL compat in that muxer.Changes
Issues
Fixes #483