Skip to content
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

Select the best quality with a unified extension #26892

Open
stdedos opened this issue Oct 15, 2020 · 5 comments
Open

Select the best quality with a unified extension #26892

stdedos opened this issue Oct 15, 2020 · 5 comments
Labels

Comments

@stdedos
Copy link

@stdedos stdedos commented Oct 15, 2020

Checklist

#26810, #25089

Description

Using the bare-bones command line, sometimes it ends up with

'Requested formats are incompatible for merge and will be merged into mkv.')

this message. I wonder if there could be a way to get "almost the best video quality" (be that e.g. webm or mp4), without resorting to mkv, and without hardcoding what to get explicitly.

I don't want to use mkv if I will get something like "just 5% better quality".

@stdedos stdedos added the request label Oct 15, 2020
@s104346
Copy link

@s104346 s104346 commented Oct 15, 2020

# Download best mp4 format available or any other best if no mp4 available
$ youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"

from https://github.com/ytdl-org/youtube-dl#format-selection

@stdedos
Copy link
Author

@stdedos stdedos commented Oct 15, 2020

From what I wrote:

"almost the best video quality" (be that e.g. webm or mp4), [...], and without hardcoding what to get explicitly

@ilike2burnthing
Copy link

@ilike2burnthing ilike2burnthing commented Oct 15, 2020

@stdedos
Copy link
Author

@stdedos stdedos commented Oct 15, 2020

I guess it is not clear enough:

If the webm gives 4K, and mp4 gives 1080p, I obviously want webm (even with a 5% sub-par mp4 track).
However, if the video is "just" 5% better than the mp4 format, I prefer mp4 format.

However, I don't want to "explicitly" decide/block one format over the other one.

@ilike2burnthing
Copy link

@ilike2burnthing ilike2burnthing commented Oct 15, 2020

There isn't much that .mp4 containers can't typically handle but .webm can (just Vorbis audio I think) - https://en.wikipedia.org/wiki/Comparison_of_video_container_formats

--merge-output-format mp4 works fine merging .mp4 video with .webm (Opus) audio, or .webm video (VP9) with .webm audio (Opus) from YouTube (just tested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.