Endilll / vapoursynth-preview

Preview for VapourSynth scripts
Apache License 2.0
69 stars 21 forks source link

Hook to direct vapoursynth.Videonode #30

Closed sosie-js closed 3 years ago

sosie-js commented 3 years ago

Hello Endillll,

I would like to know if there is a way to trigger the Preview within a python script by providing directly the videonode result for example.

I want in fact to be able to control the preview externally with python Are there an api or doc to do this? thanks a lot.

Endilll commented 3 years ago

I'm not sure what are you exactly after, but here are the options: 1) all UI controls can be manipulated programmatically. For instance, click() is available on every button. buttons can be found in setup_ui() methods across the codebase 2) if you want to build your own UI, but not sure how to implement layer between VS and GUI framework, you can take a look at Output.render_raw_videoframe() in types.py

That's the best answer I can provide to you at the moment. Feel free to fill me in with details of what you're trying to do.

sosie-js commented 3 years ago

Thanks for your answer, well I would be able ot integrate your viewer in a wx Frame and connect to wx Buttons, using wxpython

Endilll commented 3 years ago

Is there anything missing for you in my GUI so you're building you own?

sosie-js commented 3 years ago

Well many many things ^o^ - Want just like to be aegisub.. with lua or python interaction with ass and draw things on it. For now I found mpv very capable but I have the same integration problem, frame by frame granularity you succeed to achieve and it crash mpv. I should admit your code triggered me ...

Endilll commented 3 years ago

Aegisub has its own reasons to have this kind of vector editor. I suggest exporting PNG and open it in likes of Photoshop or, when you need something dynamic, export a clip and open it in likes of After Effects. For VSP this is clearly out of scope, because I won't be able to match professional tools in any way that matters.

sosie-js commented 3 years ago

Okay =) I learn a lot on vps by reproducing aegisub features starting by the dummy protocol..just on Blanckclip generation which is normaly a breeze but in fact not simple if you want to match like your said results with sound that lack vps or precise duration.

Endilll commented 3 years ago

I think this issue can be closed. Feel free to open another one or contact me via Telegram or Discord if you need my help.