pivid
pivid copied to clipboard
Support for changes on a single layer
As far as I understand the current API only allows to replace the whole play script, but not a single layer while leaving the other layers intact.
For my applicatons, it's necessary to only change a single layer on the fly. I would propose the following functionality:
- Assign an ID to each layer
- Add an API endpoint that allows to only replace the part of the script for this layer - ideally seamless.
From my understanding of the architecture this means controlling a single "frame loader" which seems to be possible internally already.
I'm also happy to help with this when the basics of my external code are ready (first need to make sure Pivid works in general for my application).
Is it difficult to just re-send the entire script (with the one layer changed)? Unless you have many hundreds of layers (in which case you'll have other problems!), parsing and replacing the script is very fast.
I'm not sure how this will impact the running players. Would a looping video player just go on or would it start from the beginning of the file again? The idea is basically, to replace a single video without impacting the running playback of other layers.
If the layer definition is the same, there should be zero impact, it should continue seamlessly without restarting or glitching. That's why everything uses absolute timestamps (possibly annoying as that is). That's the whole design, to be able to "slipstream" arbitrary changes in while media is playing.
Ok, good to know. I'll try this first. I didn't yet dig into the timestamping stuff at all and didn't even check what's the meaning of all the parameters of a layer.