fix(dash): treat a missing FFprobe as no PSSH instead of crashing

PSSH discovery raised OSError when the binary was absent, so a DRM free download failed on any host without FFprobe.
This commit is contained in:
imSp4rky
2026-09-07 10:06:10 -06:00
parent 7065cbf911
commit 771fd34bd5
+4 -1
View File
@@ -22,6 +22,7 @@ from pywidevine.cdm import Cdm as WidevineCdm
from pywidevine.pssh import PSSH from pywidevine.pssh import PSSH
from requests import Session from requests import Session
from unshackle.core import binaries
from unshackle.core.config import config from unshackle.core.config import config
from unshackle.core.constants import DOWNLOAD_CANCELLED, DOWNLOAD_LICENCE_ONLY, AnyTrack from unshackle.core.constants import DOWNLOAD_CANCELLED, DOWNLOAD_LICENCE_ONLY, AnyTrack
from unshackle.core.drm import DRM_T, ClearKeyCENC, PlayReady, Widevine from unshackle.core.drm import DRM_T, ClearKeyCENC, PlayReady, Widevine
@@ -414,7 +415,9 @@ class DASH:
track.data["dash"]["timescale"] = int(segment_timescale) track.data["dash"]["timescale"] = int(segment_timescale)
track.data["dash"]["segment_durations"] = segment_durations track.data["dash"]["segment_durations"] = segment_durations
if not track.drm and init_data and isinstance(track, (Video, Audio)): if not track.drm and init_data and isinstance(track, (Video, Audio)) and not binaries.FFProbe:
log.warning("FFprobe was not found, so the init segment was not probed for a PSSH.")
elif not track.drm and init_data and isinstance(track, (Video, Audio)):
prefers_playready = track.prefers_playready(cdm) prefers_playready = track.prefers_playready(cdm)
if prefers_playready: if prefers_playready:
try: try: