-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YoutubeDL] Make bestvideo+bestaudio/best
default format when merger is available
#5456
[YoutubeDL] Make bestvideo+bestaudio/best
default format when merger is available
#5456
Conversation
bestvideo+bestaudio/best
default format when merger i...bestvideo+bestaudio/best
default format when merger is available
In some issue report someone commented saying that for videos in low resolution it's more convenient to just get the normal formats, since they have the same or better quality. Checking these cases would probably complicate the code too much and I don't think it's worth the effort.
We should make sure that the default formats work (otherwise users would get confused), I propose two alternatives:
With this change the YoutubeIE test fails, we have to change the Apart from the previous comments, I like the change and agree that |
I think merging in mkv sounds reasonable since theoretically there may be a situation when there are no video/audio of compatible formats available. Moreover, general video+audio format selection will benefit from it as well. |
I also prefer defaulting to mkv. Some players may not support it, I don't think it's a big problem (it happens the same if some website only gives flv files), but some users may not like it. We could also merge into mkv and use |
# Merge incompatible formats into mkv | ||
if not compatible_formats(requested_formats): | ||
filename = os.path.splitext(filename)[0] + '.mkv' | ||
self.report_warning('You have requested formats uncompatible for merge. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since bestvideo+bestaudio/best
will be the default, maybe it's better to use to_screen
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Uncompatible formats scenario is still expected to happen less often that compatible and can be treated as reasonable-to-warn-about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it's fine.
Before merging this I think we should detect if the video has already been downloaded and merged. Currently if you don't use --keep-video, the files are redownloaded and merged again (if you prefer, I can try to implement it myself). One issue with merging is that for long videos (like fEAyDNWaCto from #5298), ffmpeg takes a relatively long time to merge them. I don't know if we can do something to fix it. |
0730511
to
2faab85
Compare
I've added basic check for already merged file. Feel free to tweak it if that's not what you expected. |
I have written an alternative in #5469, we have to use a temporary file with ffmpeg, otherwise we can end with a partial video if we cancel the merging. |
Ok, lets just merge both to master. 2015-04-19 21:03 GMT+06:00 Jaime Marquínez Ferrándiz <
|
Since the end of April 2015 and version 2015.04.26, youtube-dl uses -f bestvideo+bestaudio/best as the default format selection, see ytdl-org/youtube-dl#5447 and ytdl-org/youtube-dl#5456 =fixup for commit fe6682a (PotcFdk#8)
Closes #5447.
Pros:
Cons: