Вы находитесь на странице: 1из 2

How to save MP3s using the Youtube-dl command

youtube-dl -f bestaudio --audio-quality 0 --audio-format mp3 "Youtube link to song


or video"

Example:
MP3
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=m_wXiKWVGMs

.webm
youtube-dl -f bestaudio --audio-quality 0 --audio-format mp3
https://www.youtube.com/watch?v=pv1j4FhCU9I

======================================================

How to download best video quality:

1. Use the video location with the -F command. Produces list of available video
qualities.
Example:
youtube-dl https://www.youtube.com/watch?v=XyOGdjWDVM4 -F

Outputs this:
[info] Available formats for XyOGdjWDVM4:
format code extension resolution note
139 m4a audio only DASH audio 52k , m4a_dash container,
mp4a.40.5@ 48k (22050Hz), 25.68MiB
249 webm audio only DASH audio 60k , opus @ 50k, 27.40MiB
250 webm audio only DASH audio 82k , opus @ 70k, 33.97MiB
140 m4a audio only DASH audio 132k , m4a_dash container,
mp4a.40.2@128k (44100Hz), 68.58MiB
171 webm audio only DASH audio 145k , vorbis@128k, 54.83MiB
251 webm audio only DASH audio 155k , opus @160k, 62.92MiB
160 mp4 256x144 DASH video 127k , avc1.4d400c, 25fps, video
only, 59.22MiB
278 webm 256x144 144p 143k , webm container, vp9, 25fps, video
only, 54.12MiB
133 mp4 426x240 DASH video 264k , avc1.4d4015, 25fps, video
only, 132.44MiB
242 webm 426x240 240p 322k , vp9, 25fps, video only, 94.66MiB
243 webm 640x360 360p 597k , vp9, 25fps, video only, 178.38MiB
134 mp4 640x360 DASH video 647k , avc1.4d401e, 25fps, video
only, 187.66MiB
244 webm 854x480 480p 1047k , vp9, 25fps, video only, 314.17MiB
135 mp4 854x480 DASH video 1191k , avc1.4d401e, 25fps, video
only, 379.34MiB
247 webm 1280x720 720p 2023k , vp9, 25fps, video only, 601.89MiB
136 mp4 1280x720 DASH video 2330k , avc1.4d401f, 25fps, video
only, 680.95MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)

2. Use the "format code" to select video quality or to get audio only.
Example:
youtube-dl https://www.youtube.com/watch?v=XyOGdjWDVM4 -22
will download HD720 quality video format and will automatically download the audio
file and combine the two when finished downloading.

======================================================

How to download Youtube videos' subtitles:

youtube-dl --all-subs --skip-download and the video link

Example:
youtube-dl --all-subs --skip-download https://www.youtube.com/watch?v=Q2ZYdiEE20Y

Вам также может понравиться