Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Downloading video of specific resolution #56

Open
HusneMubarak opened this issue Dec 19, 2024 · 8 comments
Open

Downloading video of specific resolution #56

HusneMubarak opened this issue Dec 19, 2024 · 8 comments

Comments

@HusneMubarak
Copy link

is it possible to select a specific video resolution if multiple option is available to download

@Petrprogs
Copy link

You can create custom preset in config.toml. See here

@JasioNiezdara
Copy link

You can create custom preset in config.toml. See here

Useful information, thanks. The only problem is that I don't know what arguments to use to download specific resolutions. For example 1440p (which would require modification of the best preset), or 720p (which would require modification of the mp4 preset).

For instance, if the video's max quality is 4K, by default the best preset will download 4K, and the mp4 preset will download 1080p (because that's the limit for mp4 on YouTube, higher resolutions use webm).

@Petrprogs
Copy link

You can create custom preset in config.toml. See here

Useful information, thanks. The only problem is that I don't know what arguments to use to download specific resolutions. For example 1440p (which would require modification of the best preset), or 720p (which would require modification of the mp4 preset).

For instance, if the video's max quality is 4K, by default the best preset will download 4K, and the mp4 preset will download 1080p (because that's the limit for mp4 on YouTube, higher resolutions use webm).

To download bestvideo with certain quality, you can use bv[height<=quality_you_want]+ba. <= allows to use lower quality, if specified isn't found

@JasioNiezdara
Copy link

To download bestvideo with certain quality, you can use bv[height<=quality_you_want]+ba. <= allows to use lower quality, if specified isn't found

It seems to work with the "best" preset, I can download any resolution, but it will be the VP9 codec.
Can I use the height parameter with the mp4 preset (so I can get 720p with the AVC codec)? I tried doing something like this "bv*[vcodec^=avc,height<=720]", but I get a syntax error in the log.

Also, can I modify the mp3 preset so that I can download just the original AAC 128 kbps audio file (which is what I get when I download any video format). If I change mp3 to m4a or aac, I get a ~350 kbps AAC file, which means it's re-encoded.

Is there a list of all the parameters that can be used with presets?
Thank you for replying.

@Petrprogs
Copy link

To download bestvideo with certain quality, you can use bv[height<=quality_you_want]+ba. <= allows to use lower quality, if specified isn't found

It seems to work with the "best" preset, I can download any resolution, but it will be the VP9 codec. Can I use the height parameter with the mp4 preset (so I can get 720p with the AVC codec)? I tried doing something like this "bv*[vcodec^=avc,height<=720]", but I get a syntax error in the log.

Also, can I modify the mp3 preset so that I can download just the original AAC 128 kbps audio file (which is what I get when I download any video format). If I change mp3 to m4a or aac, I get a ~350 kbps AAC file, which means it's re-encoded.

Is there a list of all the parameters that can be used with presets? Thank you for replying.

To download video with AVC and in 720 resolution you can use this: bv[vcodec^=avc1][height<=720]+ba[ext=m4a]. Note, that i placed <= to avoid errors, because some videos do not have a 720p stream in the AVC codec, and in this case the best resolution in AVC will be used, but no more than 720

Sure, you can do something like this: args = ["ba"]. In this case webm with OPUS codec will be downloaded. If you don't want webm, you can download M4A using args = ["ba[ext=m4a]"]

Sure, yt-dlp-gui args is just arguments list, that are passed to yt-dlp. Here is yt-dlp docs

@Petrprogs
Copy link

is it possible to select a specific video resolution if multiple option is available to download

Don't forget to close issue :)

@HusneMubarak
Copy link
Author

HusneMubarak commented Dec 29, 2024

I am using this args = [ "-f", "bv[vcodec^=avc][height<=720p][ext=mp4]+ba/b[ext=mp4]",] to download a 720p file but it does not work with 720p60 file instead download a 1080p60 file. Is their any thing i need to change in this args.

@Petrprogs
Copy link

I am using this args = [ "-f", "bv[vcodec^=avc][height<=720p][ext=mp4]+ba/b[ext=mp4]",] to download a 720p file but it does not work with 720p60 file instead download a 1080p60 file. Is their any thing i need to change in this args.

Why did you placed "720p" as height? It's wrong, you have to use just "720"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants