Skip to content

Commit

Permalink
[YoutubeDL] Make bestvideo+bestaudio/best default format when merge…
Browse files Browse the repository at this point in the history
…r is available
  • Loading branch information
dstftw authored and jaimeMF committed Apr 19, 2015
1 parent 5b5fbc0 commit feccf29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion youtube_dl/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,11 @@ def process_video_result(self, info_dict, download=True):

req_format = self.params.get('format')
if req_format is None:
req_format = 'best'
req_format_list = []
if info_dict['extractor'] == 'youtube' and FFmpegMergerPP(self).available:
req_format_list.append('bestvideo+bestaudio')
req_format_list.append('best')
req_format = '/'.join(req_format_list)
formats_to_download = []
if req_format == 'all':
formats_to_download = formats
Expand Down

7 comments on commit feccf29

@snipem
Copy link
Contributor

@snipem snipem commented on feccf29 Apr 21, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So does this mean, that youtube-dl will always download the best video available when there is ffmpeg available on the system? Like 1080p/60fps from Youtube with no further format specification? Before it was stuck at 1080p/30fps without stating the format as bestvideo+bestaudio.

@jaimeMF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will be equivalent to using -f bestvideo+bestaudio/best.

@CollinChaffin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this why my entire library suddenly started re-downloading absurdly at dash 1080p using ffmpeg to merge when it was simply pulling highest native non-dash (720p)? I'm desperately looking for this code change it was after 4/19 and I would like to see the exact code to determine and validate myself a reliable workaround.

@jaimeMF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CollinChaffin Read the last two paragraphs in the FORMATS SELECTION section for the instructions for restoring the old behaviour.

@CollinChaffin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaimeMF Thanks! I can't believe that change wasn't made requiring cmdline changes, rather than without warning such a drastic change to default behavior!

@CollinChaffin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaimeMF You're a friggin lifesaver! Did not go back to re-read all the damn docs when I've been using it so long and when I finally did, I honestly missed it but judging from other folks comments I know I'm not alone I still think a new cmdline for this would been better idea I do see value to new behavior - just not what I personally want right now!

@snipem
Copy link
Contributor

@snipem snipem commented on feccf29 May 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current command line did always implicitly download the best available format. Now the best available format is the DASH one which has to be merged using ffmpeg. I don't see why this deviates from ones expectation. If you want a specific format don't rely on default values.

Please sign in to comment.