stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
8.75k stars 778 forks source link

[Improvement] Funscript related ideas/goals #3031

Open scruffynerf opened 1 year ago

scruffynerf commented 1 year ago

Braindump (and cut and paste of discord posted ideas) to improve how Stash handles funscripts:

Funscript support is great for a single script, but as the tech is evolving, the use of multiple scripts (alternative, or multiaxis) is being more common. It would be awesome if Stash got ahead of the curve (and thus would become more recommended/used), by supporting this. Scripts in general and even multi-axis scripts are being more available, as the tech gets cheaper, VR has embraced it (with multiple sites/studios now offering official or unofficial free or paid scripts), etc.

Current support: https://github.com/stashapp/stash/blob/c43c695f5d795e9a48d788ecf76c6ca8b81b9d4c/ui/v2.5/src/docs/en/Manual/Interactive.md "For example, a funscript file for video.mp4 must be named video.funscript."

Multiple Script support:

As documented here: https://github.com/Yoooi0/MultiFunPlayer

L0     Up/Down     <video name>.funscript
                              <video name>.stroke.funscript
                              <video name>.L0.funscript
L1     Forward/Backward     <video name>.sway.funscript
                              <video name>.L1.funscript
L2     Left/Right     <video name>.surge.funscript
                              <video name>.L2.funscript
R0     Twist     <video name>.twist.funscript
                              <video name>.R0.funscript
R1     Roll     <video name>.roll.funscript
                              <video name>.R1.funscript
R2     Pitch     <video name>.pitch.funscript
                              <video name>.R2.funscript

TCode v0.2
Axis     Description     Valid file names
V0     Vibrate     <video name>.vib.funscript
                              <video name>.V0.funscript
V1     Pump     <video name>.lube.funscript
                              <video name>.pump.funscript
                              <video name>.V1.funscript
L3     Suction     <video name>.suck.funscript
                              <video name>.valve.funscript
                              <video name>.L3.funscript

TCode v0.3
Axis     Description     Valid file names
V0     Vibrate     <video name>.vib.funscript
                              <video name>.V0.funscript
A0     Valve     <video name>.valve.funscript
                              <video name>.A0.funscript
A1     Suction     <video name>.suck.funscript
                              <video name>.A1.funscript

In addition, alternative versions (easy vs hard, or fast/slow (double/half), etc for examples) could be supported easily (alt1, alt2, hard, fast, slow, double, modified, etc... )

Ideally, just making it support videoname.something.funscript (where something is optional, and if left out, behaves as now), would solve this.
Passing an argument for 'something' in the request url, could be used to get the path for the alternative files.

So if the normal funscript is too fast, and I add filename.halfspeed.funscript, then the url for it would be http://<stashurl>/scene/####/funscript?halfspeed

'Interactive' as a flag would remain as is, if any funscript exists (and if no 'plain' .funscript exists, the default url would return the first .funscript found), Or maybe there would be fall back, say plain funscript, stroke.funscript, L0.funscript as above chart. The heatmap info or scene info panel could list multiple scripts/urls available, if any.

@WithoutPants — 10/06/2022 Multiple funscripts sounds like a pretty reasonable request. There's a few moving parts involved so it won't be trivial, but it is worth doing. I think it's worth creating an issue for.

@Tweeticoats — 10/06/2022 From a player perspective there is support in heresphere for multiple scripts for the one movie see https://cdn.discordapp.com/attachments/1016761652600905889/1027277464071835668/HereSphere_JSON_API_Version_1.txt

Metadata and other mods

Also the metadata inside the funscript could be editable (it's just json), AND (since I'm realizing how annoying it is to match up scripts to videos), ADDING phash... which by virtue of phash being very duration dependent, is the perfect addition: finding a matching video is now just a matter of finding a phash match, not a filename match (which is often resolution/encoding dependent, and the same script works regardless)

Adding a phash to the metadata would make life much easier in the long run.

I'm considering write a plug-in to write the metadata/phash into the funscript, but the multiple/alternative funscript stuff would need to be a Go patch.

@WithoutPants : Editing is not what I would consider necessary core behaviour, but it'd be nice to support a plugin to do it.

Yeah, I could see making options to 'half speed' or 'double speed' or even 'modify randomly' scripts that would allow all sorts of nice stuff from within Stash without having to use external editors, IF Stash can just handle multiple scripts nicely.

Heatmap improvements

Converting the current heatmap which is a solid color bar into a stroke length variable bar (so basically, it adds showing the average activity at any given time, which makes the bar FAR more useful)...

example

TS code to do so is here: https://github.com/defucilis/funscript-utils/blob/main/src/funMapper.ts (basically, when showStrokeLength is true) it's a small change, but it adds so much context.

I've written (and once I clean it up, I'll publish) a python addon (scraper now, might become a plugin), that will rewrite the heatmap png into something like the above (I don't get the nice rainbow effect because I just used HSL hue variation rather than a colormap solution, but maybe someone will patch my simpler code). I didn't recalc/save the speed/etc, I'm depending on the built in generate (which also makes the heatmap.png to do that part). I actually have it handling multiple funscripts existing, and just building a single taller png to display them all at once, which Stash handles like a champ.

Stash-box and Stash link support

It might be nice to add at least a Link in Stashbox for "Funscript" for scenes (so you could link to a place to get the funscript, or the page to buy it, download it, etc...

skier233 commented 1 year ago

+1

Syunica commented 1 year ago

Any update on this?

skier233 commented 1 year ago

https://github.com/stashapp/stash/pull/3502

Syunica commented 1 year ago

3502

but thats support for buttplug.io not Multi-Axis in general right? as Multi-Fun-Player compatibility or Multi-Axis Scripts in general

skier233 commented 1 year ago

The approach is to do it in phases. Step 1 is to get support for buttplug.io and TCode devices. A later step would be to add multi axis scripts. Trying to do everything in one pr would make the task too large and overwhelming.

skier233 commented 1 year ago

See https://discord.com/channels/559159668438728723/559169859351740418/1080620577091485799 for more discussion

Foucoubou commented 1 year ago

@skier233 If may I add my two cents (it is partially already mentioned in the epic above) It would be wonderful, if there would be possibility to add funscript (or srt) to fileless scene - some manual assignment or scene creation during scan in case unmatched script/srt-file.

skier233 commented 1 year ago

I'm not the one doing the work but yea I could see that being useful.