9 ютуб
Contributors
Thanks goes to these wonderful people ():
This project follows the all-contributors specification. Contributions of any kind welcome!
What is happening behind the scenes
It’s pretty easy. I’ll show you the process of doing the same thing without youtube-play (youtube-play uses a bit different commands that are more understandable for machines).
Prepare a to a YouTube video. Open up your command-line. Execute . youtube-dl will respond with a table with available formats for the video. Example:
format code | extension | resolution | note |
---|---|---|---|
139 | m4a | audio only | DASH audio 48k , m4a_dash container, mp4a.40.5@ 48k (22050Hz) |
249 | webm | audio only | DASH audio 68k , opus @ 50k, 1.40MiB |
250 | webm | audio only | DASH audio 86k , opus @ 70k, 1.85MiB |
140 | m4a | audio only | DASH audio 128k , m4a_dash container, mp4a.40.2@128k (44100Hz) |
251 | webm | audio only | DASH audio 156k , opus @160k, 3.63MiB |
171 | webm | audio only | DASH audio 202k , vorbis@128k, 4.42MiB |
278 | webm | 256×144 | 144p 105k , webm container, vp9, 24fps, video only, 2.59MiB |
160 | mp4 | 256×144 | DASH video 110k , avc1.4d400c, 24fps, video only |
242 | webm | 426×240 | 240p 246k , vp9, 24fps, video only, 5.60MiB |
133 | mp4 | 426×240 | DASH video 285k , avc1.4d4015, 24fps, video only |
243 | webm | 640×360 | 360p 464k , vp9, 24fps, video only, 10.91MiB |
134 | mp4 | 640×360 | DASH video 634k , avc1.4d401e, 24fps, video only |
244 | webm | 854×480 | 480p 856k , vp9, 24fps, video only, 20.38MiB |
135 | mp4 | 854×480 | DASH video 1254k , avc1.4d401e, 24fps, video only |
247 | webm | 1280×720 | 720p 1706k , vp9, 24fps, video only, 41.67MiB |
136 | mp4 | 1280×720 | DASH video 2534k , avc1.4d401f, 24fps, video only |
248 | webm | 1920×1080 | 1080p 2938k , vp9, 24fps, video only, 74.36MiB |
137 | mp4 | 1920×1080 | DASH video 4363k , avc1.640028, 24fps, video only |
17 | 3gp | 176×144 | small , mp4v.20.3, mp4a.40.2@ 24k |
36 | 3gp | 320×180 | small , mp4v.20.3, mp4a.40.2 |
43 | webm | 640×360 | medium , vp8.0, vorbis@128k |
18 | mp4 | 640×360 | medium , avc1.42001E, mp4a.40.2@ 96k |
22 | mp4 | 1280×720 | hd720 , avc1.64001F, mp4a.40.2@192k (best) |
Select the format that suits you the most and remember its . youtube-play prefers formats with the largest bitrate possible (which you can find in the column), but you can choose any format with sound, since the video will be omitted.
Next, execute . This will respond with a direct link to the file. You can either copy it in the , or pipe it into your clipboard like this:
To stream the sound from the file, execute this command:
ffplay will stream the sound and exit when it’s complete.