1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-02 20:42:51 +08:00

ffmpeg should respect --max-filesize too

This commit is contained in:
Amish 2018-07-27 15:34:26 +05:30
parent 0c7b4f49eb
commit 690c881be5

View File

@ -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 == '-':