A gif of the terminal running videogrep

I’ve followed the #ds106 daily create for quite a few years now. The other day the invite was to use PlayPhrase

PlayPhrase will assemble a clip of movie scenes all having the same phrase, a small supercut if you will.

The results are slick and amusing.

I remember creating a few Supercuts using the amazing Videogrep python script. I thought I’d give it another go. I’ve made quite a few notes on using Videogrep before, but I think I’ve smoothed out a few things on this round. I thought I might write up the process DS106 style just for memory & fun1. The following brief summary assumes you have command line basics.

I decided to just go for people saying ds106 in videos about ds106. I searched for ds106 on YouTube and found quite a few. I needed to download the video and an srt, subtitle, file. Like most videos on YouTube there are not uploaded subtitles on any of the ds106 videos I choose. But you can download the autogenerated subtitles in vtt format and convert to srt with yt-dlp. The downloading and subtitle conversion is handled by yt-dlp2.

I had installed Videogrep a long time ago, but decided to start with a clean install. I understand very little about python and have run into various problems getting things to work. Recently I discover that using a virtual environment seems to help. This creates a separate space to avoid problems with different versions of things. I’d be lying if I could explain much about what these things are. Fortunately it is easy to set up and use if you are at all comfortable with the command line.

The following assumes you are in the terminal and have moved to the folder you want to use.

Create a virtual environment:

python3 -m venv venv

Turn it on:

source venv/bin/activate

Your prompt now looks something like this:

(venv) Mac-Mini-10:videos john$

You will also have a folder venv full of stuff

I am happy to ignore this and go on with the ‘knowledge’ that I can’t mess too much up.

Install Videogrep:

pip install videogrep

I am using yt-dlt to get the videos. As usual I am right in the middle when I realise I should have updated it before I started. I’d advise you to do that first.

You can get a video and generate a srt file form the YouTube auto generated:

yt-dlp --sub-lang "en" --write-auto-sub -f 18 --convert-subs srt "https://www.youtube.com/watch?v=tuoOKNJW7EY"

Should download the video, the auto generated subtitles and convert them to a srt file!

I edit the video & srt file names to make then easier to see/type

Then you can run Videogrep:

videogrep --input ds106.mp4 --search "ds106"

This makes a file Supercut.mp4 of all the bits of video with the text ‘ds106’ in the srt file.

I did a little editing of the srt file to find and replace ds-106 with ds106, and ds16 with ds106. I think I could work round that by using a regular expression in videogrep.

After trying that I realised I wanted a fragment not a whole sentence, for that you need the vtt file: I can dowmnload that with:
yt-dlp –write-auto-sub –sub-lang en –skip-download “https://www.youtube.com/watch?v= tuoOKNJW7EY”

Then I rename the file to ds106.vtt delete the srt file and run

videogrep --input ds106.mp4 --search "106" –search-type fragment

I shortened ds106 to 106 as vtt files seem to split the text into ds and 106.

I ended up with 4 nice wee Supercut files. I could have run through the whole lot at once but I did it one at a time.

I thought I could join all the videos together with ffmpeg, but ran into bother with dimensions and formats so I just opened up iMovie and dragged the clips in.

at the end close the virtualenv with deactivate

reactivate with

source venv/bin/activate

This is about the simplest use of videogrep, it can do much more interesting and complex things.

  1. I am retired, it is raining & Alan mentioned it might be a good idea. ↩︎
  2. I assume you have installed yt-dlp, GitHub – yt-dlp/yt-dlp: A feature-rich command-line audio/video downloader. As I use a Mac I use homebrew to install this some other command line tools. This might feel as if things are getting complicated. I think that is because it is. ↩︎

Replied to The Daily Create (@tdc@social.ds106.us) (ds106 Social)
Here is today's #dailycreate #tdc4198 #ds106 Show us your growlery! https://daily.ds106.us/tdc4198/ Reply with your response and the same tdc**** hashtag

A screenshot of the webpage
Kilpatrick Walks
Some trails layered on a map

 

Is the best place for me when I am grumpy.

@tdc

pi.johnj.info/kilpatrick/

Is the best place for me when I am grumpy.

Ardinning loch winter afternoon. Dark clouds, light silhouettes trees and reflects on the loch.

Today’s #DS106 challange is worth more than a tweet. #tdc4124 #ds106 Is today the day it all breaks? | The DS106 Daily Create

If Twitter switch off the old version of its API, then some of the functionality of the Daily Create will break today. See Cogdog’s blog for an explanation.

This sucks. It really sucks. As Alan says, life will go on. But just in case it doesn’t, make something, DS106 style, that expresses how sucky this really is.

The twitter API has, over the years, enabled a lot of wonderful things. In my opinion none more so that the #DS106 #DailyCreate. This provides simple daily creative prompts, but more importantly it pulls responses together onto its WordPress Home. I imagine Alan especially feels this pain. He has tirelessly kept this up and running and helped other use the technology elsewhere (the Daily Stillness is one I love).

There may be a silver lining, the slim chance that there is an increase in open, shares and self owned streams, open protocols and interop may increase, or even flourish. Mastodon is growing, I hope RSS does too.

Featured image, my own.

Replied to #tdc4067 #ds106 Verify that you’re not a robot- V2 by ReverendReverend (daily.ds106.us)

The first reCAPTCHA was simply checking a box or retyping a word. They’ve had to improve the technology to keep ahead of the scammers, bots and other nefarious digital villains out there. Need a laugh after a frustrating day on the web? Check out this YouTube video,”Verifying that you’re not a robot“, a hilarious personification… Read more »

Not a robot #tdc4067 #ds106

Gif of kung fu fighter punching through google captcha

I took an old gif I made back in 2014 and added the captcha frame.

Interesting dilemma, Thinking about moving to #ds106 https://social.ds106.us. It seems moving mastodon servers is not that difficult. I think you lose old posts but since I’ve POSSED some from my blog it is not a problem. Alternatively the ActivityPub WordPress plugin turns your blog into a member of the fediverse. The is attractive, but I am not sure how much understanding & work is needed. Or I could stay on mastodon.social

Replied to The GIF Is on Its Deathbed by Aaron DavisAaron Davis (collect.readwriterespond.com)
Kaitlyn Tiffany reflects on the demise of GIFs. She discusses the embarrassing nature in which particular GIFs are used on repeat. In addition to this, the MP4 format is a lot smaller. Ir is interesting to look back on when I presented on GIFs as a form of quick makes.

Hi Aaron,
Thanks for this link, your pull quote is perfect. As a recovering gif masochists it really struck a chord. I never aimed for perfection just some strange self imposted notion around file size. I blame #DS106 for my may years of gif-addiction.

I don’t know if I’ll every break completely free, yesterday an image on my camera roll cried out for giffing. The modern way, an iOS shortcut resulted in a 2.2MB monster. After a fair bit of command line, with Eddie Kohler’s gifsicle, I eventually opened an older version of Mac os on parallels that could run FireWorks to to squash it to 448KB.

Although making gifs is redundant & silly, it has given me so much fun over the years and I like to feel taught me a lot.