This project is trying to fully reproduce described movements in funscripts by Hismith (not only speed) with video synchronization in VLC video player.
After all steps required for it to work you will need only Start application and it will automatically detect what video do you play in VLC and execute related to it funscript with related scene synchronization.
To be able to do this it uses computer vision with using your Web Camera which tracks Hismith rotation (angle position at each moment) and tries by manipulation with speed changes to achieve all required movements.
For this moment it has very good results when speed is not too high, especially in slow movements (it can track very good all changes). In case of high speed 3-4+ strokes per second now it also has not so bad results.
For minimize complexity of used computer vision algorithms, also as for increase accuracy and speed for making decision, it use color markers which you will need to place on Hismith (more details below)
What is required for its work
You will need:
Hismith with remote control support + Web Camera + backlight (Ring Light as very good solution) + PC + Add color markers to Hismith (which will be tracked)
I see a man of culture as well, cheers for the contribution! This community is like 99% made for the Handy, which kinda sucks tbh… so seeing more people willing to create stuff for fuck machines makes me happy!
Though… i can’t help but notice that it’s all vastly more complex for kinda diminishing returns. A purely rotary drive machine like the Hismith and others in the price range will never be able to control depth to the speed and precision of servo drives or linear motors. While I appreciate the hard work and effort you went through to create this, I don’t really know how many people will have both the hardware and patience required to make this work properly.
Especially when running at higher speeds, say 3-4 hertz rotations on the machine, you will most likely need at least 60fps of image processing to get smooth position tracking results. And there’s quite a bit of extra stuff you need to procure to get it to work well as you described.
I would offer a counter-argument in the form of my own extension for OFS (which i will be also turning into a python app at some point).
It effectively does all that processing beforehand by analyzing the whole script. And it lets you modify it quickly afterwards as it is an OFS extension. Which makes it a lot safer because you will know what to expect when you eventually run it on the machine. And it requires zero additional hardware, and works with all other rotary machines. I made a nice GUI for it that allows you to make separate profiles for your machines, all it needs is a few initial measurements of the device in operation to get a pretty good linear approximation of its power-to-timing curve.
I don’t mean this in a competitive way or anything like that, i just feel the need to give people more choices in this space. Ultimately the goal is to automate as much of this work as possible so that we can spend more time fucking our brains out in sync with videos
1.10 version was released. It is more accurate now. Also it can automatically generate required current device statistic data for automatic control of device.
In most cases now it has very close to zero deviation from what it should be:
Updated support for cases when video time was jumped forward or backward.
Made fixes with zero devision checks.
Made fixes for get hismith position.
Made fix when sporadically get incorrect video time from VLC.
New feature “Modify Funscript Functions”:
You can use this option for get better experience on simple moves.
In most cases funscripts use simple patterns for “in”(going inside) and “out”(going outside) moves without details how to make it (without additional points inside such moves).
In case of turn on this feature (“Use Modify Funscript Functions” CheckBox) it will automatically replace such simple moves by adding additional move detail points inside moves.
More details in link to project or in README.md file.
New feature “Check Funscript”:
Now by this feature you can check funscript file directly on “Min Funscript Relative Move” presense.
Min Funscript Relative Move - is used for modify funscript actions, if move change from up to down (or vice versa) according funscript are lover then “Min Funscript Relative Move” it will try to find the first next move with which min to max positions will be >= “Min Funscript Relative Move” if such found it will combine from min to max all actions with averaging values in move. For more details which actions was averaged you can see in “res_data!results_for_get_parsed_funscript_data.txt”
Also program save result parsed funscript to “res_data” folder with same name as original file used.
To minimize risks I have initially set “Hismith Speed Limit” to 50 (50%) by default, but you will get less good experience in this case.
You can simply play video with turned on program for check how it work or use OpenFunscripter GitHub - OpenFunscripter/OFS: A tool to create funscripts to check script on high intensity moves. For get max good expirience but wholly on you risk it is recommended to set “Hismith Speed Limit” to 100 (100%) and try to use with turned “off” and “on” (both variants) “Use Modify Funscript Functions” CheckBox but don’t forget to check on each scene before usage
Made fix for more accurate device start to run and better sync work with VLC.
Add visualization for Modify Funscript Functions.
Add support to define relative pairs for “Functions move in/out” (with multiple preset variants which can be switched by hotkey during run) for “Modify Funscript Functions”.
You’ve been working on this for over half a year now, is there any way you could upload/link to one or more demo videos where you overlay a regular video recording of the machine with a funscript graph view from a player and maybe also a view of the debug overlays (so what is identified and an output speed% graph?
Like I own a hismith and I would be interested in seeing what this program is capable of when hooking it up with my machine, but but it’s not like it’s a plug and play thing, the setup process seems quite laborious and it’s likely a reason why this post hasn’t been getting much attention.
ok, now that’s more like it! And yeah i can definitely see the potential of this. Just a shame that Hismith doesn’t include a rotary encoder in their motor and exposing that data over their protocol. It would have made this a lot less of a hassle to setup. But yes i may end up trying this after all.
I assume it cannot move backwards no matter what right? Which would mean that it must complete revolutions to resynchronize on parts where the thrusting is not as steep (or you just limit it probably with that min value i saw in the GUI).
I would have one lingering question though: does it require specifically VLC? Or would it be feasible to make it connect through MultiFunPlayer instead? that way i could use a whole number of other players. I also believe the MFP recently added community plug-in support, so if you need some metadata from the player you may be able to get it by interfacing with MFP instead. That would really open this up as a possibility for me.
On the side, I am an embedded developer, albeit a bit rusty with cpp since i’ve been working with mainly python and Simulink for my day job. But I may be able to help out with this. I would love to see how it controls on higher speeds too, like if it manages to maintain sync and responsiveness at speeds of 50-100%. naturally you don’t feel those differences nearly as much on your body, but still just a fun thing to observe i guess.
It try to set speed to 0 before it shoud stop according funscript. It always tring to predict what speed to set for get related angle to funscript. BTW any whole move forward+whole backward no matter what size it (5% or 100%) it treat as 360 degree rotation, so fore prevent to get 100% (maximum) speed on stroking or vibrations now in setting is set min funscript relative move to 20, so it will combine multiple moves in this case to single. For understand what finally funscript it will really use (especially when it merge some moves or you decided to use modify funscipt functions) you can check generated funscript in res_data folder.
Also you can use Check funscript button to check funscript, it will show does it modify it or not due to found small moves.
For this moment it is tested only with VLC, special build allow more accurate sync (in miliseconds not in seconds) with video, but it should work also on standard VLC but with less good experience.
It is possible that other players will be supported, doesn’t checked, it use similar way for sync with video player as MultiFunPlayer.
I don’t see the way how it can be integrated to MultiFunPlayer, the steps which it do very depends from what web camera detect (real machine position), what should it has (machine position) at this moment according video, what real rotation speed now machine has (not what was set by Intiface Central API) and etc.
Also for accuracy it is very important that Video Player will return current video time in miliseconds (not in seconds).
Some important note: if you change time in video and set max allow speed to 100, be aware to pause video (+pause device) and got Ready message before unpause, some times it start too fast due to freeze and etc, i’m still working on this (or check it not on 100% stroke length).
If you have some special video player which you use with MultiFunPlayer i can try to enable its support early then others.
Highly recommended to use some remote controller on which you can map keyboard hotkeys, i’m using Xbox Wireless Controller for PC + JoyToKey
Be aware to stop Hismith by power button or hotkeys to stop running.
Due to different reasons like computer freeze or “Intiface Central” lose Hismith device or “Funscript - some of which has very fast stroking or vibration simulations on scenes where they are totally missed or not”.
If you are not sure about script or fear to get injury you can limit max speed in program by changing “Hismith Speed Limit” in GUI also recommend to minimize stroke length in this case. So I highly recommend checking each scene before usage especially with using “Check Funscript” button for check on “Min Funscript Relative Move” (more details below in separate topic).
Also sometimes it start too quick during video navigation, especially if you moved to intensive part of scene without pause video and HismithControl. So i recommend to pause video and pause HismithControl (“Pause Run” hotkey) before navigation on video.
Min Funscript Relative Move
It is used for modify funscript actions to increase safety in cases of very fast stroking or vibration simulations on scenes where they are totally missed or not.
If move change from up to down (or vice versa) according funscript are lover then “Min Funscript Relative Move” it will try to find the first next move with which min to max positions will be >= “Min Funscript Relative Move” if such found it will combine from min to max all actions with averaging values to single move (with trying to save internal move details).
For more details which actions was averaged you can see in “res_data\!results_for_get_parsed_funscript_data.txt”
You can get list if modified actions by using “Check Funscript” button by providing path to funscript or video file to which it is related.
Program save result parsed funscript to “res_data” folder with same name as original file used.
Then higher value for “Min Funscript Relative Move” is used then result used modified funscript will be safer but less accurate. I can recommend to set it to 20-30 but check which moves were changed by “Check Funscript” button.