HismithControl - Hismith Control With Funscripts Support

Funny enough, I attempted to make some personal adjustments to this project last week.

The one that I believe would reduce the barrier of entry is that of the color selection when choosing the blue and green. Instead of having to fidget with the color values, I’d recommend making it like a color picking tool where you just click on the webcam preview where the color is and then being able to adjust the threshold from that to narrow it down as needed.

The other adjustment I couldn’t get to work was making project utilize my phone as the webcam through the DroidCam app but it was having a ton of difficulties with it. I was able to get it to show on Test Webcam after using OBS as a passthru but it wouldn’t work with any of the other tests unfortunately. This is unique for me so not a beneficial adjustment for many others.

The final adjustment I didn’t get to was getting this to work with HereSphere.

Hello. For use phone as webcam i can recommend to use Camo Studio with USB wired connection (less latency then in wireless), but you need to take into account that turned on backlight (or some external Ring Light) with constant web camera focus is mostly required for making it work stable (for correct color selection), also it is very recommended 60fps (for more accurate control) camera at Full HD, also the usb webcam i think will gives less latency between get frame on PC then using phone even by usb connection. Now it mostly working only with modified VLC for support sync in milliseconds (which is very important for accurate work)

I am using cheap web camera similar to “Angetube 1080P 60fps Webcam with Ring Light and Privacy Cover 862Pro”, with Full HD with 60fps with auto fucus (manual focus is also supported by API), but it gives very good results with external Ring Light (but it also has own backlight, as i remember it doesn’t give the same colors stability).


Previously tested also on 2x cheaper web camera with Full HD with 30fps with manual fucus + Ring Light, also worked not so bad.

Regarding color selection, i will try to add such feature.

Just checked on Samsun A72 without external light (but with turned on Flash light, manual focus, manual temperature, 720p 30fps (not 1080p 60fps due to high input lag, especially with higher resolution and frame rate)) in Camo Studio (free version) with USB wired connection, also working not so bad, but results are less accurate, most likely, the reason is large delay between the time of the real frame and the time when this frame was received by the program (the connection is not direct, but through the intermediary program Camo Studio on both the phone and PC)

I will release new program version soon.





Just talked with AI, using smartphone as web camera is fully not recommended.
The reason is End-to-End Latency (real image time and it’s obtain on PC), then higher this value then less possible any correct control, especially on speed 40+.
For comparison End-to-End Latency:
smartphone USB (wire) connection 120–160 ms
smartphone Wi-Fi (wireless) connection 200–350+ ms
Web Camera 1080p 60fps in good case 50–80 (In low light conditions, due to auto exposure, it increases to 100–120 ms)

1 Like

8.00 version was released.
Updated webcams support and hismith control, now smartphones are also supported with USB connection.
Also hismith control now should be more accurate especially with webcams 1080p 60fps.
Added support for selection color ranges in “Test Webcam” (Ctrl or Shift + mouse selection), but you still will need manually adjust colors.

Highly recomended to adjust “webcam_end_to_end_latency” in settings.xml especially if will use Smartphone even by USB connection.
for good Webcam: 50
for Smartphone by USB connection: 120

End-to-End Latency is difference in real image time and it’s obtain on PC, then higher this value then less possible any correct control, especially on speed 40+.

  • Known End-to-End Latency:

    • Smartphone USB (wire) connection 120–160 ms
    • Smartphone Wi-Fi (wireless) connection 200–350+ ms
    • Webcam 1080p 60fps in good case 50–80 (In low light conditions, due to auto exposure, it increases to 100–120 ms)
  • The next statistic was obtain by tests:

    • Smartphone 1280x720 30fps (for decrease End-to-End Latency) “webcam_end_to_end_latency” set to 120
      • average_dif_end_pos: 6 deviation_dif_end_pos: 19
      • average_dif_end_pos: 7 deviation_dif_end_pos: 23
      • average_dif_end_pos: 12 deviation_dif_end_pos: 25
      • average_dif_end_pos: 3 deviation_dif_end_pos: 25
    • Webcam 1920x1080 60fps “webcam_end_to_end_latency” set to 0 (btw, this diff is according by Webcam, but in reality due to End-to-End Latency moves will become about 50-120ms later, so it is highly recommended to set “webcam_end_to_end_latency” as min to 50)
      • average_dif_end_pos: 6 deviation_dif_end_pos: 16
      • average_dif_end_pos: 5 deviation_dif_end_pos: 21
      • average_dif_end_pos: 8 deviation_dif_end_pos: 20
      • average_dif_end_pos: 11 deviation_dif_end_pos: 21
      • average_dif_end_pos: 2 deviation_dif_end_pos: 13
    • Webcam 1920x1080 60fps “webcam_end_to_end_latency” set to 50
      • average_dif_end_pos: 6 deviation_dif_end_pos: 18
      • average_dif_end_pos: 7 deviation_dif_end_pos: 22
      • average_dif_end_pos: 8 deviation_dif_end_pos: 19
      • average_dif_end_pos: 8 deviation_dif_end_pos: 21
      • average_dif_end_pos: 9 deviation_dif_end_pos: 20
      • average_dif_end_pos: 3 deviation_dif_end_pos: 16

9.00 version was released.
Added support to set manual exposure and get webcam end-to-end latency.

IT IS HIGHLY RECOMMENDED TO SET MANUAL WEBCAM FOCUS AND MANUAL WEBCAM EXPOSURE TO ABOUT -7 (BEST VARIANT) OR -6 TO MINIMIZE WEBCAM END-TO-END LATENCY
You can set manual webcam focus (for example to 300) and exposure if it support it by using shown hotkeys in “Test Webcam”, also as change manual webcam focus, exposure and fps (for example to 30 or 60) through settings.xml

It is highly recommended to set “webcam_end_to_end_latency” in settings.xml especially if will use Smartphone even by USB connection
End-to-End Latency is difference in real image time and it’s obtain on PC, then higher this value then less possible any correct control, especially on speed 40+.
You can manually measure real “webcam_end_to_end_latency” by press “Get Webcam End-to-End Latency”.
You will need to use monitor in this case, then higher monitor frame rate then more accurate data will be obtained.

  • Known End-to-End Latency:
    • Smartphone USB (wire) connection 120–160 ms
    • Smartphone Wi-Fi (wireless) connection 200–350+ ms
    • Webcam 1080p 60fps in good case 50–80 (In low light conditions, due to auto exposure, it increases to 100–120 ms)
  • The next statistic was obtain by tests:
    • Webcam 1920x1080 60fps “webcam_end_to_end_latency” set to 50
      • average_dif_end_pos: 6 deviation_dif_end_pos: 18
      • average_dif_end_pos: 7 deviation_dif_end_pos: 22
      • average_dif_end_pos: 8 deviation_dif_end_pos: 19
      • average_dif_end_pos: 8 deviation_dif_end_pos: 21
      • average_dif_end_pos: 9 deviation_dif_end_pos: 20
      • average_dif_end_pos: 3 deviation_dif_end_pos: 16
    • Smartphone 1280x720 30fps (for decrease End-to-End Latency) “webcam_end_to_end_latency” set to 120
      • average_dif_end_pos: 6 deviation_dif_end_pos: 19
      • average_dif_end_pos: 7 deviation_dif_end_pos: 23
      • average_dif_end_pos: 12 deviation_dif_end_pos: 25
      • average_dif_end_pos: 3 deviation_dif_end_pos: 25

10.00 version was released.
Updated algorithm for get hismith position and added Random Video Player to support.

Supported video players

  • This project now supports:
    • Highly recommended: VLC special build - which provides high sync with video do to not only providing video time in milliseconds but it also provides real system time related to it and correct video playback rate, you can find it in the latest artifacts in 3rdParty VLC fork project
    • Random Video Player - is also mostly accurate due to providing video time in milliseconds, but in version 1.64 it has 2 issues and 1 nice to have feature:
      • incorrect reported video playback rate: always report 1
      • it doesn’t always provides correct play/pause state: if set to pause and change video position it can start to play video but still report that it is on pause
      • it doesn’t provides real system time in milliseconds related to video time for make video sync more accurate
    • Standard VLC - you can also try to use standard VLC but be aware that re-synchronization of Hismith moves and video timeline can be ~500-1000 milliseconds and there isn’t any guaranty that it will work correctly.
  • If you will use VLC:
    <vlc>
    	<url>http://127.0.0.1</url>
    	<port>8080</port>
    	<password>1234</password>
    </vlc>
    
  • If you correctly configured VLC you will can check this in Firefox (in my case Chrome doesn’t open it) by using:
    • start VLC and open some video in it (you can pause video)
    • open http://127.0.0.1:8080/requests/status.xml in Firefox or Chrome (it will should ask user and password (in my case empty username field and password: 1234), after provide it will should show VLC statistics data)
  • If you will use Random Video Player:
    • You will need to activate ‘Start timecode server’ in Settings → Sync tab
    • start Random Video Player and open http://127.0.0.1:13579/variables.html in Firefox or Chrome, it will should show video statistic

Ah nice, those issues with RVP sound like they should be not too difficult to fix. @Peanutccino maybe you can take a look at those?

1 Like

11.00 version was released.
Added Here Sphere video player to support and made fixes for video speed rate support.

Supported video players

  • This project now supports:
    • Highly recommended: VLC special build - which provides high sync with video do to not only providing video time in milliseconds but it also provides real system time related to it and correct video playback rate, you can find it in the latest artifacts in 3rdParty VLC fork project
    • Random Video Player - is also mostly accurate due to providing video time in milliseconds, but in version 1.64 it has 2 issues and 1 nice to have feature:
      • incorrect reported video playback rate: always report 1
      • it doesn’t always provides correct play/pause state: if set to pause and change video position it can start to play video but still report that it is on pause
      • it doesn’t provides real system time in milliseconds related to video time for make video sync more accurate
    • Here Sphere - VR video player
    • Standard VLC - you can also try to use standard VLC but be aware that re-synchronization of Hismith moves and video timeline can be ~500-1000 milliseconds and there isn’t any guaranty that it will work correctly.
  • If you will use VLC:
    <VLC>
    	<url>http://127.0.0.1</url>
    	<port>8080</port>
    	<password>1234</password>
    </VLC>
    
    • If you correctly configured VLC you will can check this in Firefox (in my case Chrome doesn’t open it) by using:
      • start VLC and open some video in it (you can pause video)
      • open http://127.0.0.1:8080/requests/status.xml in Firefox or Chrome (it will should ask user and password (in my case empty username field and password: 1234), after provide it will should show VLC statistics data)
  • If you will use Random Video Player:
    • You will need to activate ‘Start timecode server’ in Settings → Sync tab
    • start Random Video Player and open http://127.0.0.1:13579/variables.html in Firefox or Chrome, it will should show video statistic
  • If you will use Here Sphere:
    • You will need to enable ‘Timestamp Server’ in ‘User Settings’->‘Timestamp Server’:
      • turn on ‘Server Enabled’
      • set ‘Update Interval’ to something like 0.1
      • align ‘IP Address’ and ‘Port’ with fields in settings.xml:
      <HereSphere>
      	<ip_address>127.0.0.1</ip_address>
      	<port>23554</port>
      </HereSphere>
      
1 Like

11.50 version was released.
Made fix for better sync with Here Sphere video player.

  • Now webcam_time_diff is same as in case of other video players that should provide better accuracy for Hismith control.
1 Like

12.00 version was released.

Add sync with RVP by current system time in ms and made minor fixes

1 Like

13.10 version was released

HismithControl — Release Notes (v13.10)

This update introduces direct Bluetooth support for Windows, enhances video player synchronization, optimizes multi-threading performance, and fixes critical thread-safety bugs.

:electric_plug: New Features & Connectivity

  • Direct Bluetooth LE (WinRT): Added and updated native support for the “Direct Bluetooth LE (WinRT)” Hismith connection type.
  • P-Core Affinity: Added capability to set thread affinity to P-cores for maximum performance.
  • Single-Instance Guard: Prevented multiple instances of the application from running simultaneously.

:clapper_board: Video & Funscript Sync

  • Funscript Real-Time Time Shift: Added support for dynamic funscript time-shifting on the fly.
  • Random Video Player: Updated and improved synchronization support for Random Video Player.

:gear: Performance & Architecture

  • Threaded Player Status: Moved video player status checks to a separate thread to eliminate UI stutters.
  • Buffered ThreadedCapture: Implemented buffered support for ThreadedCapture.
  • Statistics Update: Refactored and improved the “Get Hismith Statistics Data” mechanism.

:bug: Bug Fixes

  • Qt Thread Safety: Resolved the multi-threading warning: QObject: Cannot create children for a parent that is in a different thread.

The current version, 13.10, controls the Hismith significantly more accurately than version 12.00, and is a whole order of magnitude more precise than version 1.00. It essentially squeezes every bit of potential out of the Hismith machine.
This level of precision was achieved by implementing a direct, high-speed connection to the Hismith via Bluetooth (Direct Bluetooth LE (WinRT)), and moving all core operations into dedicated threads. Camera frames are now read continuously in a separate thread at the maximum possible speed.

Below are my current program settings, which were optimized specifically for my particular Hismith model and webcam setup:
In settings.xml:

 <webcam_end_to_end_latency>62</webcam_end_to_end_latency>
... 
 <funscript_time_shift_ms>-30</funscript_time_shift_ms> 
...
 <speed_change_delay>-1</speed_change_delay> # Automatically sets to 115 based on data generated by running "Get Hismith Statistics Data" (stored in data\speed_statistics_data_*.txt)
...
 <webcam_frame_width>1920</webcam_frame_width>
 <webcam_frame_height>1080</webcam_frame_height>
 <webcam_fps>60</webcam_fps>
 <webcam_focus>300</webcam_focus>
 <webcam_exposure>-7</webcam_exposure>
... 
 <min_search_pos_dif>-10</min_search_pos_dif>
 <max_search_pos_dif>45</max_search_pos_dif>
... 
 <max_allowed_hismith_speed>100</max_allowed_hismith_speed>

To achieve the same high level of Hismith control quality, you will need:

  • A webcam that supports:

    • Full HD at 60fps
    • Manual exposure lock set to -7 (best option for minimal webcam end-to-end latency) or -6 (acceptable)
    • Manual focus lock (critical to keep webcam end-to-end latency stable)
  • External backlight (essential, as the image will be pitch black at exposure -7 without it)

  • Manual calibration of webcam_end_to_end_latency. You can manually measure your real latency by clicking “Get Webcam End-to-End Latency”.

  • Get Hismith profiling data matching your specific machine. Run “Get Hismith Statistics Data” using the exact same hardware setup you plan to use during actual sessions.

  • Before pressing “Start” (highly recommended to perform these steps every time before using the app):

    1. Run “Test Webcam” first to ensure the camera tracks everything correctly and that your fixed exposure and focus are properly locked.
    2. Run “Test Webcam+Hismith” to verify that the Hismith starts up smoothly, tracking is stable, and there are no jumping markers or bad frames.
    3. Run “Test Performance” to make sure your baseline stats look good, aiming for something like this:
    analized_frames:~300 skipped_frames:0 bad_frames:0
    avg_get_camera_frames_fps:~60
    avg_fps_for_get_new_frame_and_speed:~60
    
  • Modify Funscript Time Shift Milliseconds in real time by hotkeys
    The funscript_time_shift_ms setting defines the execution time shift for the funscript. This allows you to align the funscript actions with the video playback in real time using hotkeys.
    In settings.xml:

<funscript_time_shift_ms>-30</funscript_time_shift_ms>
<funscript_time_shift_delta_ms>10</funscript_time_shift_delta_ms>
<hotkey_funscript_time_shift_up>Shift+T</hotkey_funscript_time_shift_up>
<hotkey_funscript_time_shift_down>Shift+G</hotkey_funscript_time_shift_down>
1 Like

14.00 version was released

HismithControl — Release Notes (v14.00)

Updated the Hismith device control algorithm. The control logic now factors in the constraint that speed adjustments occur no more frequently than min_dt_between_speed_changes (defaulting to 100ms). This allows for advanced position prediction and data averaging over this window, meaning higher funscript density yields significantly better results—ideally with a data point on every frame. As a result, segments featuring sharp movements and terminal pauses are now genuinely sharp and pause precisely as intended.

Some other notes:
Now i’m using exposure -6 due to -7 are unstable supported on my webcam.
Later i will provide detailed funscripts examples adopted to HismithControl also as extension for OpenFunscripter for funscript generation for HismithControl.

1 Like

Amazing concept !!

Funscripts examples adopted for HismithControl v1.00