So if I understand correctly, you made a script that specifies a speed limit at given video position, then loaded it to V0, and configured smart limit on stroke/L0 to limit its speed based on V0 value?
Thats pretty neat.
If you click on the settings button on top of the window, go to āDeviceā, there you can customize your devices/axes.
So you can for example add your own A9 (or whatever name) axis, configure āFunscript namesā to something like intensity, and then MFP will auto load scripts named <video name>.intensity.funscript to A9 axis.
You cant really have a minimum speed, it would mean that the device would have to move with nothing happening.
What do you mean by scripting for motion providers?
I do not doubt that I have some fundamental misunderstandings about what is going on lol, Iāll read up sometime
just a way to have more indirect control, automated. a happy medium between absolute position precision provided by funscript and set patterns/randomness. so one could specify at a time: [R0 R1 R2, Random, Range:30-70, Speed:30]. Iām half joking, but itās something I would use.
yea I have shortcuts setup (a lot of them!), but I have to press the buttons. If I want to change R1 and R2 from Random to Sine, and speed from 20 to 70 at the 02:37 mark on my funscript playing on L0, as I understand it I need to press my shortcut(s) at that time. I want my script to do that for me so Iām not fumbling. Ideally itās some other script that is synced up with whatever main L0 script I have (like how Iām currently controlling speed on a separate script). I could setup an ahk script to do that but thatās not without its own drawbacks (though I havenāt tried it, itās probably fine if donāt pause).
not meaning to belittle the shortcuts! they have been very useful for experimenting and quickly making changes that take minutes to do manually.
is there a pause/sleep for between actions? that would go a long, long way. that and a āon <funscript_name/path> playā shortcut trigger that manages pauses, might cover all the bases. Itād be a bit more awkward than a timeline based scripter, but should do everything I want.
there are so many actions I wouldnāt be surprised if I missed them.
With how it currently works yea, but you can have all that actions under a single key. So its not like you have to press 10 buttons.
No and there probably never will be, shortcuts are more of a āif this then do thatā. Sleep adds a lot of complexity so no plans for that right now.
But I do plan on redesigning the shortcut system some day to more of a trigger based system, so events like play/pause, video/funscript load, video position, double/tripple clicks etc. could be supported.
haha yea most of mine are doing multiple actions donāt worry!
This is a way better way to actually solve the problem I have, thank you.
If these events could be (optionally) conditional to the specific video/funscript file loaded/playing, that would be awesome. I know they donāt currently have this sort of logic functionality, but that would cover all the functionality āāmotion provider scriptingāā meant in my head. All in a way much more congruent with the current setup. love this!
Tacking on these further suggestions:
a way to organize/label shortcuts would appreciated
a āMotionProvider::Pattern::Pattern::Setā action should be added, to change between Triangle, Sine, etc. Currently youāre locked into whatever youāve manually set until you click in and change it. afaik every other MotionProvider parameter has an action.
Yea I dunno. That would require some custom visual programming stuff.
Not sure if that is worth adding as it will be pretty complex.
I think Iād rather somehow add a way to have different configs per video. So on video change the shortcuts would change. But that is probably also not happening any time soon
Label how?
I have this on TODO for v1.23.0.
Right now only the range min/max and speed are configurable iirc, everything else is not.
Hi @Yoooi, would you consider adding a MediaSource that is a WebSocket listener so web applications like Stash could send a media/funscript URL pair from client-side code and synchronize to playback there? Thanks!
Hmm interesting, so like a media source that requires someone to implement some api specified by MFP?
If I would add something like that I would probably have to allow tcp, udp and websocket listeners to make it more generic.
But just a media path is not enough it needs to also send time in frequent intervals (like max 1s) and play/pause state.
Scripts get loaded based on the video filename/path, so if MFP can access the files there is no need for funscript url.
Yeah, since MFP wouldnāt be able to easily connect to an arbitrary webapp, do it the other way around where the website reaches out to MFP. That way this could work with Stash or just about any other website.
Stash is a self hosted web app. It can hold and serve funscripts on its own, so a URL like http://192.0.2.1:9999/scene/1234/stream is the video, while http://192.0.2.1:9999/scene/1234/funscript serves a funscript for that scene. Right now, Stash only works with The Handy, but integrating MFP would open it up to all the outputs that MFP supports.
The idea would be for Stash and other web sites to integrate client side code that connects to a websocket listener inside MFP and sends a funscript URL to load (or maybe just the content of the funscript?) over that websocket and periodic bidirectional time/pause state. That way MFP can work without any local files, just using the data inside Stash.
If you have a better approach for webapp sync, Iād be interested to hear it.
So how would you implement the stash part, like a plugin or edit the server code directly?
If it is self hosted then why websocket? Im assuming because browsers can only use websockets and not tcp/udp, but couldnt you just send data directly from the server instead of the webpage? This way you could just emulate deovr api with tcp (without the funscript part).
But I think it might be better to create an api server in stash if that does not exist yet, and MFP would connect to that. This way other players could do the same.
If we go the MFP api way, any suggestions on what would you like the api to look like?
It sounds like he wants buttplug integration in stash, and then have MFP present itself as a sex toy to buttplug.
I donāt think itās a good idea to reinvent the buttplug API. Application builders want to implement a single API to support many toys. We donāt want to end up in a situation where application builders need to implement the handy api, the MFP api, the lush apiā¦
The stash developers are open to direct implementation in the client JS sent to browsers, or a browser plugin could also work initially for rapid iteration.
The server can theoretically serve multiple simultaneous users, which introduces a problem of its own. Which stream do you send to MFP? That makes server side implementation complicated.
From browser JS you canāt open a websocket server and accept connections from MFP, so thatās out too.
Iām suggesting that MFP create a standard for universal video/device sync exchange from browsers. If MFP served a websocket that Stashās JS could connect to, with a simple JSON API to send back and forth āplease load this funscript URLā alongside bidirectional time sync events and play/pause events, thatās easy to work with. That would also work with any other website and not just stash. Then, browsers could just support that one single protocol and use MFP as the translator between all the others including limits, etc.
Yea, the api would just either have to include a way to determine users/sessions in event data (and send events for all users), or have a way to filter/subscribe to events based on user/session.
I really dont think it would be that complicated of an api.
This way all future apps will be handled with one api in the stash server.
Otherwise you will be adding new api per funscript player to stash client code. Even tho im not a developer of stash this feels weird for me. If there is code to be added to stash why not just write the general api that can be used by all players instead?
Yea, I think I could add something like that, even tho I think the api should be in stash, it might be useful to somebody one day. Would have to support tcp/websocket/namedpipe clients.
Things that the stash client would have to support:
Send media play/pause events
Send media path/url when playing a video, null/empty when stopped playing
Send media duration
Send media playback rate
Send media position at most every 1s
Receive play/pause request
Receive media seek request
Receive media play file/url request
All those can be supported in the client js?
He suggests a way for other apps to connect to MFP tcp/websocket server and send media/funscript events via api specified by MFP.
Currently all other supported players in MFP work the other way around where MFP connects to the server in media player and implements their api.
Add send only changed values toggle (#82), optimizes amount of data sent each update tick, defaults to enabled for every output but UDP
Add offload update tick elapsed time toggle (#86), tries to improve smoothness by offloading elapsed time calculation to device firmware, defaults to enabled
Add send only changed values toggle (#82), optimizes amount of data sent each update tick, defaults to enabled for every output but UDP
Add offload update tick elapsed time toggle (#86), tries to improve smoothness by offloading elapsed time calculation to device firmware, defaults to enabled
Yea, I thought about it before, added as todo on github.
Technically it is kinda supported right now since both plex and emby use mpv internally and you can connect MFP to the internal mpv. Tho the reported file is just a stream url so MFP cant match scripts to it without path modifiers.