Porn Movie Orgasm Detector 1.0.2 (no compilation needed!)

Selfbondage software and other kinky developments

Moderators: Riddle, Shannon SteelSlave

Post Reply
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Porn Movie Orgasm Detector 1.0.2 (no compilation needed!)

Post by audiointensity »

EDIT: Version 1.0.1: Fixed a subtle bug in the peak finding algorithm. It is now much more accurate.
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:
  1. Windows or any Unix-like operating system with a Bash shell
  2. VLC must be installed on the system.
Setup:
  1. Download the release for Windows or for Debian/Ubuntu (All releases are listed here)
  2. Extract all the files to a folder
How to use it:
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)
Since FFMPEG is used, you can pass pretty much any video (or audio) to the shell scripts. But the C program can be used without the shell scripts, you just have to pipe the right audio to it yourself.

I am looking forward to seeing what you guys do with this! 8)
Last edited by audiointensity on 13 Aug 2015, 21:52, edited 9 times in total.
User avatar
qwerty212
Moderator
Posts: 1064
Joined: 23 Mar 2010, 20:24

Re: Porn Movie Orgasm Detector 1.0

Post by qwerty212 »

:hi:

I have to take a deep look, but thanks for sharing it with us

Greets from Barcelona
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0

Post by audiointensity »

Nice! I don't know how readable the code is right now, though. I might try to improve the code by adding comments and doing some cleanup if it turns out people actually want to work with the code, which would be cool to see.
User avatar
crazy
**
Posts: 98
Joined: 01 Jun 2012, 21:07
Location: Poland
Contact:

Re: Porn Movie Orgasm Detector 1.0

Post by crazy »

Wow, this is so inspiring! Thank you for this! I will most certainly find some use for this orgasm finder 8)

One thing though, in order to compile the C code, I had to change the line 177 to "return -1;", because the compiler complained about non-void function returning void. After quick look at the code, -1 or 0 seemed to be the correct value to return at this point (it's probably an exceptional situation anyway). There's still a couple of warnings, but the program works! :)

I tried it on a couple of files and it seems to identify the orgasm moments of the videos (or at least the points with a lot of screaming) :rofl:

The only problem I couldn't solve yet is that VLC displays some error messages, because it apparently treats some of the timing options as file names (e.g. couldn't open file :run-time=30 and so on). However the run time is correctly set to 30s, so that's only a minor problem.
Those who restrain desire, do so because theirs is weak enough to be restrained.

Create your ritual & train yourself at http://online-stamina-trainer.herokuapp.com
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0

Post by audiointensity »

crazy wrote: One thing though, in order to compile the C code, I had to change the line 177 to "return -1;", because the compiler complained about non-void function returning void. After quick look at the code, -1 or 0 seemed to be the correct value to return at this point (it's probably an exceptional situation anyway). There's still a couple of warnings, but the program works! :)
Nice that it works! Thank you for the feedback. I have fixed the error and the warnings and updated my first post accordingly.
The only problem I couldn't solve yet is that VLC displays some error messages, because it apparently treats some of the timing options as file names (e.g. couldn't open file :run-time=30 and so on). However the run time is correctly set to 30s, so that's only a minor problem.
Hmm, strange... Tried "--run-time=30" etc. instead? That might be more compatible.
JustAnSBnewb
*
Posts: 2
Joined: 23 Jun 2015, 18:41

Re: Porn Movie Orgasm Detector 1.0.1

Post by JustAnSBnewb »

I made some adjustments to the code!
First of, this is probably a mistake

Code: Select all

      if [ ! -e "$VLC" ]; then
         echo "Unable to locate FFMPEG. Install it from http://ffmpeg.org/download.html"
changed $VLC to $FFMPEG

also i modified the C program alittle so it sorts the time before printing.

Somewhere around line 110:

Code: Select all

   int sortedpeaks[N_MOST_PROM];
   for (i = 0; i < N_MOST_PROM; i++) {
      int seconds = (float)peakx[i]/ (num_samp/DOWN_SAMP_RATIO) * (float)num_samp/samp_rate;
      seconds = max(0, seconds -15); // Show timestamp starting a little before peak
      if(VERBOSE) printf("Peak detected at %5d s (%02d:%02d): %5d\n", seconds, seconds/60, seconds - 60*(seconds$
      //else printf("%d\n", seconds);
      sortedpeaks[i] = seconds;
   }
   int j;
   for (i=0; i<N_MOST_PROM; i++) {
        int nextiter = -1;
        int nextiterid;
        for (j=0; j<N_MOST_PROM; j++) {
                if(sortedpeaks[j] == -1) {}
                else if (nextiter == -1) { nextiter = sortedpeaks[j]; nextiterid = j; }
                else if (sortedpeaks[j] < nextiter) { nextiter = sortedpeaks[j]; nextiterid = j; }
        }
        sortedpeaks[nextiterid] = -1;
        printf("%d\n", nextiter);
    }
   return EXIT_SUCCESS;
Overall thank you and sorry for this huge bump.
bootlover1978
*
Posts: 15
Joined: 25 Jun 2015, 05:11

Re: Porn Movie Orgasm Detector 1.0.1

Post by bootlover1978 »

Is there any way to compile this into an exe that could be distributed? I dont have all the needed software to compile this myself. I gave it an honest effort to collect and install it all, but dont have the faintest clue on what Im doing.
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0.1

Post by audiointensity »

JustAnSBnewb wrote:I made some adjustments to the code!
First of, this is probably a mistake

Code: Select all

...
changed $VLC to $FFMPEG

also i modified the C program alittle so it sorts the time before printing.

Somewhere around line 110:

Code: Select all

...
Overall thank you and sorry for this huge bump.
Thanks for the feedback, JustAnSBnewb! I've fixed the typo and added sorting before outputting the timestamps. I would have incorporated your code if I hadn't remembered that qsort is actually included in stdlib.h! I couldn't be arsed to sort the timestamps before because VLC doesn't seem to care about the order anyways. But if anybody needs it sorted then it shall be sorted, dammit! :whip: :D
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0.1

Post by audiointensity »

bootlover1978 wrote:Is there any way to compile this into an exe that could be distributed? I dont have all the needed software to compile this myself. I gave it an honest effort to collect and install it all, but dont have the faintest clue on what Im doing.
Sure, I can do this if a lot of people want it. I might even make a bundle with all the required software to make it super easy to get it working. :idea:
Then it would be a simple matter of downloading a zip file, extracting all the files somewhere and possibly installing VLC if it is not already installed. I have started a poll about this and would appreciate of anybody would vote in it! :)
bootlover1978
*
Posts: 15
Joined: 25 Jun 2015, 05:11

Re: Porn Movie Orgasm Detector 1.0.2 (with POLL running now!

Post by bootlover1978 »

Already voted! Lol!
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0.2 (with POLL running now!

Post by audiointensity »

And now the poll is over! Since the results are overwhelmingly clear, I will get right to work with distributing the Windows binaries to you guys. I will also distribute binaries for Debian/Ubuntu but Mac OS is unfortunately outside of my technical abilities (I don't have a computer with a fruit on it :P ). If a kind Mac owner would like to compile and distribute Mac OS binaries for the rest of you, they are welcome to do so.

I will likely move the source code above to some better place, perhaps GitHub, for those of you who are still interested in that. :D
rarkon
*
Posts: 2
Joined: 23 Sep 2014, 05:27

Re: Porn Movie Orgasm Detector 1.0.2 (no compilation needed!

Post by rarkon »

Thank you for all your hard work. I'm having some issues with it though. When I drag and drop a video file over audiointensity.bat a command prompt window appears with the message "'audiointensity' is not recognized as an internal or external command, operable program or batch file. Then VLC open and no video plays. I'm sure I have FFMPEG and GNU Compiler Collection installed. Any help would be greatly appreciated.
audiointensity
*
Posts: 10
Joined: 31 Jan 2015, 19:56

Re: Porn Movie Orgasm Detector 1.0.2 (no compilation needed!

Post by audiointensity »

Thanks for the feedback, rarkon!
I've fixed that problem now. Here is the new Windows version that hopefully works better.
rarkon
*
Posts: 2
Joined: 23 Sep 2014, 05:27

Re: Porn Movie Orgasm Detector 1.0.2 (no compilation needed!

Post by rarkon »

Thank you so much. Works like a charm now.
Post Reply