Python Funscript Editor
Introduction
Simple Funscript Editor written in Python with an motion tracking add-on to partially automate the generation of funscripts for static video scenes like VR Videos.
Getting Started
OpenFunscripter (OFS) from @gagax123 is currently the best tool to create funscripts. Therefore i create a lua script to integrate the Motion Tracking Funscript Generator (MTFG) Add-On into OFS. If you are new to scripting, i recommend to fist check out @Husky’s video series How to script in OpenFunScripter.
Once you are familiar with the basic functions of OFS you are ready to install the MTFG Add-On. To get started using the Add-On, I recommend reading the following articles:
MTFG Installation
Contribute
The code is on GitHub. If you want to contribute to the project and make it better, your help is very welcome. This also includes instructions and howtos to help other users.
Changelog
v0.0.x
- 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
- v0.0.9 - 2021.09.10 - Add supervised Tracking
v0.1.x
- v0.1.0 - 2021.10.30 - Add OFS Extension Installer
- v0.1.1 - 2021.10.30 - Fix v0.1.0 for Windows.
- v0.1.2 - 2021.11.03 - Fix Logging
- v0.1.3 - 2021.11.03 - Remove delayed tracking lost
- v0.1.4 - 2021.11.03 - Fix tracking lost cause freeze
- v0.1.5 - 2021.11.04 - Unlock all Video Projections
- v0.1.6 - 2021.11.13 - Improve processing speed
- v0.1.7 - 2021.11.24 - Persistent Settings Dialog
v0.2.x
- v0.2.0 - 2022.02.06 - Add supervised ignore tracking
- v0.2.1 - 2022.02.17 - Fix Projection names with brackets
- v0.2.2 - 2022.02.25 - Add low resolution VR-Videos Support
- v0.2.3 - 2022.03.07 - Fix “to many open files” in OFS lua extension
- v0.2.4 - 2022.03.19 - Increase default FFmpeg timeout
- v0.2.5 - 2022.04.20 - Improve prediction for fast actions
v0.3.x
- v0.3.0 - 2022.06.08 - Add Multiaxis output
- v0.3.1 - 2022.06.09 - Fix error in distance minimization algorithm
- v0.3.2 - 2022.06.27 - Improve roll prediction
- v0.3.3 - 2022.07.16 - Code Freeze for OFS 1.4.4
v0.4.x
- v0.4.0 - 2022.07.16 - First Release for OFS 2
- v0.4.1 - 2022.08.15 - Improve MTFG Lua wrapper script
- v0.4.2 - 2022.12.23 - Add OFS3 support to the installer
v0.5.x
- v0.5.0 - 2023.01.13 - Interactive Post Processing Menu
- v0.5.1 - 2023.01.22 - Option to re-import with different post processing parameter
- v0.5.2 - 2023.06.11 - Add
distance
metric to multi-axis menu
- v0.5.3 - 2024.01.28 - Open post processing window maximized
- v0.5.4 - 2024.02.04 - Persistent Post Progressing UI Parameter
224 Likes
I am no programmer, but I am always happy to see development in this area - especially funscript generation.
1 Like
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.
1 Like
@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
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
1 Like
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
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.