yt-dlp command on debian to download highest available video and audio, provided that resolution is no higher than 1920 x 1080 p
from merompetehla@lemmy.ml to linux@lemmy.ml on 21 Jul 18:20
https://lemmy.ml/post/33478068
from merompetehla@lemmy.ml to linux@lemmy.ml on 21 Jul 18:20
https://lemmy.ml/post/33478068
debian 12.11, yt-dlp stable@2025.06.30.
I used this argument: “-f bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]”
and it works: it downloads the best available video, audio and ffmpeg merges both in a single file. Automatically.
Except that the maximum resolution I need is 1920 x 1080 p. Best available video is oftentimes 4096 x 2160 p, too much for the target hardware.
Using -F to check different resolutions to then select one (like -f 299 or -f 148) is tiresome.
How do I do that? Ideally for whole playlists involving between 25 and 50 videos.
threaded - newest
Taken from github.com/yt-dlp/yt-dlp. Replace 480 with 1080. Multiple options in the documentation to choose from.
$ yt-dlp -S “height:480”
So a height<=1080 should be it.
Others have given good examples for formats you were aiming for.
For bulk download, simply create a list.txt file in your target directory, bulk add all urls in separate lines. Then
It is noteworthy that, instead of listing urls manually, you can also grab entire playlists from relevant platforms if that’s what you’re after, including preserving the playlist names as directory names. Same even goes for entire channels.
.
an approach I wasn’t aware of. thanks