support for dual-layer Dolby Vision with Enhancement Layer in different track
Dual-layer Dolby Vision can come with the enhancement layer in a different track. The official Dolby Vision mappings for MP4 & MPEG transport streams state how such tracks are linked at the container level.
There are two potential ways to handle them:
- Keep the layers separate. This only requires copying both tracks as they are (creating the corresponding track headers, of course). However, it also requires new container-level track header fields for Matroska in order to link the tracks the way they're linked in MP4 & MPEG TS.
- Converting to single-track storage. This doesn't require any modifications on the container level.
I haven't looked into the question whether 2. is even feasible. However, as I understand dual-layer-in-single-track, the UNSPEC63
NALUs are more or less regular HEVC NALUs that are wrapped into UNSPEC63
NALUs with an extra two-byte header in front of them. Therefore it looks feasible to convert them on the fly.
This is long-term issue that probably won't be implement anytime soon.