Motion Tracking Funscript Generator v0.5.x

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.

First: make sure you are using at least version v0.1.4, where i fix an issue when the tracker lost (see post from lewd_animator)

With Version v0.1.4+ there should be a log file in C:/Temp/funscript_editor.log. This log file could be useful to determine the exact processing step that cause the freezing. You can also see the required time for each processing step from the timestamps.

1 Like

@Husky I have a 5900x and have run through a bunch of videos already scripting them, so I can tell there is some error happening here. This one video in particular that is causing this error, and completely freezing up, I’m not sure how to begin troubleshooting the tool, but it isn’t a PC problem. I imagine there’s probably something up with the video file I’m running through, I’m reporting this mostly just so to hopefully help error handling in the future.

@mchyxnaaiorxfwrivv
I’m using v0.1.4, I will check the log file, thanks! The tracker shouldn’t be lost, as it’s center of screen and not occluded in any way when this is freezing.

I’ve attached the relevant section of the log and I didn’t see anything obvious.

funscript_editor.txt (16.4 KB)

Many thanks for the log file. The program hangs in the main loop for tracking. Unfortunately, I currently have no idea how this can happen. I setup the v0.1.4 on my Windows 10 VM and try to reproduce with same setting as shown in the config, without success for now.

A few more questions so that I can try to reproduce this better:

  • Do you use Windows 10 or 11?
  • Do you use the default config shipped with v0.1.4 or do you change anything (If yes please also provide your configs)
  • What was the last version that was working for you (so i can make an diff between these code bases)

Ok this is a good hint maybe ffmpeg can not extract an frame from the video and my code is waiting to receive the next frame.

That sounds in-line with my hypothesis: I think this is more error handling with this video with missing frames or something rather than the code itself not working.