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:
This is pretty slick. Really brightened up my afternoon
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?
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!
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.
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.
@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!
…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’)