|
|
|
@ -522,7 +522,7 @@ class TestFormatSelection(unittest.TestCase):
|
|
|
|
|
pass
|
|
|
|
|
self.assertEqual(ydl.downloaded_info_dicts, [])
|
|
|
|
|
|
|
|
|
|
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.available', False)
|
|
|
|
|
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.available', False)
|
|
|
|
|
def test_default_format_spec_without_ffmpeg(self):
|
|
|
|
|
ydl = YDL({})
|
|
|
|
|
self.assertEqual(ydl._default_format_spec({}), 'best/bestvideo+bestaudio')
|
|
|
|
@ -543,8 +543,8 @@ class TestFormatSelection(unittest.TestCase):
|
|
|
|
|
self.assertEqual(ydl._default_format_spec({}), 'best/bestvideo+bestaudio')
|
|
|
|
|
self.assertEqual(ydl._default_format_spec({'is_live': True}), 'best/bestvideo+bestaudio')
|
|
|
|
|
|
|
|
|
|
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.available', True)
|
|
|
|
|
@patch('yt_dlp.YoutubeDL.FFmpegMergerPP.can_merge', lambda _: True)
|
|
|
|
|
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.available', True)
|
|
|
|
|
@patch('yt_dlp.postprocessor.ffmpeg.FFmpegMergerPP.can_merge', lambda _: True)
|
|
|
|
|
def test_default_format_spec_with_ffmpeg(self):
|
|
|
|
|
ydl = YDL({})
|
|
|
|
|
self.assertEqual(ydl._default_format_spec({}), 'bestvideo*+bestaudio/best')
|
|
|
|
|