diff options
author | Rogério Brito <rbrito@ime.usp.br> | 2017-03-08 22:53:10 -0300 |
---|---|---|
committer | Rogério Brito <rbrito@ime.usp.br> | 2017-03-08 22:53:10 -0300 |
commit | 2b4515201a54c38e34434ea2817d606be134a7c9 (patch) | |
tree | e7dcb445c80be55c497615529800ff74bb950c63 /youtube_dl/downloader/external.py | |
parent | 3cd33af594d34a8809318ebd0be4d606d212a7a0 (diff) | |
parent | 1d3fd83f473663fce3e0a10303473a38d80cc3d0 (diff) | |
download | youtube-dl-2b4515201a54c38e34434ea2817d606be134a7c9.zip youtube-dl-2b4515201a54c38e34434ea2817d606be134a7c9.tar.gz youtube-dl-2b4515201a54c38e34434ea2817d606be134a7c9.tar.bz2 |
Merge tag 'upstream/2017.03.07'
Upstream version 2017.03.07
Diffstat (limited to 'youtube_dl/downloader/external.py')
-rw-r--r-- | youtube_dl/downloader/external.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index bdd3545..e13cf54 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'] |