HACKER Q&A
📣 ramtatatam

Yt-Dlp Reduced Quality?


Hi HN!

I maintain a playlist of youtube clips for offline use in case I run out of internet, and recently I noticed something strange.

I was listening to this clip on youtube: https://www.youtube.com/watch?v=Ry4TqqM5TGs , I then downloaded it with `yt-dlp https://www.youtube.com/watch?v=Ry4TqqM5TGs` and listened locally with intention to loop until end of my day. And I noticed when I play this clip on youtube the sound is much more vibrant and the clip sounds much better than the downloaded version.

Is there any magic switch I'm missing? I already tried `-f bestvideo+bestaudio`


  👤 qbrass Accepted Answer ✓
It might be pulling an audio format that either youtube resampled, or that ffmpeg had to resample when merging the video because it's not compatible with the video format.

There's a way to pick preferred audio and video formats it will choose over what's simply the best bitrate, but you'll have to look in the manual for more details.


👤 8chanAnon
The highest quality audio is generally tag 251 (webm/opus). You can stream or download through an Invidious instance:

https://vid.puffyan.us/latest_version?itag=251&id=Ry4TqqM5TG...