[downloader] Allow streaming unmerged formats to stdout using ffmpeg

For this to work:
1. The downloader must be ffmpeg
2. The selected formats must have the same protocol
3. The formats must be downloadable by ffmpeg to stdout

Partial solution for: https://github.com/ytdl-org/youtube-dl/issues/28146, https://github.com/ytdl-org/youtube-dl/issues/27265
This commit is contained in:
pukkandan
2021-08-01 12:38:06 +05:30
parent dbf5416a20
commit 96fccc101f
5 changed files with 36 additions and 15 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ class HlsFD(FragmentFD):
if is_webvtt:
real_downloader = None # Packing the fragments is not currently supported for external downloader
else:
real_downloader = get_suitable_downloader(info_dict, self.params, None, protocol='m3u8_frag_urls')
real_downloader = get_suitable_downloader(
info_dict, self.params, None, protocol='m3u8_frag_urls', to_stdout=(filename== '-'))
if real_downloader and not real_downloader.supports_manifest(s):
real_downloader = None
if real_downloader: