On Saturday, 13 April 2019 09:55:45 BST Dale wrote: > root@fireball / # cat /home/dale/.config/youtube-dl/config > ytdl-format=bestvideo[height<=?1280]+bestaudio/best > root@fireball / # > > > > It still insists on downloading the largest file.
It is doing this because you're asking it to download a video of [height<=? 1280], and also download potentially separately an audio file - then mux them into one container file. A *height* of <=1280 means a resolution of more than 1080p. So, no wonder it wants to download a much larger video file. In addition, the question mark is used to download videos up to 1280 or videos where the height is not known. Therefore it could potentially download a bigger file if its height is somehow not declared in its web metadata. As I understand it, to only download a single file containing both video and audio and restrict its video size to height<=720, you should define it thus: --format 'best[height<=720]' For example, this URL is provided by Google in many different formats and containers: $ youtube-dl -F 'https://www.youtube.com/watch?v=7TavVZMewpY' [youtube] 7TavVZMewpY: Downloading webpage [youtube] 7TavVZMewpY: Downloading video info webpage [info] Available formats for 7TavVZMewpY: format code extension resolution note 249 webm audio only DASH audio 53k , opus @ 50k, 647.78KiB 250 webm audio only DASH audio 71k , opus @ 70k, 855.53KiB 171 webm audio only DASH audio 127k , vorbis@128k, 1.55MiB 140 m4a audio only DASH audio 130k , m4a_dash container, mp4a.40.2@128k, 1.68MiB 251 webm audio only DASH audio 141k , opus @160k, 1.65MiB 394 mp4 256x138 144p 91k , av01.0.05M.08, 24fps, video only, 947.02KiB 278 webm 256x138 144p 110k , webm container, vp9, 24fps, video only, 1.19MiB 160 mp4 256x138 144p 110k , avc1.4d400c, 24fps, video only, 834.76KiB 395 mp4 426x230 240p 202k , av01.0.05M.08, 24fps, video only, 1.69MiB 242 webm 426x230 240p 232k , vp9, 24fps, video only, 1.81MiB 133 mp4 426x230 240p 282k , avc1.4d4015, 24fps, video only, 1.91MiB 396 mp4 640x346 360p 359k , av01.0.05M.08, 24fps, video only, 3.01MiB 243 webm 640x346 360p 402k , vp9, 24fps, video only, 3.07MiB 134 mp4 640x346 360p 499k , avc1.4d401e, 24fps, video only, 3.53MiB 397 mp4 854x460 480p 647k , av01.0.05M.08, 24fps, video only, 5.37MiB 244 webm 854x460 480p 760k , vp9, 24fps, video only, 4.97MiB 135 mp4 854x460 480p 837k , avc1.4d401e, 24fps, video only, 5.36MiB 247 webm 1280x690 720p 1343k , vp9, 24fps, video only, 8.89MiB 136 mp4 1280x690 720p 1429k , avc1.4d401f, 24fps, video only, 8.26MiB 248 webm 1920x1036 1080p 2529k , vp9, 24fps, video only, 22.53MiB 137 mp4 1920x1036 1080p 4331k , avc1.640028, 24fps, video only, 26.69MiB 43 webm 640x360 medium , vp8.0, vorbis@128k, 10.60MiB 18 mp4 640x344 medium 610k , avc1.42001E, mp4a.40.2@ 96k (44100Hz), 7.91MiB 22 mp4 1280x690 hd720 766k , avc1.64001F, mp4a.40.2@192k (44100Hz) (best) If you use: youtube-dl --format 'best[height<=720]' 'https://www.youtube.com/watch? v=7TavVZMewpY' only a single file will be downloaded containing both video and audio. In this case the video is 690 pixels high, which is <=720. You can add: --format 'best[height<=720]' in your config file to not have to enter it every time you download a file. -- Regards, Mick
signature.asc
Description: This is a digitally signed message part.

