1
0
mirror of https://github.com/l1ving/youtube-dl synced 2026-05-27 12:59:48 +08:00

For MP4 format and stdout, use -movflags option.

This commit is contained in:
Anand Tamariya
2018-12-24 16:37:38 +05:30
Unverified
parent a79580dc9a
commit f0cbbcf089
+3 -1
View File
@@ -300,10 +300,12 @@ class FFmpegFD(ExternalFD):
args += ['-fs', compat_str(self._TEST_FILE_SIZE)]
if protocol in ('m3u8', 'm3u8_native'):
if self.params.get('hls_use_mpegts', False) or tmpfilename == '-':
if self.params.get('hls_use_mpegts', False):
args += ['-f', 'mpegts']
else:
args += ['-f', 'mp4']
if tmpfilename == '-':
args += ["-movflags", "frag_keyframe+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':