aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-02-01 23:49:23 +0600
committerSergey M․ <dstftw@gmail.com>2015-02-01 23:49:23 +0600
commit027008b14ebe3d41ac7b9940ab73eaed120dab5c (patch)
treeb70a9abecc29bc10b5f8881435fb50dc916b6159 /youtube_dl
parentc6df692466aebed1b86c02233b579c03f0888704 (diff)
[hls] Fix encode issues on python2 @ Windows
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/downloader/hls.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py
index aa58b52ab..b642786cc 100644
--- a/youtube_dl/downloader/hls.py
+++ b/youtube_dl/downloader/hls.py
@@ -11,6 +11,7 @@ from ..compat import (
compat_urllib_request,
)
from ..utils import (
+ encodeArgument,
encodeFilename,
)
@@ -21,18 +22,17 @@ class HlsFD(FileDownloader):
self.report_destination(filename)
tmpfilename = self.temp_name(filename)
- args = [
- '-y', '-i', url, '-f', 'mp4', '-c', 'copy',
- '-bsf:a', 'aac_adtstoasc',
- encodeFilename(tmpfilename, for_subprocess=True)]
-
ffpp = FFmpegPostProcessor(downloader=self)
program = ffpp._executable
if program is None:
self.report_error('m3u8 download detected but ffmpeg or avconv could not be found. Please install one.')
return False
ffpp.check_version()
- cmd = [program] + args
+
+ args = [encodeArgument(opt) for opt in ('-y', '-i', url, '-f', 'mp4', '-c', 'copy', '-bsf:a', 'aac_adtstoasc')]
+ args.append(encodeFilename(tmpfilename, True))
+
+ cmd = [encodeArgument(program)] + args
retval = subprocess.call(cmd)
if retval == 0: