X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fdownloader%2Fhls.py;h=ad26cfa4085bbb028c7252aa9db2a8de3f7bd1e4;hb=cc8c9281e6313c8b108f20df0ea633445c78bf2d;hp=0c33d39eeca3ba35627b48f2c89c486c2dd1e7ce;hpb=784b6d3a9bc79fe55a8b132fd10555c1e9a61c31;p=youtube-dl diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py index 0c33d39ee..ad26cfa40 100644 --- a/youtube_dl/downloader/hls.py +++ b/youtube_dl/downloader/hls.py @@ -4,6 +4,7 @@ import os import re import subprocess +from ..postprocessor.ffmpeg import FFmpegPostProcessor from .common import FileDownloader from ..utils import ( compat_urlparse, @@ -28,14 +29,17 @@ class HlsFD(FileDownloader): if check_executable(program, ['-version']): break else: - self.report_error(u'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 cmd = [program] + args + ffpp = FFmpegPostProcessor(downloader=self) + ffpp.check_version() + retval = subprocess.call(cmd) if retval == 0: fsize = os.path.getsize(encodeFilename(tmpfilename)) - self.to_screen(u'\r[%s] %s bytes' % (cmd[0], fsize)) + self.to_screen('\r[%s] %s bytes' % (cmd[0], fsize)) self.try_rename(tmpfilename, filename) self._hook_progress({ 'downloaded_bytes': fsize, @@ -45,8 +49,8 @@ class HlsFD(FileDownloader): }) return True else: - self.to_stderr(u"\n") - self.report_error(u'%s exited with code %d' % (program, retval)) + self.to_stderr('\n') + self.report_error('%s exited with code %d' % (program, retval)) return False