I'm moving everything from Windows 8 to Kubuntu (including Games!)

(Gregorius Techneticies) #21

Yeah back on Windows XP everything just kinda worked, but now on newer Windows nothing works!

(Gregorius Techneticies) #22

Recently I got pissed at Youtube again not showing the Notifications for my Subscriptions despite ringing the Bell and everything, so I decided I will write something that does it for me.

First I grabbed all the Channel Page Links I could get (except for the 10 that this wont work for)

Then I added the argument for making an Archive of already downloaded Links to keep track of:

 --download-archive "~/Documents/Scripts/downloaded.txt"

And an Argument for stopping the Check after 24 Videos:

 --playlist-end 24

Now the Script will download the 24 most recent Videos from the Channel Page, but clearly I dont wanna download 24 of the videos I already watched, so I needed to be a bit tricky and changed this:

 -o "/data/Downloads/%(title)s.%(ext)s"

to this:

 -o "~/Documents/Scripts/dummy.txt"

And added an empty dummy.txt File to that Location, so now the 24 most recent Videos will be added to the List of Links it already downloaded, because youtube-dl thinks the File is already done.

Then I changed it back to the actual Location, since all Videos were marked as Downloaded now.

Now the Script, whenever I press the Macro Key on my Keyboard for it, will automatically download all new Videos regardless of what Youtube thinks I should be notified about, and that at the Resolution I want them to be (unlike what the Youtube Media Player often does).

But there was more, Videos that go at 240p get throttled by Youtube, which is ofcourse slowing down this entire Script. Adding this Argument fixed that though:

 --http-chunk-size 10M

Though one problem was left, there is Channels where I want 360p Videos for one Type of Content and 240p for another Type. Mainly in case of TeamFourStar, so I needed to use a Regex so the DnD and the Fan Art Streams were downloaded at a higher Resolution.

 --match-title "tfs.at.the|fan.art|fanart|inktober"

And then follow the 360p Regex Filtered Line with a 240p Unfiltered Line, which thanks to the Download Archive that keeps track of downloaded Videos will not repeat downloading the 360p Video.

youtube-dl "https://www.youtube.com/channel/UCyfG7-7lPhf6EIC6igUOfzw/videos" -if "best[height<=360]" -o "/data/Downloads/%(title)s.%(ext)s" --restrict-filenames --retries infinite --console-title --download-archive "~/Documents/Scripts/downloaded.txt" --playlist-end 24 --http-chunk-size 10M --match-title "tfs.at.the|fan.art|fanart|inktober"
youtube-dl "https://www.youtube.com/channel/UCyfG7-7lPhf6EIC6igUOfzw/videos" -if "best[height<=240]" -o "/data/Downloads/%(title)s.%(ext)s" --restrict-filenames --retries infinite --console-title --download-archive "~/Documents/Scripts/downloaded.txt" --playlist-end 24 --http-chunk-size 10M

(Gregorius Techneticies) #23

So Youtube recently removed the 3gp Formats from almost all Videos, some ancient Videos still have it, but anything less than a year or two old doesn’t have it anymore afaik. This makes the 240p Option impossible to get without splicing Audio and Video together after downloading.

Ofcourse I do want to save on Bandwidth and Drive Space, so I decided to setup Values for that on most of the Channels.

-f "bestvideo[height<=240]+worstaudio/bestvideo[height<=360]+worstaudio/best[height<=240]/best[height<=360]"

This (if ffmpeg is installed, and only for Videos on Youtube) will download the 240p Video and the “worst” or actually smallest possible Audio Track and mix them into one small Video, as opposed to me being forced to use the 360p with “good” audio that is about twice as large or more in the end.

Ofcourse it has a fallback to the 360p Version in case things are broken.


Which is pretty simple to do with ffmpeg if you want to go that route. :slight_smile:

(Gregorius Techneticies) #25

I already do, that’s what the script does. :stuck_out_tongue: