OK Thanks, i will implement an Watchdog Timer in my ffmpegstream class to improve the handling of such problems in further program versions.
Have you tried to re-encode the video and checked if the same issue occur on the re-encoded video? You can use ffmpeg to reduce frames per second and resolution or use an application like Handbrake to re-encode.
Thanks, Iāve done that and it works to finish off the video. I posted more to notify the creator of an error case that it is unhandled.
@mchyxnaaiorxfwrivv
Thanks for making this tool, may I know what sort of algorithm is used after the tracking that needs a long time to process?
Example for an 4 min Video with AMD Ryzen 3900X CPU:
- Quadratic interpolation of tracking signal: (3 seconds)
- Calculate difference between boxes for x, y, roll, distance and map them to 0 - 100% for each frame: (15 seconds)
- scale all differences to user input of max and min (x < 1 second)
- Get local min and max points in selected metric e.g. y direction: (x < 1 second)
- Get additional change points by comparing second deviation with rolling standard deviation: (x < 1 second)
- Export data (x < 1 second)
The biggest time requirement is probably in this function. The numpy implementation of masked array is very slow. Theoretically, I could use the standard mean calculation for the case with only one tracker for men and women, which should speed up this case significantly. And I think most people use only one tracker anyway. Maybe Iāll have time to take a closer look in the next few days.
Can you explain how 2+ trackers works? Iāve used them a bit when having trouble with only one tracker, but Iām not really sure how it should be used.
I doubt Iām reading your code correctly, but it looks as though it tracks the center between the tracked points?
Could you check if !trackers > 1 and then run stdmean for that situation so it maintains the functionality of multiple trackers, but offers a fast path for the easy case?
can we have this script?!?!?!
I am not familiar with Python or numpy so I couldnāt be of help (and I havenāt figured out why mean is required).
So the time consuming task is for filtering 2-tracker case when 1 tracker loss tracking causing invalid data?
Does Quadratic interpolation help with āmissingā top or bottom points when they appear between sampling?
sorry for asking so many programming questions.
Can you explain how 2+ trackers works? Iāve used them a bit when having trouble with only one tracker, but Iām not really sure how it should be used.
@internetpornwho Tracking with several trackers currently only has the advantage that an averaging of the calculated scores per tracker results in a somewhat more accurate signal. The idea was/is that you select several trackers and if then one tracker no longer finds his feature you can still continue tracking until all trackers of one type are lost. But this function is currently not implemented and the current code is only a partial implementation so that this can be made possible later. (The first mentioned improvement is already working in the current release)
Could you check if !trackers > 1 and then run stdmean for that situation so it maintains the functionality of multiple trackers, but offers a fast path for the easy case?
This is how i will probably implement it (i also mentioned it briefly in my previous post)
So the time consuming task is for filtering 2-tracker case when 1 tracker loss tracking causing invalid data?
@trasssh Yes and no. Yes the code can handle invalid tacking data when one tracker lost the feature. But as mentioned above, this function is currently not fully implemented.
Does Quadratic interpolation help with āmissingā top or bottom points when they appear between sampling?
Yes
Thatās a tip Iām totally going to have to steal from you - with a modification to account for the fact that humans have to interact with the result!
I set the options and hit Refresh only 3-4 times before something 100% usable (random AND readable AND memorable) came up.
Anyway, this thread floated up to the top of my view I wanted to say thanks for making this - the first time I tried it, I had poor results because I hadnāt noticed that the tracking box you were to draw was supposed to be VERY SMALL and not āthis is the whole area to parse - the whole womanā
Now that Iāve seen some examples with very small tracking areas, life is good. Double thanks!
Curious if anyone is willing to take the time to walk me through getting this installed? Would love to be able to utilize this but Iāve gotten lost on how to do it lol
Where are you having an issue - have you tried following the video tutorial/walkthrough, or the step by step instructions with pictures listed in the OP? At what point in that process are you running into an issue.
āIf you are new to scripting or have never used OFS before, i recommend to check out Huskyās video series How to script in OpenFunScripter - video tutorial . In Part 3 it explains the installation and usage of this extension. In addition, a step by step installation instruction with pictures is available on GitHub.ā
Iām having issues with the latest version (1.6) that I hadnāt seen in the previous version I was running (1.4). Sometimes when it finishes a section, it shows the min/max, I then hit space to confirm and thenā¦ no points are populated? This can happen multiple times. Sometimes if I let it sit for a minute on that screen and then confirm it will work, but other timesā¦ just, nothing happens. I have made a few videos already with this new script so I donāt think the Settings.tmpfile is the issue as well I have 64gb of RAM so I doubt thatās the issue.
I went back to the 1.4 version and this issue is still present, but seems less prominent?
Thank you for the feedback. I have also noticed the problem but have not yet been able to find a source for it. I have only noticed that, if I generate less log messages that it occurs less often.
In my case one python thread did not terminate (maybe a kind of deadlock) and therefore the data was not transferred to OFS. I have only seen this problem on windows. On Linux the problem does not seem to occur (at least not for me).
To help you you could do the following:
-
If the tracking is finished (after the min max selection) and no data is inserted in ofs look in windows taskmanager if the funscript-editor.exe is running, if yes kill it ā are the dates inserted now?
-
What installation method do you use, the OFS extension (Installation Option 1) or via the special function in OFS (Install Option 2)?
-
Can you look into your log file when no points are transferred to OFS and check if you have the line
Save result to xxx/xxx.csv
.
I am using windows
Iāll work on the first point:: After testing - No, when the points are not inserted the funscript-editor.exe is not still running
-
I installed using Install Option 2
-
Save result to xxx/xxx.csv is present in the log when this occurs
More testing - still anecdotal:
- A scene failed 2 times in a row, almost immediately pressing spacebar when it finished
- Third time - I waited until the process for ffmpeg finished then immediately pressed spacebar - the output was saved in OFS - but waiting a long time doesnāt mean it will succeed either
- Another scene failed - this time ffmpeg finished before the final prompt for the limit was displayed - no output in OFS
- Repeat of the same scene and this time a similar thing happened, but the output was displayedā¦
Man this is super difficult to try find a consistent behavior.
@internetpornwho Thanks for the help in finding the source of the problem. I create a new release v0.1.7. with some small adjustment to address the problem. it would be helpful if you could try this release and give feedback if it got better, worse or unchanged.
First off - I love that you use the previous settings for video type/tracking etc.
Iām definitely still having issues with it.Iāve only tried it with one video so far, which has been giving me tons of trouble, but it seems to be a little better? It doesnāt really seem to matter whether I wait or not until the ffmpeg process finishes or I just hit space right away with the prompt. It seems about 30-50% it posts to OFS, which is seems better than I was getting (probably 20%).
Iām determining whether ffmpeg is finished by waiting until the process goes to 0% and then removes itself under the funscript editor process in task manager.
Will continue trying for a bit, but wonāt be able to give feedback again for a week.
@internetpornwho I had some time and could do some tests in my windows vm. I found that the problem with installation method 2 via the special function has another problem in addition to the one I know about. Here the data is simply not reliably transferred to OFS (tested with version 1.4.2). We would have to look at what has changed in the OFS code. You can debug this by adding the line print("add", actions[1][i], actions[2][i])
to your lua script at this position (above or below). Now you can see that all results will be passed to OFS but sometimes get lost.
For now you should switch to installation method 1 where I have not encountered this problem so far
Would that it were so simple.
After running the installer ā enabling the extension and hitting Start MTFG
Error:
[string āā¦ā]:45: attempt to call a nil value (field āCreateProcessā)
Hitting Open Config:
Error:
[string āā¦ā]:136: attempt to call a nil value (field āCreateProcessā)
Hitting Show Log:
Error:
[string āā¦ā]:142: attempt to call a nil value (field āCreateProcessā)
Iāve removed all traces of the Funscript Generator from my computer then tried running the installer again and the results are the same.
Could this have anything to do with having multiple drives on my computer?
I should probably be private messaging you this, but I figured itās better to do it here so any troubleshooting/resolution can be found for anyone else having issues.