On Tue, Oct 27, 2020 at 1:58 PM Dale <rdalek1...@gmail.com> wrote: > > Howdy, > > I'm hearing bad things about youtube-dl. It seems the RIAA is punishing > people who use it legally for those who don't. Funny how the people who > don't do anything wrong pays for the ones who do while the ones who do > bad things get away. Anyway. > > A good while back this list helped me set up the conf file for > youtube-dl so that it grabs the best resolution up to 720P or 1280 > resolution videos. I have no need for a 4K video. lol It seems > something changed a while back and the options in the conf file produce > a error. From the error, I can't figure out what to change. This is > the error. > > > ERROR: 'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a > valid URL. Set --default-search "ytsearch" (or run youtube-dl > "ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to > search YouTube > > I'm using the normal youtube-dl <link to video> command. No options or > anything. This is what I have in the conf file. > > > --format > bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best > > --merge-output-format mp4 > > > Those options worked for a long time so I guess something changed with > youtube-dl. I don't get why it says the options are a URL either. When > I google, I can't find where anyone is getting this error or using > different options either, at least not to accomplish the same goal. I > might add, my googling turned up the RIAA mess. May have to donate to > help fund lawyers. :/ > > Anyone know what to do to fix it? I can't make heads or tails of it. > > Dale > > :-) :-)
Hi Dale, I don't use youtube-dl enough to offer any significant input but in my limited experience the general way to handle this is to first determine what formats are actually available and then to pick one of those by number: mark@science:~$ youtube-dl -F https://www.youtube.com/watch?v=byTOZIvyXPo [youtube] byTOZIvyXPo: Downloading webpage [youtube] byTOZIvyXPo: Downloading MPD manifest [info] Available formats for byTOZIvyXPo: format code extension resolution note 139 m4a audio only DASH audio 52k , m4a_dash container, mp4a.40.5@ 48k (22050Hz) 140 m4a audio only DASH audio 132k , m4a_dash container, mp4a.40.2@128k (44100Hz) 251 webm audio only DASH audio 137k , webm_dash container, opus @160k (48000Hz) 278 webm 192x144 DASH video 95k , webm_dash container, vp9, 24fps, video only 160 mp4 192x144 DASH video 108k , mp4_dash container, avc1.4d400b, 24fps, video only 242 webm 320x240 DASH video 220k , webm_dash container, vp9, 24fps, video only 133 mp4 320x240 DASH video 242k , mp4_dash container, avc1.4d400c, 24fps, video only 243 webm 480x360 DASH video 405k , webm_dash container, vp9, 24fps, video only 134 mp4 480x360 DASH video 477k , mp4_dash container, avc1.4d4015, 24fps, video only 244 webm 640x480 DASH video 752k , webm_dash container, vp9, 24fps, video only 135 mp4 640x480 DASH video 1155k , mp4_dash container, avc1.4d4014, 24fps, video only 18 mp4 480x360 360p 514k , avc1.42001E, 24fps, mp4a.40.2@ 96k (44100Hz), 177.81MiB (best) mark@science:~$ Note that documentation for the --bestvideo/--bestaudio options says that they 'may not be available'. In many cases I've had to transcode the download for my purpose which is very much a corner case. I use them in a program called transcribe! which figures out most likely guitar fingering positions from audio content and when video is available will play the video so you can see where the player is actually placing his fingers vs what the program thinks she's/he's doing. I suspect you might be able to script the youtube-dl and transcode into a single batch file but that sort of stuff is generally beyond me and I don't do it enough to warrant learning. HTH, Mark