From 690c881be5dc8759e5965db7b92ae89028de7e87 Mon Sep 17 00:00:00 2001 From: Amish Date: Fri, 27 Jul 2018 15:34:26 +0530 Subject: [PATCH] ffmpeg should respect --max-filesize too --- youtube_dl/downloader/external.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 958d00aac..22d2c324b 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -296,8 +296,11 @@ class FFmpegFD(ExternalFD): args += ['-i', url, '-c', 'copy'] + max_filesize = self.params.get('max_filesize') if self.params.get('test', False): args += ['-fs', compat_str(self._TEST_FILE_SIZE)] + elif max_filesize is not None: + args += ['-fs', compat_str(max_filesize)] if protocol in ('m3u8', 'm3u8_native'): if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':