Level 1 "Protips" supercut with youtube-dl

For #devember2020 I took a stab at creating a supercut of all the “protips” from the Level 1 News.

I used youtube-dl to download the auto-generated captions from every episode of the news. Then I wrote a python script to search the captions for the phrase “protip” and download/trim the episodes to the correct timestamps with youtube-dl and ffmpeg.

This process involves downloading every episode with a protip. I’ve hardcoded the limit to download the videos at <=1080p resolution, which speeds things up but it still takes hours. If you want to try this and your internet is slow (like mine) consider running on a Linode VPC with gigabit internet!

The scripts work - I mean, they certainly find protips, but I can’t be sure they find every last one. I don’t know if you can really be sure of the true count without re-watching the entire news. However, it does work well enough to make a fun supercut!

Here are the scripts I wrote and readme explaining how to use them:

Here’s a supercut with all the “protips” I found in a single video:

Happy #devember2020!

25 Likes

Wow!
Finally a Devember project that Actually serves humankind.

I presumed tips came in many varieties; Pro Criminal, Pro Hacker, Pro Politician tips… and probably more…

[edit: then watch to see many, many tips; For all occasions…]

1 Like

This is pretty slick. Really brightened up my afternoon :smiley:

There were a few in there where it’s like “pro tip, don’t do that” and it makes me curious what news article preceded it, so maybe there should be a clause to search for those sort of phrases?

1 Like

Yeah, I first I search for “criminal protips”, but there are sooo many varieties! This is keying in on any “protip”. :grin:

2 Likes

The second one was something about Krista giving advice on not being creepy around women and I thought that was absolutely perfect

There was no context, just “if you want to be less creepy around women, don’t do that”

It’s good advice, really.

This is a good idea! In retrospect, I wish I added citations (maybe subtitle on each clip?) with a link to the video…but I’m not that good yet, haha – maybe Devember 2021!

Well, if you still have time, you’re more than welcome to keep at it. :stuck_out_tongue: I might throw in a PR for it as well.

Also, I get the feeling that this tool can be applied to grepping through all videos on a channel for pretty much anything.

3 weeks after this blows up we’ll have a PewDiePie N word count video

2 Likes

Magnificent work!

1 Like

Fast track to Master Criminal :slight_smile: Nice work,

1 Like

Okay, so I did a bit of digging and you actually might be able to only download the segment of the video that you need.

So, to do this, you’d need to use youtube-dl -g to extract the raw stream URL. Then you use ffmpeg’s -ss and -t flags to snag the video segment that you need.

I’m not 100% sure how well it’ll work, but it might be worth investigating.

It’s worth mentioning that depending on codec, you might need to set -ss to up to 30 seconds before what you need/want so that you don’t miss any keyframes.

3 Likes

Can you do this for “Level 1 Predictions” Just to see how many of them come true.

2 Likes

I’m not a programmer, but I would love to see this concept used to funnel “Pro Tips” and “Level 1 Predictions” into a Mega-thread style post here on the forum. I have long thought that I would love to keep track of all of them but never had the energy to try and manually record them. You wouldn’t even need to extract the video, you could just search the auto-generated captions. If you wanted to get fancy about it you could provide a youtube-timestamp link for reference. Just some thoughts.

:wink: “Low effort pandering” https://youtu.be/qOthrvBuFcs?t=480

2 Likes

protip: for context, you can full text search the subs directory

Though, feature request: Description or secondary output:

  • timestamp all the cuts
  • the sentence of the phrase being searched in quotes
  • a link to the video with t=360 parameter in the link.

@compose Adding timestamps in the description is a great idea! I also thought it would be cool to add date and episode titles to the clips…and put them in chronological order!

1 Like

Today on level1: pro criminal tip

…feature request… allow delta updates — instead of generating supercut, get new text (youtube-dl --download-index + move old files out, or there was something-get-video-ids-to-download, and keep a list yourself) and videos, and parts. Either:

  • append to existing video
  • don’t combine at all (yt channel/playlist of 10s videos of ‘level1 pro tips’)
1 Like

order of dates: yeah I noticed the mic quality going all over thr place… felt off

yes


alt text: lttstore.com

2 weeks later

pro insanity tip ‘pay 0.01 per minute downloaded supercut service’