diff options
author | John Hawkinson <[email protected]> | 2017-03-04 22:19:44 -0500 |
---|---|---|
committer | Sergey M <[email protected]> | 2017-03-05 11:19:44 +0800 |
commit | 6d0fe752bfeaa9a758099315f006bc15acd1ae76 (patch) | |
tree | 982a6af1e5bca390e0a0a4609d312e4b0461f930 /youtube_dl | |
parent | afa4597618462df01b47febcd64c531f8ffdd63a (diff) | |
download | youtube-dl-6d0fe752bfeaa9a758099315f006bc15acd1ae76.tar.gz youtube-dl-6d0fe752bfeaa9a758099315f006bc15acd1ae76.zip |
[external:ffmpeg] In test harness, limit to 10k download size
Otherwise, if you screw up a playlist test by including a playlist
dictionary key, you'll be there for eons while it downloads all the
files before erroring out.
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/downloader/external.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index bdd3545a2..127a92d20 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -270,6 +270,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)] # -fs limit_size (output), expressed in bytes + if protocol in ('m3u8', 'm3u8_native'): if self.params.get('hls_use_mpegts', False) or tmpfilename == '-': args += ['-f', 'mpegts'] |