aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2016-04-14 18:48:00 +0100
committerremitamine <remitamine@gmail.com>2016-04-14 18:49:02 +0100
commitce599d5a7edf2161d0881ccd263131d51c656093 (patch)
tree2aa89eda4b5bc03e8e150af7d3bcdda47c0c2268 /youtube_dl/downloader
parent9e285387260a019d7471c3bdbd52cc764c0e8700 (diff)
[downloader/external] enable piping for FFmpegFD(closes #2124)
Diffstat (limited to 'youtube_dl/downloader')
-rw-r--r--youtube_dl/downloader/external.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py
index 30277dc20..cda39fe97 100644
--- a/youtube_dl/downloader/external.py
+++ b/youtube_dl/downloader/external.py
@@ -225,7 +225,7 @@ class FFmpegFD(ExternalFD):
args += ['-i', url, '-c', 'copy']
if protocol == 'm3u8':
- if self.params.get('hls_use_mpegts', False):
+ if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
args += ['-f', 'mpegts']
else:
args += ['-f', 'mp4', '-bsf:a', 'aac_adtstoasc']
@@ -235,7 +235,10 @@ class FFmpegFD(ExternalFD):
args += ['-f', EXT_TO_OUT_FORMATS.get(info_dict['ext'], info_dict['ext'])]
args = [encodeArgument(opt) for opt in args]
- args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
+ if tmpfilename == '-':
+ args.append('pipe:1')
+ else:
+ args.append(encodeFilename(ffpp._ffmpeg_filename_argument(tmpfilename), True))
self._debug_cmd(args)