OpenFunscripter - a scripting tool - 3.2.0 release

Yet C++ should be quite well convertible towards a lot of other languages, unless a lot of pointer related tricks were done.
Its a very low level language which means most other languages already have implemented things C++ also has, and often more optimized. Most languages still use the same basics as C++, except made the classes a higher level object (which gives restrictions in pointer behaviour, but advantages in readability, and depending on the case even security).

Maybe some of the base code could be made into a dll or something, and then not even require conversion? Or at least delay the need for it.

Its a lot of work to do that though, but maybe this is a thing where chatgpt could speed up things a lot. Even if its just syntax fixing and basic code replacements. Its a massive bulk it could take care of and might make the project managable.

1 Like

I would contribute to it if i felt more comfortable with regular software dev in C++. Iā€™m a fresh embedded software graduate, but that means most of my experience is with embedded C/C++ and some Python rather than more broadly speaking full stack app development. Also the next 6-12 months are not gonna be too time forgiving for me, but perhaps if I have enough time eventually I could look into the codebase and see what could be improved as far as I understand it.

2 Likes

Is there a way I can snap all my points to the nearest frame? I made a script using Tempo mode, and after switching back over to Frame mode to fine tune the script, all/most of my points fall somewhere in between frames. I tried selecting the point(s) and moving them left/right, with and without snapping, but it just moves them exactly 1 frame in either directionā€¦ Ultimately, Iā€™m not sure if it really matters, but I wanted to check.

Note that for the script its generaly not an issue, scripts dont work on frames but on timestamps. so 0.5s at 24fps means 12th frame, and at 60fps the 30th frame. A value like 0.1s which doesnt align on 24fps is on that still fine.

It also barely matters to the viewer since for humans a 0.05s offset is not going to be noticed (sleeves also dont instantly react as the material is soft). Even for hearing 0.08s of delay isnt a problem (and generaly even prefered as its a more natural delay than an exact 0).

So unless you need to edit that section in timing, just keep it that way. It works fine.

1 Like

Thanks for the reply! Youā€™re likely right, itā€™s mostly my OCD kicking in, haha. The points donā€™t line up with the frame markers/lines, but it definitely doesnā€™t affect the timing. Iā€™ll keep it as is and not worry about it.

Are you able to use this on Mac?

Technically it should be possible to compile it for Mac, but since you have to pay a yearly fee to become an Apple developer so that you can digitally sign the binaries for it to be accepted by MacOS no one has done it.

Most members here run Windows/Linux only software in a virtual machine on Mac or they get a separate Windows laptop to run all the software for their toys since almost all software is developed for Windows.

is there something like ā€œmergy by distanceā€ for keyframes ?
I tried the simplify function but it doesnt work very well , when im trying to convert Scripts that were made for SR6 into a functioning script for my kiiroo.
There is still frames that are very close to each other.

What specs do you need to smoothly play 7k and 8k VR videos in OFS? I have an 8th Gen Core i7 laptop that struggles to play high res vids and make scripts.

I couldnā€™t say because itā€™s usually not a good idea to use the original video for scripting anyway.

Iā€™m using something like this to prepare a video for scripting:
"%appdata%\OFS\OFS3_data\ffmpeg.exe" -i "8K-video.mp4" -filter:v "scale=3072:-1" -g 1 -qp 30 -acodec copy "3K-video-with-only-keyframe.mp4"

This will reduce the video to 3K and only use keyframe / I-Frame (i.e. all frames are standalone, they are not encoded using previous or future frames part). Using only keyframes helps a lot to speed up OFS when you move back and forth between frames (because the OFS only has to decode a single frame, instead of having to decode multiple I and P frames).

2 Likes

I have a question, maybe a dumb one, butā€¦

When scripting, I use the arrow keys to go left and right and move ahead frames.
Is there any way to make this movement go a little faster?
I noticed that basically, if the video is 30fps, it will me about 2 seconds of pressing down the Right-Arrow to move ahead 1 second of movement.
I also have to wait a second until the ā€œpress and holdā€ is registered. So itā€™s like:
The video goes from Frame 0 to 1 when I press+hold the right-arrow, and then half a second letter, it starts finally moving from frames 2 to 30 over the course of like 2 and a half seconds.
If we could just press the left and right arrows to move frame by frame closer to real-time, it would be a lot faster.

Idk if Iā€™m explaining this well so maybe a video can help.


You can see how when I change the framerate to 15, it moves a little faster, but then Iā€™ll lose the accuracy.
I think it would make sense if I could just move left and right at real-time speed, and maintain the accuracy of the videoā€™s framerate (30fps, so move 1 frame at a time).

This would be scripting a ton faster, but I donā€™t know if thereā€™s a setting or a limitation, or a keyboard issue or what.

Itā€™s weird because we have Frame Left and Right with the left and right arrows which moves really slowly, and then we have Fast Step with ctrl+left and ctrl+right which moves too quickly at 200ms intervals, disregarding the videoā€™s framerate setting. Why donā€™t we have a real-time movement option, or some way to tweak this? Iā€™d like to just press left and right arrow to move smoothly along with the video at its actual speed and quickly mark the points and be good to go.

I too find the hotkey either too slow or too fast.
I am overcoming this by using the ā†‘ and ā†“ arrow keys to jump between actions, and using the middle mouse button a lot.

GAME CHANGER BELOW:

Yeah, but this would require there to be actions in the first place :sob:
If we could just move forward and back in the video at real-time, weā€™d be good to go eh. Maybe I can use cheatengine LOL

edit
HOLY SHIT IT WORKS LOL
Let me take a video, this is a hilarious discovery.

Cheat Engine download: Cheat Engine
Make sure not to install the additional software (adware) upon setup. I use the 64-bit launcher.

Yeah, so for a 30fps video if you set the speed to 1.7x, itā€™s pretty solid.
You need an encode that isnā€™t a large filesize so that you can go ahead frames pretty quickly with CheatEngine. I had that Mayli video in my above post but itā€™s a 4GB file, but this vid is 300MB and 30fps, also 1080p as with the Mayli one, but itā€™s very smooth to use with this trick:

Here Iā€™m just scrolling through with Left Arrow and Right Arrow to show the speed. (though I had already plotted the points here).
You can see that itā€™s about as quick as normally pausing and unpausing the video, which is crazy:


Moving backward is just as fast, though I didnā€™t demonstrate it much here.

The bottleneck for being able to skip through the frames are the following:
1 - use x264 instead of x265 for faster decoding
2 - file size - probably the biggest factor. 300MB at 1080p is much faster than 2GB at 1080p.
3 - file access speed - use the video off an SSD for faster access
4 - file resolution - not as important as file size, but they are correlated.

So basically, re-encode your video to a 480p version with Handbrake and script with that, and use CheatEngine, and youā€™re good to go.

This setting under Preferences in OpenFunScripter might help, but the limitations above are more important:

I started scripting out like a few minutes of a scene and honestly, doing it this way is easily 2-3x as fast overall as playing and pausing and going back slowly frame by frame. Crazy.

4 Likes

Iā€™m no scripter but Iā€™m using OpenFunscripter from time to time to correct funscripts (mostly Cock Heroes).

Is it possible to select a range of points and then move the last (right-most) point to the left (or right) while the first (left-most) point stays where it is and all other points in between shift automatically to the left (or right) keeping the same spacing proportionally?

Big warning, although obvious: Even if the program is running and not realy hooking into a game, many anti cheat platforms will detect it as malicious.

And while the name might be notorious, that isnt the reason its flagged as such, its because it runs code on a very low level and is designed to be able to run over other programs. 2 things that many game devs do not like. Some platforms therefor do not instantly ban, but just refuse to run the game, but its not something you should risk.

Game devs are often aware it is used to run win98 games on win10. So on that end they are often aware of its false positive here. But if you care about not getting banned, i would avoid using it anyway, as forgetting to close it once is a major risk.

1 Like

Good warning to people who game. Iā€™ve definitely seen some games in the past auto-close if you even have cheatengine open.

It does seem that a game like Apex may ban you even if you donā€™t hook cheatengine into a game: Reddit - Dive into anything

I donā€™t game much myself anymore but thanks for the reminder.

Sounds like youā€™re trying to stretch the script out a bit on the right side?

Not sure how to do this procedure but maybe this will help you work around it: If the points are equally spaced or are intended to be equally spaced out, you can use the E key to equally space and highlighted points.

P.S. my bad for double-posting.

1 Like

How convert .ofsp file to .funscript?
OpenFunscripter save file as .ofsp
Help pls

See top menu: File ā†’ Export ā†’ Export active script.
Save it where you want it, then you have the .funscript file.

For more and detailed help, check the video tutorial series.

Im getting an error and I have no idea what it means, no matter how many times I export the script the new changes I made are always reverted @gagax123

[ERROR]: [json.exception.parse_error.112] parse error at byte 1: syntax error while parsing CBOR value: invalid byte: 0xF7