How to Download YouTube 4K Videos with Youtube-dl Script

Many Android devices can now support 4K VP9 and/or H.264 video decoding, but for some reasons, Google only serves 4K videos to devices running Android TV OS, as opposed to just Android, with the latter limited to 1080p videos. If for some reasons you want to watch a YouTube 4K video on a capable device, you could download it with youtube-dl script written in Python, and available for Linux, Windows, and Mac OS.

youtube-4k-video-downloadI’ve been using the script for a while to download various video or audio files from YouTube, and other website, but for the purpose of this post, I made sure to update it to the latest version:

If you have already installed the script, it can also be updated with:

I’ll use one of the most popular 4K videos on YouTube as example, namely: COSTA RICA IN 4K 60fps (ULTRA HD) w/ Freefly Movi.

The first task is to list the video’s supported formats:

So we can see there are lots of different formats for a given video with different resolution, container formats, and bitrates. You have to find the lines you want and select the corresponding “format code” in the first column to download the video and audio. I’ll select 313 for video and let the script select the best audio format:


The “+” sign is used to merge video and audio. If you don’t add an option for audio, only the video without audio will be downloaded. You can also run “youtube-dl URL” without options, and it should download the video with both “best audio and video”, but you don’t have full control over the exact format of the video.

Youtube-hd script has many others options, include support for YouTube playlist downloads so it’s a very useful script.

Support CNX Software - Donate via PayPal or become a Patron on Patreon
Advertisements
Subscribe
Notify of
guest
9 Comments
oldest
newest most voted
TC
TC
3 years ago

jDownloader also does this and should be the simpler option on Windows

paul taraneh
paul taraneh
3 years ago

If your device ID rooted you can install og YouTube, but must delete your original YouTube, if you’d like to sign in, then message me for the modified Google services files. Offers 4k and music video downloading because geez that’s alot of code

agumonkey
agumonkey
3 years ago

I learned not long ago that youtube-dl has a syntax to specify what kind of resolution you want. See https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection (a little bit below you’ll see a best[>=480p].

It helps writing robust scripts without hardcoded format number like 331.

Cheers

maredsous10
maredsous10
3 years ago

@TC

I use both youtube-dl and jDownloader2. Both are cross platform and I agree jDownloader2 is much simpler.

The primary reason I use youtube-dl is to download videos from sites that aren’t supported by jDownloader2.

List of supported sites:
https://github.com/rg3/youtube-dl/blob/master/docs/supportedsites.md

farrukh
farrukh
3 years ago

4k downloader does the job way more effortlessly. Available for windows and Mac. Not sure about Linux.

Drone
Drone
3 years ago

TC :
jDownloader also does this and should be the simpler option on Windows

Youtube-dl has a Windows stand-alone (portable) .exe ready to dowload. Just remember to download the latest version if something stops working.

Scott Bailey
Scott Bailey
3 years ago

Thank you for these instructions, really helpful!! I’d also recommend Acethinker Video Downloader which I have used for many years. It is a free cloud based software to download videos without install any software in your device.

Ross Jagger
Ross Jagger
2 years ago

Hello, you can also try TubeGeter and download playlist from Youtube.

Works great and its easy to use tool.

Advertisements