Search videos for matching words or phrases, and generate a cut-down version in the
~/videogrep_output/ directory, containing only the matching dialogue.
For example, keep only the bits of a video where people say "banana".
---
Dependencies
bash - it's a bash script
egrep - for finding matches in the subtitles
ffprobe for getting video information like dimensions, aspect ratio (in FFMPEG package)
bc - for calculating accurate video frame rates
mencoder - for creating the generated video
mplayer - for playing the generated video
---
Usage:
Code: Select all
videogrep.sh <video-file> <search-term> [padding-start] [padding-end]
Video requirements
Put the videos you want to search, and their subtitle files, in a directory together.
The source videos must have accompanying subtitles files, in either .srt or .sub format!
The subtitle file names must also match the videos to which they refer.
Here's a valid example (videogrep will find the subtitles OK):
Code: Select all
./some_vids/my-cool-video-1080p.mp4
./some_vids/my-cool-video-1080p.srt