FunscriptToolbox

FunscriptToolbox (FSTB?) is a command line tool that contains multiple features that can analyze and/or transform .funscript files.

Installation verb

  • installation

When starting --FSTB-Installation.bat in FunscriptToolbox folder will call this verb and it will install the OFS plugin and creates some use-case folder for the others verbs bellow.

AudioSync verbs

  • audiosync.createaudiosignature
  • audiosync.createfunscript
  • audiosync.verifyfunscript

Allow the synchronization of a .funscript to a video different than the one used by the scripter.

Use the application --help argument to see the application documentation.

See below, in the comments, for some use cases.

MotionVectors verbs

  • motionvectors.prepare: Prepare a video for others motionvectors verb
  • motionvectors.ofspluginserver: Starts a server to respond to plugin request.

Help speed up scripting with an OFS plugin.

See this topic for more information:
How to use FunscriptToolBox MotionVectors Plugin in OpenFunscripter

Subtitles verbs

  • subtitles.video2vadsrt
  • subtitles.srt2vadwav
  • subtitles.srt2wavchunks
  • subtitles.wavchunks2srt
  • subtitles.vadwav2srt
  • subtitles.gpt2srt
  • subtitles.srt2gpt

Help for creating subtitles files for a video.

See this topic for more information:
How to create subtitles

Notes

Every .funscript file that the tool creates or overrides is saved in a “vault”, found in “%appdata%\FunscriptToolbox\Vault”. If you ever make a mistake and override the wrong file or something, check this folder for your old file.

The tool also keeps log files of the last 10 executions in the folder “%appdata%\FunscriptToolbox\Logs”.

Binaries and Sources

FunscriptToolbox is fully open source over at github.

Latest release: 1.2.1

Please use github issues for your bug report.

19 Likes

The tool should be useful for some old scenes that have been altered after a script has been created. For example, NaughtyAmericaVR has a bad habit of altering their intro or even changing some parts of the scene (see Wake and Bake).

I know that @JohnSilverGold has been able to re-synchronize a few of his NA videos with this tool.

It should also be useful for 2D scripts that are often based on videos from free site (pornhub, etc), which can also change their video without notice.

1 Like

So far, I haven’t found an application (OFS, scriptplayer, etc) that wasn’t able to read a .funscript with an embedded signature. Let me know if you find an application that is not able to read the file.

Here’s an example:
NaughtyAmericaVR - 2017-04-20 - Melissa Moore - Wake and Bake [zalunda].funscript (667.8 KB)

1 Like

what file extensions do you need added? just .asig?

Yes, please. Thanks @hugecat

k added it

1 Like

Fixed a stupid bug where I moved files, instead of copying, to the %appdata% vault.
So, when generating a file, the file was created and then moved immediately to the vault. So, it seems to disappear.
Oups. Fixed in 1.0.1.

How to setup as a scripter

  1. Download & extract the tool somewhere (for example, C:\Tools\FunscriptToolbox)
  2. Double-click on --FSTB-Installation.bat.
  3. This will also create a few ‘use-case’ folders.
    The one that is needed for this use case is “FSTB-PrepareScriptForRelease".
    You can leave the folders there, or move them somewhere else, the script inside will still work if they are moved.

Notes:
If there is interest, I might expand the tool with commands that could be added to the PrepareForRelease batch file, like adding your default metadata, creating the heatmap image, downloading all images found on the video url, etc).

The tool might not work well with video with music since it’s trying to match similar audio sections. With music, there might be a lot of sections with almost identical audio.

After that, each time you create a script

  1. Move new-scene.mp4 and new-scene.funscript to the folder ScriptToRelease.
  2. Start “–FSTB-PrepareScriptForRelease.1.0.bat”.
  3. Wait for the application to inject the audio signature.
  4. Release your .funscript, with an embedded audio signature.

Your job is done.
In theory, you should not have to synchronize your script with all versions that exist on the internet.
“Consumers” should be able to do that themselves.

How to setup as a consumer

  1. Download & extract the tool somewhere (for example, C:\Tools\FunscriptToolbox)
  2. Double-click on --FSTB-Installation.bat.
  3. This will also create a few ‘use-case’ folders.
    The one that is needed for this use case is “FSTB-VerifyDownloadedScripts".
    You can leave the folders there, or move them somewhere else, the script inside will still work if they are moved.

After that, each time you have to synchronize a script to your own video version

  1. Move scene.funscript, scene.asig (if .funscript doesn’t include audiosignature) and scene.mp4 to the folder ScriptsToValidate.
  2. Make sure all the files have the same names.
  3. Start “–FSTB-VerifyDownloadedScripts.version.bat”.
  4. If your video version is same as the scripter’s version, you’ll see something like this:

  1. If your version is different, you’ll see this and a synchronized version script will have been created for you:

How to create synchronized .funscript for a remastered video

If you have acces to scene.funscript, scene.mp4 and new-remastered-scene.mp4, the easiest way to create a synchronized funscript for the remastered scene is to open a command prompt and use this command:

"C:\Tools\FunscriptToolbox\FunscriptToolbox.exe" as.cfs -i scene.funscript -o new-remastered-scene.mp4

2 Likes

Good tool! :+1:
Also it works fine on Linux with wine, which is nice :slight_smile:

1 Like

For the last few weeks, I have been working on an OFS plugin to speed up scripting, tied to new features in FunscriptToolbox. It should be finished in a week or two but it’s already usable.

Any scripters that would like to beta test it?

Send me a message if you are interested.

1 Like

Ooh I’d like to help out for sure

Thanks @shamona_heehee, I’ll send you a DM in a few days. I still have a few things I need to prepare first.

1 Like

Updated the tool to 1.2.5.

  • Fixed some verbs that didn’t download ffmpeg (ex. as.cfs). If you tried that verb first after installation, it would fail with an error “cannot find ffmpeg”.
  • Fixed script “–FSTB-GenericCmd.1.1.bat” (which contained my local path, instead of the path on your machine).
  • AudioSync verbs: Rewrote “audiosync.createfunscript” verb to be more flexible. You can now use multiple inputs and/or multiple outputs. The tool will “virtually” merge the inputs and output for the comparison and then unmerge them to create the final funscript/srt file. It also synchronizes all .funscript / .srt linked to the file (ex. .funscript, .roll.funscript, .pitch.funscript, .srt, .jp.srt, etc).

For example, you can use a pattern * in the filename like this:
FunscriptToolbox as.cfs -i 3DSVR-0628-*.mp4 -o 19512.mp4

This will load and merge all .funscript / .srt linked to files “3DSVR-0628-A.mp4”, “3DSVR-0628->B.mp4”, etc and create .funscript / .srt synced to the file 19512.mp4.

It also works with one input and multiple outputs, or with multiple inputs and outputs.
The files can also be listed individually, separated by “;”.
For example, FunscriptToolbox as.cfs -i 3DSVR-0628-A.mp4;3DSVR-0628-B.mp4;3DSVR-0628-C.mp4 -o 19512.mp4

1 Like

Hi if you happen to be following still.

Did you get it to work with just mono or did you use wine?

I tried with just mono, but can’t figure out how to override the ‘%appdata%\’ path for ffprobe
When I ls the for full path it errors on, I do see it

‘/install/path/%appdata%\FunscriptToolbox/ffmpeg/ffprobe’

I’m not sure what to add to FunscriptToolbox.exe.config
If that is where I set it, there is only logging paths there.

TIA

If it helps, I just created a new version. I added a parameter in the .exe.config file to specify the ‘AppDataFolder’ (1.2.6).
You might have to let FunscriptToolbox download a version of ffmpeg (and fail if it’s not compatible on your platform), replace ffmpeg.exe with a version that works on your platform, and re-run.

1 Like

Thank you. That seemed to have worked.

For anyone else trying this for linux.

Install mono

Download 1.2.6 +

edit FunscriptToolbox.exe.config * note _installed_path in example should be your actual full path
set the Application path to something like:


  <applicationSettings>
    <FunscriptToolbox.Properties.Settings>
      <setting name="AppDataSettings" serializeAs="String">
	     <value>_installled_path_/FunscriptToolbox/bin</value>
      </setting>
    </FunscriptToolbox.Properties.Settings>
  </applicationSettings>

Run

mono FunscriptToolbox.exe installation

Replace ffmpeg ffprobe in the _installed_path/bin/ffmpeg/ Directory with ones for your system

FunscriptToolbox should work with

mono FunscriptToolbox.exe <verb> parameters

*assuming in your path

2 Likes

I am using wine, good to know that it works with mono too.

This is amazing. Thank you so much!

1 Like