diff options
author | dirkf <fieldhouse@gmx.net> | 2024-04-07 15:26:12 +0100 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2024-04-07 15:33:30 +0100 |
commit | e0727e4ab61b6e45f7792546b8b5ff52a0ea22b5 (patch) | |
tree | 87d313d794f63b882e96aae7463c008481c39876 /youtube_dl | |
parent | 4ea59c6107d63bbabe1de74569ceb984b1646426 (diff) |
[postprocessor/ffmpeg] Fix finding ffprobe (bug in 21792b8)
Fixes https://github.com/ytdl-org/youtube-dl/commit/21792b88b791b16e3ab0a0fb2e26e5bb8a4e2ff3#commitcomment-140705274, thx: vonProteus
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/postprocessor/ffmpeg.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index e5ffdf378..214825aa9 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -74,8 +74,11 @@ class FFmpegPostProcessor(PostProcessor): return FFmpegPostProcessor(downloader)._versions def _determine_executables(self): - programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe'] + # ordered to match prefer_ffmpeg! + convs = ['ffmpeg', 'avconv'] + probes = ['ffprobe', 'avprobe'] prefer_ffmpeg = True + programs = convs + probes def get_ffmpeg_version(path): ver = get_exe_version(path, args=['-version']) @@ -127,10 +130,13 @@ class FFmpegPostProcessor(PostProcessor): (p, get_ffmpeg_version(self._paths[p])) for p in programs) if x[1] is not None) - for p in ('ffmpeg', 'avconv')[::-1 if prefer_ffmpeg is False else 1]: - if self._versions.get(p): - self.basename = self.probe_basename = p - break + basenames = [None, None] + for i, progs in enumerate((convs, probes)): + for p in progs[::-1 if prefer_ffmpeg is False else 1]: + if self._versions.get(p): + basenames[i] = p + break + self.basename, self.probe_basename = basenames @property def available(self): |