How to make a script with Motion Tracking

Could be a bad feature selection. Try to select a visible, unchanging feature on the actor’s body.

Also, it’s very easy to lose tracking on the first few frames. After a few frames it learns the feature and stabilizes. If you found it constantly losing target after a second, try initiate tracking at a different frame and see if it helps.

1 Like

I will absolutely be trying it again with your advice! wish the actors I was working with at the moment had a mole or a birthmark I could work with :joy: I was gonna experiment with more than one point as well. Sometimes I wish I could lasso a whole body part for it to track like the magic wand feature in photoshop.

Thank you for the advice falafel! I love your tool and I hope to support you with this anything else you create as a member of the community!

1 Like

mchyxnaaiorxfwrivv made the tool, I merely made this post haha

Awesome tutorial, thanks.

Now when the upper and lower points are not set well, that’s not a problem, distance is OK so you move the whole pack or just upper or lower if you want to exaggerate a bit. What I have problems with is the reverse motion point, its not accurate sometimes off 2 or 3 frames even. What can be the cause? Tracking looks fine when recording.

This is likely a post-processing issue, check your settings for post processing and look at the preview to see if it aligns with your expectations.

You mean when the curve is added into the script? Then I need to check move it right or left a bit? Or before its inserted? After that how do i make it permament? It has another color when inserted but not marked.
Edit: my bad its marked after inserted and it is permanent nothing to do,

Great tutorial, and this is the coolest sh!t ever. I feel like I’m living in the future after scripting frame by frame.


Have you found a way around this? MTFG stops for me also always after same time and there is no change at all in the scene.
Edit: must be something with the file. Converted it to i-frames and doesnt stop suddenly now without visible cause.

Is this good for Blowjob scripts? Maybe just using the one person unsupervised to track the nose/lips and then manually adjust the top and bottom points to get the range correct?

All depends on the scene. If the camera is stationary just do one person. Track nose / lip or any feature that’s always visible.

If there isn’t a small feature that’s visible all the time maybe grab the entire head. It’s going to take more time processing the frame.

A complex blowjob that involves licking will involves more manual adjustment.

Thanks, additional question. How did create those colored block segments in step 1 of this guide?

These are “chapters” feature in OFS. Should be located underneath the heatmap.

It’s useful when there’s need for marking out sections for long films, game cg galleries etc. It doesn’t do much otherwise.

I can’t get this software to work

$ nix run github:michael-mueller-git/OFS
ERROR: Failed to load glad.

On openSUSE Tumbleweed.

@huehuehuebrbr4 I always forget that there are problems with stock nix and OpenGL.

Try this:

nix run --impure github:guibou/nixGL -- nix run github:michael-mueller-git/OFS --refresh
1 Like

I still can’t get this to work. OFS launches but the motion tracker seems to not work at all. Trying

nix run github:michael-mueller-git/Python-Funscript-Editor --refresh

crashes with

Traceback (most recent call last):
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/bin/…funscript-editor-wrapped-wrapped”, line 6, in
from funscript_editor.main import main
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/”, line 6, in
from funscript_editor.api import show_editor, generate_funscript
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/”, line 6, in
from funscript_editor.ui.funscript_editor_window import FunscriptEditorWindow
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/ui/”, line 27, in
from funscript_editor.ui.funscript_generator_window import FunscriptGeneratorWindow
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/ui/”, line 10, in
from funscript_editor.algorithms.trackingmanager import TrackingManagerThread, TrackingManagerParameter
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/algorithms/”, line 18, in
from funscript_editor.ui.opencvui import OpenCV_GUI, OpenCV_GUI_Parameters
File “/nix/store/ydk3n66n2b7qf2yh2qy5kf99dqv43jdx-python3.9-funscript-editor-0.5.4/lib/python3.9/site-packages/funscript_editor/ui/”, line 5, in
import pynput.keyboard
File “/nix/store/xcj5zdp8g3g8k680hhx7bmla1bnrnfyb-python3-3.9.15-env/lib/python3.9/site-packages/pynput/”, line 40, in
from . import keyboard
File “/nix/store/xcj5zdp8g3g8k680hhx7bmla1bnrnfyb-python3-3.9.15-env/lib/python3.9/site-packages/pynput/keyboard/”, line 31, in
backend = backend(name)
File “/nix/store/xcj5zdp8g3g8k680hhx7bmla1bnrnfyb-python3-3.9.15-env/lib/python3.9/site-packages/pynput/_util/”, line 76, in backend
raise ImportError(‘this platform is not supported: {}’.format(
ImportError: this platform is not supported: (‘failed to acquire X connection: Can't connect to display “:0”: b'Authorization required, but no authorization protocol specified\n'’, DisplayConnectionError(‘:0’, b’Authorization required, but no authorization protocol specified\n’))

Try one of the following resolutions:

  • Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly


  1. Could You try the command again. I changed a env var.
  2. If you still getting the error. Give me more details about your system so i can reproduce this. What desktop environment do you use in openSUSE Tumbleweed. (I was not able to reproduce your error with KDE inside VM). What is the output of echo $DISPLAY? Do you have xwayland available?

I want to get into motion tracking scripting. I downloaded what I needed ad such, I’m just confused where I find these boxes or how I create a box to put around the movement.

Is there any chance to make the process faster?
I try to make my first script for myself, and the video is just 2 min 50 sec.
When I start to do this motion track, I’ve got 6fps in the corner, and in a few minutes, the video just shows 38 sec ready.
It is gonna be a long run. And how long it is gonna take if I want to make a longer vidz? (I mean 30-40 min vidz)?

Tracking depends on your computer and what part and what amount of that part you want to trick. Another thing is that a 60fps video takes longer to motion track than a 30fps video for example. Try not do track the whole hip for example, but look for a belly button/mole/something smaller to track that moves according to the fuck motion.

You can also reencode videos to downsize the resolution and fps which will improve tracking a lot. Just know that scripting something at 30fps won’t be exactly compatible with the 60fps version of that video without fixing the 30fps script a little bit.

So to get more performance:

have a lower resolution video of your video
have a lower fps video of your video
track something small (nipple, belly button, moles, nose for example)
get a better computer

1 Like