aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/external.py
diff options
context:
space:
mode:
authorRandom User <rndusr@posteo.de>2017-03-25 21:36:59 +0100
committerRandom User <rndusr@posteo.de>2017-03-25 21:36:59 +0100
commit4f06c1c9fcbfbc74b81b5fa89a616914b5ce5aad (patch)
treea51b702e001d350b908780a119f76d8ea706d511 /youtube_dl/downloader/external.py
parentc73e330e7adc9c0c15ac51aeea8fbb7dad95351a (diff)
parent942b44a0525f677924c660bcb00902d705d91fc2 (diff)
Merge branch 'master' of github.com-rndusr:rg3/youtube-dl into fix/str-item-assignment
Diffstat (limited to 'youtube_dl/downloader/external.py')
-rw-r--r--youtube_dl/downloader/external.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py
index bdd3545a2..e13cf547d 100644
--- a/youtube_dl/downloader/external.py
+++ b/youtube_dl/downloader/external.py
@@ -6,7 +6,10 @@ import sys
import re
from .common import FileDownloader
-from ..compat import compat_setenv
+from ..compat import (
+ compat_setenv,
+ compat_str,
+)
from ..postprocessor.ffmpeg import FFmpegPostProcessor, EXT_TO_OUT_FORMATS
from ..utils import (
cli_option,
@@ -270,6 +273,10 @@ class FFmpegFD(ExternalFD):
args += ['-rtmp_live', 'live']
args += ['-i', url, '-c', 'copy']
+
+ if self.params.get('test', False):
+ args += ['-fs', compat_str(self._TEST_FILE_SIZE)]
+
if protocol in ('m3u8', 'm3u8_native'):
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
args += ['-f', 'mpegts']