Introduction
A youtube-dl fork with additional features and fixes
It’s one of the best tools to download the video and etc. The following just some simple stuff of it. Therefore, go to GitHub to see more!
Installation & Update
installation
The following is a example for pip
.
1
| python3 -m pip install -U yt-dlp
|
If you want to install some optional dependence for many awesome features. Please click the link to see detailed information.
Update
You’re able to run yt-dlp -U
to update it.
Usage
The basic command is.
1
| yt-dlp [OPTIONS] [--] URL [URL...]
|
For example:
1 2
| yt-dlp https://www.youtube.com/watch?v=NLNdoj_N_TY
|
Print out the available formats and information with:
1
| yt-dlp --list-formats URL
|
For example:
1
| yt-dlp --list-formats https://m.youtube.com/watch?v=NLNdoj_N_TY
|
Then, you will see the following information:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| [youtube] NLNdoj_N_TY: Downloading webpage [youtube] NLNdoj_N_TY: Downloading android player API JSON [info] Available formats for NLNdoj_N_TY: ID EXT RESOLUTION FPS | FILESIZE TBR PROTO | VCODEC VBR ACODEC ABR ASR MORE INFO --------------------------------------------------------------------------------------------------------------- sb2 mhtml 48x27 | mhtml | images storyboard sb1 mhtml 80x45 | mhtml | images storyboard sb0 mhtml 160x90 | mhtml | images storyboard 139 m4a audio only | 1.89MiB 48k https | audio only mp4a.40.5 48k 22050Hz low, m4a_dash 249 webm audio only | 2.10MiB 54k https | audio only opus 54k 48000Hz low, webm_dash 250 webm audio only | 2.76MiB 71k https | audio only opus 71k 48000Hz low, webm_dash 140 m4a audio only | 5.00MiB 129k https | audio only mp4a.40.2 129k 44100Hz medium, m4a_dash 251 webm audio only | 5.29MiB 137k https | audio only opus 137k 48000Hz medium, webm_dash 17 3gp 176x144 6 | 1.90MiB 49k https | mp4v.20.3 49k mp4a.40.2 0k 22050Hz 144p 394 mp4 256x144 25 | 2.14MiB 55k https | av01.0.00M.08 55k video only 144p, mp4_dash 160 mp4 256x144 25 | 763.00KiB 19k https | avc1.4d400c 19k video only 144p, mp4_dash 278 webm 256x144 25 | 1.51MiB 39k https | vp9 39k video only 144p, webm_dash 395 mp4 426x240 25 | 1.22MiB 31k https | av01.0.00M.08 31k video only 240p, mp4_dash 133 mp4 426x240 25 | 1.14MiB 29k https | avc1.4d4015 29k video only 240p, mp4_dash 242 webm 426x240 25 | 1.49MiB 38k https | vp9 38k video only 240p, webm_dash 396 mp4 640x360 25 | 2.04MiB 52k https | av01.0.01M.08 52k video only 360p, mp4_dash 134 mp4 640x360 25 | 1.84MiB 47k https | avc1.4d401e 47k video only 360p, mp4_dash 18 mp4 640x360 25 | 10.50MiB 271k https | avc1.42001E 271k mp4a.40.2 0k 44100Hz 360p 243 webm 640x360 25 | 2.05MiB 53k https | vp9 53k video only 360p, webm_dash 397 mp4 854x480 25 | 3.36MiB 86k https | av01.0.04M.08 86k video only 480p, mp4_dash 135 mp4 854x480 25 | 2.58MiB 66k https | avc1.4d401e 66k video only 480p, mp4_dash 244 webm 854x480 25 | 2.78MiB 72k https | vp9 72k video only 480p, webm_dash 22 mp4 1280x720 25 | ~ 9.59MiB 242k https | avc1.64001F 242k mp4a.40.2 0k 44100Hz 720p 398 mp4 1280x720 25 | 6.29MiB 162k https | av01.0.05M.08 162k video only 720p, mp4_dash 136 mp4 1280x720 25 | 4.37MiB 113k https | avc1.4d401f 113k video only 720p, mp4_dash 247 webm 1280x720 25 | 4.66MiB 120k https | vp9 120k video only 720p, webm_dash 399 mp4 1920x1080 25 | 11.62MiB 300k https | av01.0.08M.08 300k video only 1080p, mp4_dash 137 mp4 1920x1080 25 | 14.25MiB 369k https | avc1.640028 369k video only 1080p, mp4_dash 248 webm 1920x1080 25 | 11.66MiB 301k https | vp9 301k video only 1080p, webm_dash
|
As you can see, some is video only and some is audio only.
So you can run the following command to download only audio
1
| yt-dlp -f 140 https://m.youtube.com/watch?v=NLNdoj_N_TY
|
Or change the argument to choose what do you want to download, such as 137
to download only video, and 140+137
to download both video and audio.
Download and merge the best video stream with the best audio stream:
1
| yt-dlp -f 'bv*+ba' https://m.youtube.com/watch?v=H3o4l4GVLW0
|
Download the video with subtitles
1
| yt-dlp --sub-langs en --embed-subs https://m.youtube.com/watch?v=H3o4l4GVLW0
|
Configuration
You are able to put your argument of yt-dlp in a file. Please go to offical docs for more.
At last, here is my configuration. Hope it’s helpful
Reference