This will remove all sponsors, download subtitles and view it when you are watching a video. Modify and Share this all over if you like!
Edit: Give credits to this community or Lemmy in general if you are posting this or a modified form (please do share) of this elsewhere. Some popularity would do Lemmy good.
Few requirements:
- You should be using Linux to run it.
- Create a folder named
yt-dlp
in Videos folder or else change the location in the script below. - You should have
yt-dlp
notyoutube-dl
on your system. You can do this bysudo apt install yt-dlp
or use your distro’s package installer. - Save this file with any
name
in your home folder (or whichever folder you are you most comfortable with and give it execution permissions bychmod +x name
Debian Pastebin Thanks to folds at debian for making a tor network friendly pastebin. I have noticed that sometimes scripts get corrupted here, so best copy this from pastebin: https://paste.debian.net/1293211/
edit: deleted the codeblock as it was not rendering properly https://i.imgur.com/1lrTcdT.png
You can get the updated code here https://paste.debian.net/1293211/ Just paste it on to your notepad and give it execution permissions.
#edit 1: The program can be improved, if you guys feel like an improvement is needed, copy the entire program modify the parts you think can be made better and paste it in the comments or paste the pastebin link in the comments. I realize there are applications which are gui for yt-dlp but I felt they lacked many options. You can go on the man page, and learn and add attributes to make this script better so that it better suits your needs.
#man page aka github page: yt-dlp
Fun.
Question though… How does the sponsor block work?
@[email protected] seems to be right, but if you want to know generally, people like me and you basically mark some stuff in the youtube video (we mark when the sponsorship plug starts and when it ends) and then we upload it. That’s it. It’s update in the database (I think) and anyone using sponsor block application will not see it. It’s quite nice actually, some guy with a hindu name (I think an indian) developed it.
haha… just saw the link the good captain posted it’s Ajay! the guys name
There exists sponsorblock API that can return sponsor timestamps when you input it a video ID. You could then trim those sections away.
If you want to implement: https://wiki.sponsor.ajay.app/w/API_Docs
Nice 😉
Do you expect MacOS to be able to run this?
Cursory look at it would suggest yes with a minor adjustment of this line:
cd /home/$USER/Videos/yt-dlp
I think Lemmy broke your code block. The dollar signs aren’t rendering
I should not have pasted it I think
I mean, I should have just included the debian pastebin link, but yeah https://paste.debian.net/1293211/ here’s it anyway. This is an updated one.