EDIT: Version 1.0.2: Added sorting of peaks before output + printing the current status during decoding + fixed a typo in the Bash script. Thanks to JustAnSBnewb for that.
EDIT 2015-08-09: Made pre-compiled binaries available for Windows and Debian/Ubuntu. Moved source code to GitHub.
I spent a few hours writing this program that analyses the sound from a movie, finds the points of highest sound intensity (supposedly during climax) and automatically plays the video from those points. It uses some simple hand-written digital signal filters and peak finding algorithms; no external libraries. It requires GCC, FFMPEG and VLC to be installed on your computer. It can be compiled and run on Windows or any Unix-like OS.
Requirements:
- Windows or any Unix-like operating system with a Bash shell
- VLC must be installed on the system.
- Download the release for Windows or for Debian/Ubuntu (All releases are listed here)
- Extract all the files to a folder
See here
What it does:
When running it, it will take some time (seconds to minutes depending on your computer and the size of the video) before anything happens since FFmpeg has to convert the movie audio to WAV before sending it to the program. VLC will then start. It will jump to a time a little before the highest audio intensity (orgasm?), play for 30 seconds and then switch to the time of next-highest audio intensity and so on, up to 5 different points. The program works as expected if you give it several movies, processing and showing them in-order.
The source code is available here.
If you look through the code, there are some things that are easy to tweak:
- The minimum distance between detected points in each video. The default is 30 seconds (defined in the beginning of main() in audiointensity.c)
- The number of detected points in each video. The default is 5 seconds (defined in the beginning of main() in audiointensity.c)
- The time spent on each point before jumping to the next. The default is 30 seconds (defined as run-time in the argument list to VLC in the shell script)
I am looking forward to seeing what you guys do with this!