I want to reduce the amount of work I must do in order to use a new funscript. I present here a Python script that can be ran against a funscript and:
- Delete all actions points when the interval between points is under a specified time
- Attempts to detect and replace vibration patterns
- Reduces all movements to under a specified speed
My use case is that I use the Handy in Bluetooth mode and many great funscripts appear to lose sync on my device due to hardware and software limitations. My aim is to take some of the experience I now have at manually converting funscripts to make them a more compatible experience with the Handy and automate some/all of that work. I believe I have succeeded at creating converter of sorts that others might also find useful. It can be used either as-is to convert funscripts which were designed for more powerful hardware or, maybe someone would find it useful as a starting point to modify funscripts manually (similar to how I’ve used https://funscript.io).
Examples
Before:
After:
Before:
After:
I’ve put thought into preserving sync and only changing things which are incompatible. Further improvements can be made and if I do that, I’ll post them here.
Usage:
. ‘python handy_BT_limiter.py .funscript <speed_threshold>’
. Example: python handy_BT_limiter.py howgood.funscript 495
Or: python handy_BT_limiter.py howgood.funscript
which defaults tp a speed of 500
$ python handy_BT_limiter.py 'Sunfanart - Dress up Darling - Marin riding Gojo.funscript'
Usage: 'python handy_BT_limiter.py <file>.funscript <speed_threshold>' (defaults to 500)
Example: python handy_BT_limiter.py howgood.funscript 495
No speed indicated, so defaulting to 500
664 action points removed
423 action points modified to vibrate
0 action points modified to reduce speed
Creating backup: Sunfanart - Dress up Darling - Marin riding Gojo.funscript.bak
Writing modification to: Sunfanart - Dress up Darling - Marin riding Gojo.funscript
Done
I’ve tested a number of scripts with the Handy in BT mode and I’m pretty happy with the results. I now have this script running with my video player frontend (Kodi) so all scripts are checked before video playback. From reading other posts, I’d guess that other devices like the Keon might also benefit (some of the numbers in the script would likely need to be tweaked).
Tested with Python 3.
Download v1.0 (rename to .py):
handy_BT_limiter.py.txt (8.4 KB)