In the light of google cracking down on ad block i want to be pro-active and automatically download new videos to my jelly fin server.

I was thinking off using this tool https://youtube-dl.org/ and writing a small script for it (with help of gpt4) but i am missing any general strategy on when i should trigger it and how to make sure it downloads all of the new videos exactly once.

I am hoping that i am not the first to do this and people can give me some good tips before i put to much work into this project.

6 points

Youtube-dl has the option to download only videos which are uploaded after a specific date. So you could run the script once a day and download the videos from this day.

Youtube has RSS feeds for channel. You could use that as a trigger to download the video as soon as it gets released. I hope this can be helpful :)

permalink
report
reply
1 point
*

I believe there will always be a way to watch these videos ad-free. I can’t imagine they will restructure the video serving infrastructure to force ads in a way that can’t be blocked as there is so many devices and official YouTube clients (gaming consoles, Smart TVs, etc) that would have to be updated. However, I do think they might make it more difficult.

youtube-dl is the way to go. One thing you could do is keep a text file containing video IDs that you have already downloaded and before downloading a new video and append the new video ID to the list. Another way is you could also set the file name to the video ID to and check if it exists before downloading as well.

permalink
report
reply
3 points

Switch to https://github.com/yt-dlp/yt-dlp its better, its an updated version that is mantained. Right now I dont remember by memory the arguments. But if you read the documentation you can setup a file that contains a list of already downloaded videos. I used to use it to download playlists that I made and it only downloaded new videos. Read this thread, its should apply to youtube-dlp with a whole channel: https://askubuntu.com/questions/673442/downloading-youtube-playlist-with-youtube-dl-skipping-existing-files

permalink
report
reply
1 point

Thanks, this seems to have a lot of options, definitely taking a look at it next weekend.

permalink
report
parent
reply
2 points

https://github.com/rebane2001/sensible-yt-dlp-archive-scripts

This would help you get started. Run this every x hours.

permalink
report
reply

YouTube

!youtube@lemmy.fmhy.ml

Create post

c/youtube is a community for YouTube. Discuss the platform, videos, channels, creator tips, or anything that relates to YouTube! Please read and follow the rules. Have fun, be kind!

Rules:

  • No politics
  • Do not suggest that users should like or subscribe
  • No advertising products or services
  • No explicit self promotion
  • Be kind

Posting Guidelines:

Discussion based posts are primarily encouraged. You may post links to videos or channels but there must be a reason for doing so other than promoting videos/channels. This guideline should ensure there is less spam and less self-promotion so we can grow a rich community.

Community stats

  • 1

    Monthly active users

  • 7

    Posts

  • 5

    Comments

Community moderators