1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-16 05:27:16 +08:00

Add -movflags empty_moov when downloading an MP4 file by FFmpegFD

With this flag, partial MP4 downloads become playable.
This commit is contained in:
felix 2016-06-26 13:01:52 +02:00
parent 8cb10807ed
commit 19f4c8ec4c

View File

@ -313,7 +313,7 @@ class FFmpegFD(ExternalFD):
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
args += ['-f', 'mpegts']
else:
args += ['-f', 'mp4']
args += ['-f', 'mp4', '-movflags', 'empty_moov']
if (ffpp.basename == 'ffmpeg' and is_outdated_version(ffpp._versions['ffmpeg'], '3.2', False)) and (not info_dict.get('acodec') or info_dict['acodec'].split('.')[0] in ('aac', 'mp4a')):
args += ['-bsf:a', 'aac_adtstoasc']
elif protocol == 'rtmp':