Ask HN: Yt-Dlp Reduced Quality?

by ramtatatamon 9/18/2023, 1:16 PMwith 3 comments

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`

by qbrasson 9/18/2023, 4:28 PM

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.

by 8chanAnonon 9/19/2023, 6:35 AM

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...