From 19f4c8ec4c4dd922a05b861d752af0146f4fcefc Mon Sep 17 00:00:00 2001 From: felix Date: Sun, 26 Jun 2016 13:01:52 +0200 Subject: [PATCH] Add -movflags empty_moov when downloading an MP4 file by FFmpegFD With this flag, partial MP4 downloads become playable. --- youtube_dl/downloader/external.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/downloader/external.py b/youtube_dl/downloader/external.py index 5f73f7f0f..9c1226570 100644 --- a/youtube_dl/downloader/external.py +++ b/youtube_dl/downloader/external.py @@ -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':