Search code examples
youtube-dl

Best audio and video quality not working in youtube-dl


I tried the following command in order to get the best video and audio quality (I can also avoid to write --format best because from the documentation I read that this is the default setting):

youtube-dl.exe --format best https://www.youtube.com/watch?v=7wfUUZvybPY

and I got a video.mp4 with the following characteristics:

enter image description here

I downloaded the same video by using 4k Video Downloader and I got:

enter image description here

How can I get the same result also by using youtube-dl?


Solution

  • You can parse all formats available with:
    youtube-dl.exe -F https://www.youtube.com/watch?v=7wfUUZvybPY
    Look at first column, "format code". For this video, best option is:
    youtube-dl --format 315 https://www.youtube.com/watch?v=7wfUUZvybPY for 3440x1440 video, and
    youtube-dl --format 140 https://www.youtube.com/watch?v=7wfUUZvybPY for 129kbit audio.
    Then, with ffmpeg, you can merge that two streams in your preferred container (you can find many answers here in Stackoverflow).
    For very high bitrates there isn't a file already merged available on YouTube, ffmpeg is a crucial tool for this type of conversions!