Live data from Hacker News

Automatic supercuts on the command line with Videogrep

lav.io

31–40 of 60 posts

Re: Automatic supercuts on the command line with Videogrep

#32
post #28

Hi Sam, I'm big fan of your work! Coincidently, I just made a simple POC video editor by editing text using this speech to text model https://huggingface.co/facebook/wav2vec2-large-960h-lv60-sel... . It might be cool to integrate into your Videogrep tool, it also works offline with CPU or GPU, and gives you timestamps for word or character level. https://twitter.com/radamar/status/1528660661097467904

Thank you! I will definitely take a look at that - looks great.

Re: Automatic supercuts on the command line with Videogrep

#33
post #14

This is awesome! I’ve considered building something nearly identical over the years, as I’ve definitely used VTT files to aid in searching for content to edit, but never did because getting all the FFmpeg stuff to work made my head hurt. I’m so glad someone else has done the hard work for me and that it’s been documented so well! Love this.

Thank you! And it's using moviepy to make the cuts (which is technically speaking the actual hard part).

oh awesome! Very, very cool!

Re: Automatic supercuts on the command line with Videogrep

#35
great project! since it relies heavily on subtitle files, and as an alternative to generating your own, which websites would you recommend to find subtitles for videos which are not on youtube i.e. movies and series? preferably ones with ratings systems similar to guitar tabs websites - I can envisage a musical similarity in the variance and quality of user-submitted content e.g. timing, volume, tone, punctuation, expression, improvisation, etc. since I doubt many are composed from the actual scripts. I have never used vosk so am also wondering whether it would be quicker and more reliable than filtering and spot checking say a few subtitle files per video

Re: Automatic supercuts on the command line with Videogrep

#36

The YouTube video linked in that post ( https://www.youtube.com/watch?v=nGHbOckpifw ) is probably the most hilarious thing I'll see this week. Thank you for sharing that. Also is Zuckerberg for real? Half of those snippets look like it is a NPC from from a game. ¯\_(ツ)_/¯

It's certainly an interesting physical experience in the world. In the future I will watch it with some company.

Re: Automatic supercuts on the command line with Videogrep

#37

great project! since it relies heavily on subtitle files, and as an alternative to generating your own, which websites would you recommend to find subtitles for videos which are not on youtube i.e. movies and series? preferably ones with ratings systems similar to guitar tabs websites - I can envisage a musical similarity in the variance and quality of user-submitted content e.g. timing, volume, tone, punctuation, ex…

I just started playing around with the transcription part after seeing this blog post. Consider giving it a try.

I'm not sure how well most subtitle sources will work with this. I don't think they'll generally embed the word timings needed for picking out fragments (just line timings). The blog post mentions it being the case for `.srt` specifically. Not 100% sure, someone with better understanding of the subtitle formats would be able to correct me.

FWIW I'm finding the video transcription to be working quite well (and I even decided to use Japanese-speaking media because I wanted to see how well vosk handles it).

It might be my system, but the transcription is unfortunately a bit slow/single threaded. I quickly added a GNU `parallel` in front of the transcription step to speed up processing an entire season.

Re: Automatic supercuts on the command line with Videogrep

#38
If anyone else decides to give this a try on video files with multiple audio tracks, there doesn't seem to be an easy way to tell it to select a certain track.

I got it working by manually adding `-map 0:2` (`2` being the trackid I'm interested in) when calling ffmpeg.

You'll have to make that edit in both `videogrep/transcribe.py` as well as `moviepy/audio/io/readers.py`.

And I'm not sure how easy adding real support for that would be, considering that moviepy doesn't currently have a way to support it (https://github.com/Zulko/moviepy/issues/1654)

Re: Automatic supercuts on the command line with Videogrep

#39
post #2

WTF is a supercut. ...OK apparently it means cutting a number of parts from the source video containing a given spoken text and joining them together again. Still not sure why you would call that a supercut.

I'm not sure why you're being down-voted. Its not a term I'm familiar with either. Even just a link to the wikipedia article would have improved the post immensely.
Post reply on HN