Motion Tracking Funscript Generator v0.5.x

It sounds to me like you copied the lua file to the wrong folder.

But you could be one of the first to try my new installer. This should make installing the application even easier. Yo can download the installer from the new Release v0.1.1. For detailed installation instructions, have a look at Installation Windows Option 1 in the documentation.

The installer is unfortunately not yet tested so a feedback would be helpful. If there are any problems, a screenshot would be great.

Addendum 1: The current version sometimes does not seem to recognize when the generator has ended because a thread is still running. Workaround is to end the process with the task manager. - So i recommend to wait with the update to v0.1.0 until this was fixed.

Addendum 2: fix is available, new version is v0.1.1

3 Likes

I will try this out, i spent 3 hrs trying to fix this lua probelm and maybe this is soultuon. Thanks

I followed Windows Option 1 instructions and when I got to the “Start MTFG” it shows me this message.
Funscript generator error:
Video File was not specified! (Make sure there are no special symbols like squared brackets in the video path)

I think my earlier steps fixed a different error I was getting. This info from the troubleshooting section on the github page will give you better help.

" When calling the generator, only a message box is displayed with the message: “Video file was not specified!”

In some cases OFS does not set the path to the video file within the lua script correctly (the variable VideoFilePath is empty). This happen when the video path contains some special character like square braked [ and ]. Rename your video files and store them in a path without special character. Then the variable should be set by OFS and the motion tracking funscript generator should work."

1 Like

If you still have this problem could you post the output of: ofs_troubleshot_001

Anyone experiencing a freeze of the generator when it looses tracking of any of the tracking marks? I’m using the latest OFS and the generator downloaded through the exptension downloader. I can repro it 100% as it freezes every single time a tracker is lost. Didn’t find any references to this through a search or by browsing the documentation.

The extension log output doesn’t print out anything at the moment the freeze happens. Only when I have to force close the generator window, the log prints out:

[Funscript Generator Windows]: funscript generator completed import result
[Funscript Generator Windows]: Funscript Generator output file not found

But I doubt this tells much anything other than importing the data from the generator failed.

@lewd_animator Thank you for the feedback. Unfortunately I can not report the problem on my side. I have created a new version in which I have removed a problematic function (delayed tracking lost). The version now has a button to open the log output of MTFG (after you have try to run the program the button should appear).

log

It would be helpful if you could update the version and provide the log output of MTFG (can also be done via PM). The update is very easy, simply run the mtfg-ofs-extension-installer.exe again.

A few detail questions:

  • By freeze you mean that the tracking window stays open but nothing happens anymore?
  • Does the program only freeze when a tracker lost? What happen if you stop tracking e.g. after 10 seconds with q?

Addendum: I have found a case in my code which could have caused the freeze and have released a new version 0.1.4 which hopefully fixes the problem.

3 Likes

Are there any future plans to support Top/Bottom VR videos? A lot of older JAV videos are in this format. You can still track them, but the screen where have you to add the tracking points is really small. On the plus side you do have two slightly different views to choose from if your tracking botches on one of them. Really having fun using the plugin btw! I’m amazed at how accurate it is.

You might be able to add it yourself in the following file (use the menu "Extensions\Funscript Generator Windows\open directory):

…\funscript-editor\funscript_editor\config\projection.yaml

Add something like this in the yaml file and it will appear in the projection choice in the setting windows:

vr_vertical_180:
  name: '3D VR Video (Vertical)'
  video_filter: 'v360=input=he:in_stereo=tb:pitch=${phi}:output=flat:d_fov=${fov}:w=${width}:h=${height}'
  parameter:
    height: 720
    width: 1240
    fov: 100
    phi: -45

(note: I didn’t find a top-down video in my files so I cannot test it. You might have to tweak it. See the ffmpeg documentation here: FFmpeg Filters Documentation)

edit:
Or maybe not, I finally found a TopDown video and, when I test, I only have “2D Video” as a choice. There might be a “dynamic filter” (maybe on the ratio width/height) that removes the 3D choice in the extension in that case.
I was able to ‘cheat’ by changing the setting for the ‘flat’ projection (that I never use):

flat:
  name: '3D VR Video (Vertical)'
  video_filter: 'v360=input=he:in_stereo=tb:pitch=${phi}:output=flat:d_fov=${fov}:w=${width}:h=${height}'
  parameter:
    height: 720
    width: 1240
    fov: 100
    phi: -45`
#  name: '2D Video'
#  video_filter: 'scale=${width}:${height}'
#  parameter:
#    height: 720
#    width: -1
1 Like

Thank you! Although I’m not able to select the ‘viewing area’ like in the SBS option, this helps a ton if the action is far away from the camera.

Edit: Found out I can control the viewing area with the ‘phi’ parameter.

Your configuration suggestion is correct. It was intended that users can customize the configuration themselves. Unfortunately, a filter is currently applied that do not allow to select the config entry in the settings menu (I removed the filter in this commit). In release v0.1.5 it should be possible to select user defined projections.

2 Likes

I think it only happened when the woman’s tracker got lost, not the man’s. It stopped freezing, once I changes some of the configs to use previous iterations of some of the tracking methods and key generation. I can’t look at what they were at the moment, but after that it started working just fine, even though the woman’s tracker got lost.

I’ll check the new version shortly and report here, if the problem arises again! Thanks!

I have a feature / pull request: Add the possibility to control fov, yaw and roll.
Sometimes, I think we could get better tracking if we could ‘align’ the movement to the x axis, or zoom in.

BTW, thanks a lot for having the source available, and a bigger thanks for making sure that your build documentation actually works (it’s a pet peeve of mine when you have to spend 2h to debug the build procedure of an open-source).

I tested this with success:

Added yaw and roll to the projections:

 vr_he_180_sbs:
   name: '3D VR Video 180'
  video_filter: 'v360=input=he:in_stereo=sbs:pitch=${phi}:yaw=${yaw}:roll=${roll}:output=flat:d_fov=${fov}:w=${width}:h=${height}'
   parameter:
     height: 720
     width: 1240
     fov: 100
     phi: -45
     yaw: 0
     roll: 0

And added keys to control fov, roll and yaw settings:

elif pressed_key == "'e'":
    config['parameter']['fov'] = max((-80, config['parameter']['fov'] + 5))
    parameter_changed = True
elif pressed_key == "'d'":
    config['parameter']['fov'] = max((-80, config['parameter']['fov'] - 5))
    parameter_changed = True
elif pressed_key == "'r'":
    config['parameter']['roll'] = max((-80, config['parameter']['roll'] + 5))
    parameter_changed = True
elif pressed_key == "'f'":
    config['parameter']['roll'] = max((-80, config['parameter']['roll'] - 5))
    parameter_changed = True
elif pressed_key == "'t'":
    config['parameter']['yaw'] = max((-80, config['parameter']['yaw'] + 5))
    parameter_changed = True
elif pressed_key == "'g'":
    config['parameter']['yaw'] = max((-80, config['parameter']['yaw'] - 5))
    parameter_changed = True
1 Like

Maybe I’m just not familiar enough with the tool, but it’s frustrating when there are a lot panning and zooming shots, is it possible to maybe have track a background object and adjust the movement center based on the movement of the static object in the scene?

I often have to manually correct scenes because the automated result is stair stepping due to camera movement.

Thanks for the suggestion / pull request. I will definitely add the additional control options to the program.

You are absolutely right. The tool is not very useful if you don’t have an static camera scene. I have design the tool to partial automate the funscript generation process for vr videos. An implementation for an moving camera is much more complex because, as you suggested, you have to track the static objects in space and subtract the camera movement. Such a function will not be available from my side in the near future, because the implementation effort is too high and I don’t have enough time for it.

1 Like

That makes sense, thanks for the response! You’re wrong though, it’s still extremely useful without a static camera, just requires a bit of extra work. Honestly it’s not that difficult to deal with, and the tool is incredibly useful.

Having a feature like that would just cut down time probably 50% for relevant scenes but the tool already cuts down the time by like… 98%, so I totally agree, not worth the effort! Maybe something I’ll try working on adding in the future when I have time

Hey do you think you can make a demo for how to use the installation guide you have up on Github helps for installation but doesn’t tell you how to use

Does anyone else have issues with it crashing? I’m consistently having it stop responding now, usually with longer clips (10-30 seconds). It shouldn’t be a system resource issue. There’s no feedback from the script though so I’m not sure how to troubleshoot.

Depending on your hardware it might take a long time to process all the strokes. I did a few 4+ minutes records and it usually takes a minute or two even tho I would consider mu PC relatively good. Try leaving it for 15-30 minutes and see if it works.