How to convert raw scripts (code/text) into useable funscript files?

Hi,

What’s the best method to convert scripts in text form like:

“range”:90,“actions”:[{“pos”:5,“at”:31214},{“pos”:95,“at”:31884},{“pos”:5,“at”:32555}" into a useable funscript file for my heresphere?

I’ve downloaded scripts before and it would just be a huge line of code like this.

That text form is json which is what a funscript file is, you can validate it with something like https://jsonlint.com

You are also missing a few things to make it into a valid json file.

Here’s a simple 10 sec script with all the information filled out where each second increases the position by 10%

{"actions":[{"at":0,"pos":0},{"at":1000,"pos":10},{"at":2000,"pos":20},{"at":3000,"pos":30},{"at":4000,"pos":40},{"at":5000,"pos":50},{"at":6000,"pos":60},{"at":7000,"pos":70},{"at":8000,"pos":80},{"at":9000,"pos":90},{"at":10000,"pos":100}],"inverted":false,"metadata":{"bookmarks":[{"name":"my bookmark","time":"00:00:04.800"}],"chapters":[{"endTime":"00:00:18.556","name":"my chapter","startTime":"00:00:09.986"}],"creator":"my creator","description":"my description","duration":857,"license":"Free","notes":"my notes","performers":["my performer"],"script_url":"my url","tags":["my tag"],"title":"my title","type":"basic","video_url":"my video url"},"range":100,"version":"1.0"}
1 Like

As long as the code is meant to be funscript (and fully intact), pasting it into your preferred text editor and saving as a .funscript file instead of .txt should do the trick.

(Or, if you already have it as .txt or the like, renaming the extension to change its filetype to .funscript)

Make sure you actually swap out the file-extension instead of only changing the name.
If you don’t pay attention, there’s a chance you end up with a VideoName.funscript.txt, which won’t work.
(You might need to enable showing of known file-extensions in your OS)

1 Like