Support multiple sps/pps/vps in h265 AU#366
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
==========================================
+ Coverage 81.76% 82.19% +0.42%
==========================================
Files 28 28
Lines 3526 3656 +130
==========================================
+ Hits 2883 3005 +122
- Misses 453 457 +4
- Partials 190 194 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
4740371 to
eb5531d
Compare
Ibn-Butt-Toota
left a comment
There was a problem hiding this comment.
Maybe we can create a section in the readme to document spec-breaking implementations or conflicts like this so it can be easier for observers to find? Or maybe if it's feasible we could add an experimental flag...
|
@Ibn-Butt-Toota thank you for the review, this is the spec correct way to cache sps/pps/vps the problem is that it's not clear if multiple sps/pps/vps are used outside of shvc and if it's common :) |
|
Sorry I misread the main comment. Thank you for clarifying. The PR still looks good (I know it's pending tests still). |
59f94a3 to
9f54ad4
Compare
9f54ad4 to
e61bd16
Compare
|
@Sean-Der thank you for the review <3 turned out there were many other edge cases with multiple sps/pps/vps idk why h265 is this complex, hopefully I handled all of them :) |
Description
As discussed in discord, the SkipAggregation behavior isn't correct for H265 because streams can have multiple sps/pps/vps with different ids. while I wasn't able to find any non-svc real media files with this it's correct in the spec and chrome can play even tho chrome doesn't support SHVC http://download.tsi.telecom-paristech.fr/gpac/MPEG/LHEVCFF/Conformance/shvc_hev1_single_track.mp4 it's able to play this file after the fix (tested with hardware decode NVENC).
The problem is that the order in this file is:
chrome picks layer #0 and because we cache the last SPS/PPS the file doesn't play before this fix. I'm not sure if we should merge this as this sounds like a niche with more complexity trade off but it might become more common with svc h265 or other uses and it can save someone a few hours of debug in the future.
This is only a draft because i didn't add tests yet