No, there isn't a one-letter shortcut option.
The simplified version, changed to request an exact height (=
vs <=
), is:
youtube-dl -f 'bestvideo[height=480]+bestaudio'
This longer version is needed because all new YouTube uploads use separate audio and video streams. If you had used -f 'best[height=480]'
only, it would work for low-resolution modes (e.g. 360p), but often wouldn't find any combined high-resolution stream at all.
Youtube-dl ended up having this kind of format specification because its users wanted flexibility – it's not just that you need a specific resolution, but other users also need specific formats (e.g. H.264 video only; MP4 container only; any audio except OPUS; etc.), or specific stream types (e.g. audio only), or various other constraints.
You did not find any results in documentation because as you noticed, the term "size" is ambiguous, so pixel dimensions are referred to as "resolution" instead. Indeed the documentation contains this example:
If you want to only download some DASH formats (for example if you are not interested in getting videos with a resolution higher than 1080p), you can add -f bestvideo[height<=?1080]+bestaudio/best
to your configuration file.
So the earlier answer is correct and matches the youtube-dl author's recommended approach.
I really thought it must have been an oversight. Ok, thank you. I understand wanting flexibility-- but, for example, youtube-dl gets the best video and audio by default, right? So, I thought, can't I tell it to just get the best at 720p? And it will make all of the same decisions it would with no arguments, except it would use the best 720p video instead of the best maximum size video. ("Best" being however it already determines "best".) – felwithe – 2019-11-05T15:12:03.763