[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-07-31 16:23:54 +05:30
parent dbf5416a20
commit 96fccc101f
5 changed files with 36 additions and 15 deletions

View File

@@ -22,7 +22,8 @@ class DashSegmentsFD(FragmentFD):
fragments = info_dict['fragments'][:1] if self.params.get(
'test', False) else info_dict['fragments']
real_downloader = get_suitable_downloader(info_dict, self.params, None, protocol='dash_frag_urls')
real_downloader = get_suitable_downloader(
info_dict, self.params, None, protocol='dash_frag_urls', to_stdout=(filename== '-'))
ctx = {
'filename': filename,