I use the codec packages from RPM Fusion so I don't mind using AAC audio...
You can see what all formats are available using a random video link:
$ youtube-dl -F https://www.youtube.com/watch?v=9dhmS237wsw
[youtube] 9dhmS237wsw: Downloading webpage
[youtube] 9dhmS237wsw: Downloading video info webpage
[youtube] 9dhmS237wsw: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] 9dhmS237wsw: Downloading MPD manifest
[info] Available formats for 9dhmS237wsw:
format code extension resolution note
139 m4a audio only DASH audio 49k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
249 webm audio only DASH audio 55k , opus @ 50k, 4.62MiB
250 webm audio only DASH audio 78k , opus @ 70k, 6.41MiB
140 m4a audio only DASH audio 128k , m4a_dash container, mp4a.40.2@128k (44100Hz)
171 webm audio only DASH audio 135k , vorbis@128k, 11.08MiB
251 webm audio only DASH audio 168k , opus @160k, 12.51MiB
278 webm 256x144 144p 110k , webm container, vp9, 30fps, video only, 6.38MiB
160 mp4 256x144 DASH video 118k , avc1.4d400c, 30fps, video only
242 webm 426x240 240p 237k , vp9, 30fps, video only, 8.92MiB
133 mp4 426x240 DASH video 259k , avc1.4d4015, 30fps, video only
134 mp4 640x360 DASH video 370k , avc1.4d401e, 30fps, video only
243 webm 640x360 360p 417k , vp9, 30fps, video only, 17.01MiB
135 mp4 854x480 DASH video 674k , avc1.4d401f, 30fps, video only
244 webm 854x480 480p 708k , vp9, 30fps, video only, 27.83MiB
136 mp4 1280x720 720p 1199k , avc1.4d401f, 30fps, video only, 69.77MiB
247 webm 1280x720 720p 1364k , vp9, 30fps, video only, 59.11MiB
302 webm 1280x720 720p60 2029k , vp9, 60fps, video only, 85.29MiB
298 mp4 1280x720 DASH video 2264k , avc1.4d4020, 60fps, video only
137 mp4 1920x1080 1080p 2294k , avc1.640028, 30fps, video only, 134.18MiB
248 webm 1920x1080 1080p 2566k , vp9, 30fps, video only, 137.01MiB
299 mp4 1920x1080 DASH video 3934k , avc1.64002a, 60fps, video only
303 webm 1920x1080 1080p60 4032k , vp9, 60fps, video only, 231.51MiB
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)
Then you can do something like this to set your preferences:
$ youtube-dl -f <video_num>+<audio_num> <link>
IIRC you can use commas between numbers in order of your preference, something like:
$ youtube-dl -f 137,298,135+140,139 <link>
$ youtube-dl -f 137,298,135+140,139 https://www.youtube.com/watch?v=9dhmS237wsw
[youtube] 9dhmS237wsw: Downloading webpage
[youtube] 9dhmS237wsw: Downloading video info webpage
[youtube] 9dhmS237wsw: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] 9dhmS237wsw: Downloading MPD manifest
[info] 9dhmS237wsw: downloading video in 4 formats
[download] Destination: UniFi Guest WiFi-9dhmS237wsw.mp4
[download] 100% of 134.18MiB in 00:13
[download] UniFi Guest WiFi-9dhmS237wsw.mp4 has already been downloaded
[download] 100% of 134.18MiB
[download] UniFi Guest WiFi-9dhmS237wsw.mp4 has already been downloaded and merged
[dashsegments] Total fragments: 77
[download] Destination: UniFi Guest WiFi-9dhmS237wsw.m4a
[download] 100% of 4.27MiB in 00:11
[ffmpeg] Correcting container in "UniFi Guest WiFi-9dhmS237wsw.m4a"
Thanks,
Richard
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx