1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-07-09 23:33:50 -05:00

[fd/external] Fix ffmpeg input from stdin (#7655)

Bugfix for 1ceb657bdd

Authored by: bashonly
This commit is contained in:
bashonly
2023-07-21 21:32:49 -05:00
committed by GitHub
parent 9b16762f48
commit e57eb98222
2 changed files with 8 additions and 2 deletions

View File

@ -129,6 +129,11 @@ class TestFFmpegFD(unittest.TestCase):
'ffmpeg', '-y', '-hide_banner', '-cookies', 'test=ytdlp; path=/; domain=.example.com;\r\n',
'-i', 'http://www.example.com/', '-c', 'copy', '-f', 'mp4', 'file:test'])
# Test with non-url input (ffmpeg reads from stdin '-' for websockets)
downloader._call_downloader('test', {'url': 'x', 'ext': 'mp4'})
self.assertEqual(self._args, [
'ffmpeg', '-y', '-hide_banner', '-i', 'x', '-c', 'copy', '-f', 'mp4', 'file:test'])
if __name__ == '__main__':
unittest.main()