fix(drm): read the init segment tenc KID when FFprobe is not installed

This commit is contained in:
imSp4rky
2026-11-29 12:07:31 -07:00
parent 975d3a106d
commit adb3b84388
2 changed files with 13 additions and 2 deletions
+5 -2
View File
@@ -78,9 +78,12 @@ def init_kid(init_data: bytes) -> UUID | None:
A pssh box is no source, because it can name the KIDs of other renditions too. The PIFF box is read by
offset, and only when its AlgorithmID is not 0 (clear): pymp4 parses it but cannot build it again, so
``get_boxes`` raises on it.
``get_boxes`` raises on it. Without FFprobe it starts at the tenc KID.
"""
probe = ffprobe(init_data)
try:
probe = ffprobe(init_data)
except OSError:
probe = {}
for stream in (probe or {}).get("streams") or []:
enc_key_id = stream.get("tags", {}).get("enc_key_id")
if enc_key_id: