No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 101 commits behind antiboredom:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tools
.gitignore
LICENSE
README.md
search.py
silence.py
videogrep.py

README.md

Videogrep

Videogrep searches through dialog in video files (using .srt subtitle tracks) and makes supercuts based on what it finds.

##Requirements Clone this repository, and then install pattern and moviepy.

pip install pattern
pip install moviepy

Install ffmpeg. If you're on a mac with homebrew you can install ffmpeg with:

brew install ffmpeg

You may need to change the path to your installation of ffmpeg by modifying the first line of videogrep.py:

FFMPEG_BINARY = '/usr/local/bin/ffmpeg'

##How to use it The most basic use:

python videogrep.py --input path/to/video_or_folder --search 'search phrase'

###Options

videogrep can take a number of options:

####--input / -i Video or subtitle file, or folder containing multiple files

####--output / -o Name of the file to generate. By default this is "supercut.mp4"

####--search / -s Search term

####--search-type / -st Type of search you want to perform. There are three options:

  • re: regular expression (this is the default).
  • pos: part of speech search (uses pattern.search). For example 'JJ NN' would return all lines of dialog that contain an adjective followed by a noun.
  • hyper: hypernym search. For example 'body parts' grabs all lines of dialog that reference a body part

####--max-clips / -m Maximum number of clips to use for the supercut

####--test / -t Show the search results without making the supercut

####--randomize / -r Randomize the order of the clips

####--padding / -p Padding in milliseconds to add to the start and end of each clip

##Samples