Extract m4a audio with youtube-dl

CatOnRug solve, automate, speed up
I can see all available audio/video streams with simple parameter -F

This will not download anything. This will only list all the streams. for example:
youtube-dl https://www.youtube.com/watch?v=2yd3j9g0UN8 -F
Or even I can use only the video id:
youtube-dl 2yd3j9g0UN8 -F
Now I can see a lot of streams:
$ youtube-dl -F 2yd3j9g0UN8
[youtube] 2yd3j9g0UN8: Downloading webpage
[youtube] 2yd3j9g0UN8: Downloading video info webpage
[youtube] 2yd3j9g0UN8: Extracting video information
[youtube] 2yd3j9g0UN8: Downloading MPD manifest
[info] Available formats for 2yd3j9g0UN8:
format code  extension  resolution note
139          m4a        audio only DASH audio   48k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 1.27MiB
249          webm       audio only DASH audio   56k , opus @ 50k, 1.41MiB
250          webm       audio only DASH audio   74k , opus @ 70k, 1.84MiB
140          m4a        audio only DASH audio  128k , m4a_dash container, mp4a.40.2@128k (44100Hz), 3.38MiB
251          webm       audio only DASH audio  146k , opus @160k, 3.59MiB
171          webm       audio only DASH audio  152k , vorbis@128k, 3.34MiB
160          mp4        256x144    DASH video   97k , avc1.4d400c, 25fps, video only, 1.41MiB
278          webm       256x144    144p  122k , webm container, vp9, 25fps, video only, 2.21MiB
242          webm       426x240    240p  228k , vp9, 25fps, video only, 3.50MiB
133          mp4        426x240    DASH video  274k , avc1.4d4015, 25fps, video only, 4.21MiB
243          webm       640x360    360p  413k , vp9, 25fps, video only, 6.24MiB
134          mp4        640x360    DASH video  447k , avc1.4d401e, 25fps, video only, 5.68MiB
244          webm       854x480    480p  718k , vp9, 25fps, video only, 9.95MiB
135          mp4        854x480    DASH video  937k , avc1.4d401e, 25fps, video only, 10.99MiB
247          webm       1280x720   720p 1396k , vp9, 25fps, video only, 18.32MiB
136          mp4        1280x720   DASH video 1795k , avc1.4d401f, 25fps, video only, 20.31MiB
248          webm       1920x1080  1080p 2520k , vp9, 25fps, video only, 32.02MiB
137          mp4        1920x1080  DASH video 3242k , avc1.640028, 25fps, video only, 50.88MiB
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)
And if I want to extract the best m4a audio stream I use code 140:
youtube-dl 2yd3j9g0UN8 -f 140
opus is the best audio stream available but not all players can play such format.

No comments:

Post a Comment