Text based document would be so much easier for this than big clunky Premiere.
---
source: <path_to_video>
---
[<timecode>-<timecode>]
```json
{ optional metadata }
```
...notes...
And can target different render outputs:- Various NLE formats
- Mini web app with playback/live annotations (Maybe even with the capability to edit the underlying file)
- Simple webpage with thumbnails and notes
- An actual annotated supercut(!)
I just might build it!
Ie `videogrep --input *.mp4 --produce "I am a robot"` and will find all the pieces it needs to produce the desired output?
Take this video of my now ex prime minister: https://www.youtube.com/watch?v=aHsFtANY5Ro (little bit of NSFW language)
Love this.
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)
Back in 2011-12, my MFA (poetry) thesis project was a sort of poetic ~conversation between myself, and (selected) poems generated by a program I wrote, using transcripts of Glenn Beck's TV show.
I really, really wanted to be able to generate video ~performances of the generated poem in each pair for my thesis reading (and for evolving the project beyond the thesis). I have to imagine videogrep could support that in some form, at least if I had the footage. (Not that I want to re-heat that particular project at this point).
Great work.
I've used ffmpeg before to chop video bits and merge them before. Mixed results. It'd struggle to cut at exact frames or the audio would go out of sync or the frame rate would get messed up.
I gave up and decided to tackle the problem on the playback side. Like players respect subtitle srt/vtt files, I wish there were a "jumplist" format (like a playlist but "intra-file") that you could place alongside video/audio files, and players would automatically play the media as per markers in the file, managing any prebuffering, etc. for smooth playback.
For a client project, I did this with the Exoplayer lib on Android, which kinda already has an "evented" playback support where you can queue events on the playback timeline. A "jumplist" file is a simple .jls CSV file with the same filename as the video file.
Each line contains: <start-time>,<end-time>,<extra-features>
"extra-features" could be playback speed, pan, zoom, whatever.
Code parses the file and queues events on the playback timeline (On tick 0 jump to first <start-time>, on each <end-time> go to next <start-time>).
I set it up to buffer the whole file aggressively, but that could be improved. Downside may be that more data is downloaded than is played. Upside is that multiple people can author their own "jumplist" files without time consuming re-encode of media.
> "All of the elements of a shot’s mise en scène, all of the non-relational objects within the film frame, are figures of a sort. The figure is the likeness of a material object, whether that likeness is by-design or purely accidental. A shot is a cluster of cinematic figures, an entanglement. Actors and props are by no means the only kinds of cinematic figures—the space that they occupy and navigate is itself a figure"
And the words they say, as seen here.
[1] https://en.wikipedia.org/wiki/Object-oriented_ontology
[2] https://larvalsubjects.wordpress.com/2010/05/03/cinema-and-o...
[3] https://sullivandaniel.wordpress.com/2010/05/02/film-theory-...
Would be cool if it didn't need a .srt file, but that it would scan the audio for a search prase.
Edit: Never mind, I see that you can create transcriptions using vosk!
Also it would be fun if it output a kdenlive project file, so you could easily tweak the boundaries or clip orders.
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.
I hope the subtitles website I am searching for will provide multiple formats and I understand a lot more effort would be required to produce the .vtt with word fragments. running a diff on vosk text and subtitle file text might help to iron out ambiguities
I will at some point try vosk (with parallel!)
Search by text, generated videos of frequent phrases and other meme-worthy sayings from the Sith Lord.
What do you think about that DALE?
Great work, can't wait to try them!
Also is Zuckerberg for real? Half of those snippets look like it is a NPC from from a game. ¯\_(ツ)_/¯
I didn't realise there was a github! You should add a link to your tutorial
https://github.com/antiboredom/videogrep
If I have the time I'll see how I go dipping my toes in the code.