I would like to find scene changes in a video with this command line tool:
Shotdetect is a free software (LGPL) which detects shots and scenes
from a video.
Dependencies are:
sudo apt-get install libavdevice-dev libavformat-dev
libgd2-noxpm libgd2-noxpm-dev
What I did already:
git clone https://github.com/johmathe/Shotdetect.git
mkdir -p build; cd build; cmake -D USE_WXWIDGETS:BOOL=OFF ..
I get this error message (full output):
CMake Error at cmake/FindGD.cmake:112 (MESSAGE):
Could not find GD library
Call Stack (most recent call first):
CMakeLists.txt:85 (FIND_PACKAGE)
I have homebrew installed, but I do not know how to map the dependencies mentioned above to a brew install ...
command.
Is homebrew the way to go? If so, what would be the "install" command?
PS. I am on OS X 10.8.5 with Xcode 5.0.2 and Xcode Command Line Tools installed.
Best Answer
How to compile
Easy version (late 2015)
git clone https://github.com/johmathe/Shotdetect.git
cd Shotdetect
./compile.sh all
build
directory.Old version (up to late 2015)
I found XML output was broken as of 2014-02-11, so I applied these two patches. This might be a hack:
Finally:
The resulting binary is
shotdetect-cmd
.How to use
Here is a sample command that worked for me:
./shotdetect-cmd -i test.mp4 -o outputDir -s 60 -w -v -f -l -m -r -a FOO
Flags explained:
Troubleshooting
On a second install in spring of 2015, shotdetect complained:
I could fix this with
brew reinstall libtiff
.