EroScripts is a community for scripts that sync up interactive sex toys with porn. Learn more.

To discover, download, and help choose what gets scripted, create an account.

EroScripts

Motion Tracking Funscript Generator (Based on Python and OpenCV)

Introduction

A small Python program that use Computer Vision to partially automate the generation of funscripts. You can find a short preview video on mega.

Getting Started

The application has an build in UI. Due to the limitations (mainly on Windows) it is not intended for productive use. Therefore i create a lua script to integrate the tool in Open Funscripter (OFS). If you are new to scripting or have never used OFS before, i recommend to check out Husky’s video series How to script in OpenFunScripter - video tutorial. In Part 3 it explains the installation and usage of this extension. In addition, a step by step installation instruction with pictures is available on GitHub.

You can find the latest release for Windows on the release tab in the Assets section on GitHub.

Config

The application has many configuration parameters which are described in the documentation. The config files in the Windows release version are located in funscript_editor/config directory.

Contribute

The code is on GitHub. If you want to contribute to the project and make it better, your help is very welcome. Currently i don’t have project specific contribution instructions. But as long as the code is clean and the function is useful for the project, I will be very willing to merge your pull requests.

Changelog

  • v0.0.1 - 2021.06.20 - First release
  • v0.0.2 - 2021.06.23 - Adjustments for Windows
  • v0.0.3 - 2021.06.24 - OFS Integration for Windows version
  • v0.0.4 - 2021.06.26 - Adjustments and extensions
  • v0.0.5 - 2021.06.27 - Use new projection method for VR Videos
  • v0.0.6 - 2021.07.03 - Reimplement preview scaling
  • v0.0.7 - 2021.07.04 - Improve change point detection
  • v0.0.8 - 2021.08.01 - Add Settings Dialog
64 Likes

Looking good, thanks :+1:

I am no programmer, but I am always happy to see development in this area - especially funscript generation.

Oh no! Got an Error. Looking forward to Testing this out.

Python3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
\NVIDIA was unexpected at this time.

@ZarackB assume it is about the Windows release version: I think it has something to do with setting the PATH variable. To test this theory it would be helpful if you could post your PATH variable here. I suspect that e.g. quotation marks are included.

Just open a cmd window and type echo %PATH% + Enter and post the output.

If you have some PC experience you can have a look at the file App/Scripts/start_script.cmd where the error should occur. e.g. you could replace the whole script with this:

@echo off
SET "PATH=%PYTHONPATH%\Scripts;%PATH%"
SET "PATH=%CD%\App\mpv;%PATH%"
cd Code && python -B main.py

Unfortunately I can’t test this properly from my side because I use linux as my main system and have windows only in a KVM.

1 Like

Wow, this could be a game changer! I hope this topic gets more traction. I know there are a lot of good devs on this board.

I have Conda installed on my machine (which I believe foolproof sets the Python PATH for you) and the GUI launched fine on my Windows machine.

Took me a sec to realize that it was Ctrl + G to launch the wizard function to select a male and female box but once I get that up it legit tracked both incredibly well. I don’t have my device to test the quality but this could at the very least produce insanely easy rough drafts.

Incredible!

EDIT: How do I get the media play bar (with the play button, seek bar, duration, etc.) to pop up like in your demo vid?

This is awesome News! Great! Do You think You could extend the Algorythm to make a separate Script for x-Movement? that way You could make a Base Script for one of the other Axis for OSR also.

Wow I just had a look to the demo video it’s crazy. I’m actually switching from launch to OSR2+. I’m not an expert in python but I will probably be able to have a look at this and add it to the actual app if no one tried it first. I’m sure that this tool to track static camera scene + manual scripting for more complexe parts will able to create good script really fast. Great job @mchyxnaaiorxfwrivv

1 Like

Same question

If this works, you will be the biggest scripting hero since the creators of JFS and OFS. Are you open to suggestions?

EDIT: I can get it to run, but there is no seek bar UI so I can’t move to different points in the video. This is my commnad line output, if it helps:

Python3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)]
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
‘doskey’ is not recognized as an internal or external command,
operable program or batch file.
qt.qpa.fonts: Unable to open default EUDC font: “C:\WINDOWS\FONTS\EUDC.TTE”

Could that font not opening have something to do with the lack of a seek bar?

@jackb8911 Unfortunately the mouse events are not forwarded to the embedded mpv video player at Windows. I don’t have a good solution for this at the moment. For now, I’ve added a simple workaround to the repository to pass the mouse events from the parent Qt window to the embedded video player, but they don’t work reliably and have dropouts (see github). Therefore the workaround is disabled by default. The easiest solution would be to simply use a Linux operating system.

If you have some programming experience you can also try the OFS integration. This eliminates the need for the player. But for this you have to set up the project in a Python environment, because in the current Windows release version cannot pass command line parameters.

I have a python environment set up on my windows machine, I have no idea how to set this app project up in a python environment, but I’m pretty determined to find out how to do it!

Zero programming skills, no idea how to run this at all, but I’m mighty intrigued. Hoping a more user-friendly version is ready some day!

2 Likes

As what I see if the UI improve a bit to manipulate video and points (for windows in my case) it will be usable really fast. The tracking is already really good. It’s just the video manipulation and script editing that have to improve. Or an easy integration in OFS

Second this. I’ve tested it out without the seek bar and it does great work but is near impossible to use this way. I haven’t been able to figure out how to use the OFS integration/python installation as it stands.

If this project gets an easy integration with OFS, everything about scripting changes from that point onward. It’ll be a whole new world!

Okey I’m working on an hybride script half this tool half frame by frame and I will try to use this tool on this video who have a lot of scene matching with tracking

https://www.porntrex.com/video/673520/czechvrcrazyfetish-e146

working well but I can’t try it actually I have to get an OSR xD

How are you moving through the video without video controls? Tips would be appreciated!

I’m making fo example first part of BJ frame by frame with OFS then export funscript, make a copie of the projet and open it with the tracking tool (this part have to be improved I dont know why but OFS wont open teh script sometimes) then move with the shortcut to the last point on the script (use the tracking until the next position then close and reopen with OFS (this part is strange I have to open the video as a new project each time) make some adjustment on transition between scenes then continue.

Also I have to select all the point generated and move the top points upper and the bottom point lower because they are locked between 80 and 20.