by IronWolve · 4y ago · 0 comments
I just wish for functions I could pick mid 720p'ish as a setting that includes audio+video, and not have to pick the audio and video formats. Theres a worst and a best option, but I'd want a middle quality to save space.
From my reading of it, doing this would work for what you want:
-f 'bv*[height<=720]+ba/b[height<=720]'
[0] https://github.com/yt-dlp/yt-dlp#format-selection -f 720ish
and we’re getting somewhere -S res:720
https://github.com/yt-dlp/yt-dlp#sorting-formats (bestvideo[height=720]/bestvideo)+bestaudio/best
bestvideo[height=720] = download the best 720p resolution/bestvideo = otherwise download the best available (540p, 480p etc)
> otherwise download the best available
This will potentially download much higher than 720, if 720 is not available. Probably better to go lower for OP's usecase.
See my sibling comment for a better format selector.