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:

  1. You should be using Linux to run it.
  2. Create a folder named yt-dlp in Videos folder or else change the location in the script below.
  3. You should have yt-dlp not youtube-dl on your system. You can do this by sudo apt install yt-dlp or use your distro’s package installer.
  4. Save this file with any name in your home folder (or whichever folder you are you most comfortable with and give it execution permissions by chmod +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

5 points

Fun.

Question though… How does the sponsor block work?

permalink
report
reply
3 points

@CaptainBasculin@lemmy.ml 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

permalink
report
parent
reply
1 point
*

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

permalink
report
parent
reply
4 points

Nice 😉

permalink
report
reply
3 points

Do you expect MacOS to be able to run this?

permalink
report
reply
1 point

Cursory look at it would suggest yes with a minor adjustment of this line:

cd /home/$USER/Videos/yt-dlp

permalink
report
parent
reply
1 point

I think Lemmy broke your code block. The dollar signs aren’t rendering

permalink
report
reply
1 point

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.

permalink
report
parent
reply

Bash

!bash@lemmy.ml

Create post

Talk about the Bash Shell and Bash scripting

Community stats

  • 10

    Monthly active users

  • 32

    Posts

  • 70

    Comments

Community moderators