mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-23 01:08:10 +00:00
[downloader/hls] Respect the 'prefer_ffmpeg' option
This commit is contained in:
parent
26886e6140
commit
63948fc62c
1 changed files with 4 additions and 8 deletions
|
@ -11,7 +11,6 @@ from ..compat import (
|
||||||
compat_urllib_request,
|
compat_urllib_request,
|
||||||
)
|
)
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
check_executable,
|
|
||||||
encodeFilename,
|
encodeFilename,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -27,16 +26,13 @@ class HlsFD(FileDownloader):
|
||||||
'-bsf:a', 'aac_adtstoasc',
|
'-bsf:a', 'aac_adtstoasc',
|
||||||
encodeFilename(tmpfilename, for_subprocess=True)]
|
encodeFilename(tmpfilename, for_subprocess=True)]
|
||||||
|
|
||||||
for program in ['avconv', 'ffmpeg']:
|
ffpp = FFmpegPostProcessor(downloader=self)
|
||||||
if check_executable(program, ['-version']):
|
program = ffpp._executable
|
||||||
break
|
if program is None:
|
||||||
else:
|
|
||||||
self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
|
self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
|
||||||
return False
|
return False
|
||||||
cmd = [program] + args
|
|
||||||
|
|
||||||
ffpp = FFmpegPostProcessor(downloader=self)
|
|
||||||
ffpp.check_version()
|
ffpp.check_version()
|
||||||
|
cmd = [program] + args
|
||||||
|
|
||||||
retval = subprocess.call(cmd)
|
retval = subprocess.call(cmd)
|
||||||
if retval == 0:
|
if retval == 0:
|
||||||
|
|
Loading…
Reference in a new issue