feat(manifests): add dts-hd, mpeg-h and lcevc codecs and a manifest corpus

Fix DASH SegmentTimeline negative @r and Pattern, TTML sidecar sets with no contentType, HLS CHANNELS identifiers and Dolby channel masks; test against 408 public DASH/HLS/ISM manifests.
This commit is contained in:
imSp4rky
2026-10-26 10:30:43 -06:00
parent a7f77dea42
commit ffeb58f808
431 changed files with 44396 additions and 41 deletions
+9 -5
View File
@@ -210,12 +210,16 @@ def strip_duplicate_init_boxes(src: Path, dst: Path) -> int:
return dropped
def has_dts_uhd_sample_entry(path: Path) -> bool:
"""True if the MP4 holds a DTS-UHD (DTS:X Profile 2) audio sample entry.
MPEGH_SAMPLE_ENTRIES = ("mha1", "mha2", "mhm1", "mhm2")
def has_mp4_only_audio_entry(path: Path) -> bool:
"""True if the MP4 holds a DTS-UHD (DTS:X Profile 2) or MPEG-H audio sample entry.
Matroska has no CodecID for DTS-UHD, so mkvmerge stores it as an A_QUICKTIME
passthrough and every reader reports the container fallback instead of the codec. A
file this returns True for has to go into MP4 to keep its codec readable.
passthrough and every reader reports the container fallback instead of the codec.
mkvmerge drops an MPEG-H track completely. A file this returns True for has to go
into MP4 to keep its audio.
Only "dtsx"/"dtsy" mean DTS-UHD. DTS:X Profile 1 rides inside DTS-HD Master Audio as
"dtsc"/"dtse"/"dtsh"/"dtsl", which Matroska maps to A_DTS and stores properly, so it
@@ -231,7 +235,7 @@ def has_dts_uhd_sample_entry(path: Path) -> bool:
return False
if not moov:
return False
for tok in (b"dtsx", b"dtsy"):
for tok in (b"dtsx", b"dtsy", *(entry.encode() for entry in MPEGH_SAMPLE_ENTRIES)):
i = moov.find(tok, 4)
while i != -1:
size = int.from_bytes(moov[i - 4 : i], "big")