Skip to content

Commit feccf29

Browse files
dstftwjaimeMF
authored andcommitted
[YoutubeDL] Make bestvideo+bestaudio/best default format when merger is available
1 parent 5b5fbc0 commit feccf29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

youtube_dl/YoutubeDL.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,11 @@ def process_video_result(self, info_dict, download=True):
10911091

10921092
req_format = self.params.get('format')
10931093
if req_format is None:
1094-
req_format = 'best'
1094+
req_format_list = []
1095+
if info_dict['extractor'] == 'youtube' and FFmpegMergerPP(self).available:
1096+
req_format_list.append('bestvideo+bestaudio')
1097+
req_format_list.append('best')
1098+
req_format = '/'.join(req_format_list)
10951099
formats_to_download = []
10961100
if req_format == 'all':
10971101
formats_to_download = formats

0 commit comments

Comments
 (0)