mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 16:06:49 +00:00
[postprocessor/ffmpeg] Fix finding ffprobe (bug in 21792b8
)
Fixes 21792b88b7 (commitcomment-140705274)
, thx: vonProteus
This commit is contained in:
parent
4ea59c6107
commit
e0727e4ab6
@ -74,8 +74,11 @@ class FFmpegPostProcessor(PostProcessor):
|
|||||||
return FFmpegPostProcessor(downloader)._versions
|
return FFmpegPostProcessor(downloader)._versions
|
||||||
|
|
||||||
def _determine_executables(self):
|
def _determine_executables(self):
|
||||||
programs = ['avprobe', 'avconv', 'ffmpeg', 'ffprobe']
|
# ordered to match prefer_ffmpeg!
|
||||||
|
convs = ['ffmpeg', 'avconv']
|
||||||
|
probes = ['ffprobe', 'avprobe']
|
||||||
prefer_ffmpeg = True
|
prefer_ffmpeg = True
|
||||||
|
programs = convs + probes
|
||||||
|
|
||||||
def get_ffmpeg_version(path):
|
def get_ffmpeg_version(path):
|
||||||
ver = get_exe_version(path, args=['-version'])
|
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)
|
(p, get_ffmpeg_version(self._paths[p])) for p in programs)
|
||||||
if x[1] is not None)
|
if x[1] is not None)
|
||||||
|
|
||||||
for p in ('ffmpeg', 'avconv')[::-1 if prefer_ffmpeg is False else 1]:
|
basenames = [None, None]
|
||||||
if self._versions.get(p):
|
for i, progs in enumerate((convs, probes)):
|
||||||
self.basename = self.probe_basename = p
|
for p in progs[::-1 if prefer_ffmpeg is False else 1]:
|
||||||
break
|
if self._versions.get(p):
|
||||||
|
basenames[i] = p
|
||||||
|
break
|
||||||
|
self.basename, self.probe_basename = basenames
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self):
|
def available(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user