IENT / YUView

The Free and Open Source Cross Platform YUV Viewer with an advanced analytics toolset
http://ient.github.io/YUView
Other
1.89k stars 370 forks source link

[Feature] Make it possible to script the gui actions #179

Open grandemk opened 5 years ago

grandemk commented 5 years ago

It would be really useful to script the usage of the api, so that repetitive actions or mode selections can be automatized

A usecase: The multiple diff modes of YUView are excellent but you need multiple clics to get them. A good workflow when doing diff mean opinion scores would be to setup everything with a script (Select the two files, Go in diff mode, select the correct zoom level, show a specific region of the image), so that the user can concentrate on the rating of the two images.

Another one: Control the video player with a script, make it possible to do a boomerang play (by going to the last frame then coming back to the first frame) so that discontinuities between the first and the last frame do not affect the viewer evaluating quality.

ChristianFeldmann commented 5 years ago

Hi! I think a general scripting of actions may be an interesting feature. Maybe we could even put this into the playlist somehow to have a "playback actions" style thing. However, this also opens a giant can of worms for the interface and the definition of the scripts. But I will think about it some more.

For your use-cases: Something you can already do is to save the current state of YUView (which items are selected, is split mode selected, which frame is selected, zoom factor and translation) into a cache using the key combinations Ctr+1..9. When you then press the keys 1..9 these states are recalled. These states are also saved into the playlist when you save it.

Boomerang play: That also sounds interesting but it would definitely require some major modifications to our caching algorithms. But that would definitely be a cool enhancement.

grandemk commented 5 years ago

Hi, I'm aware adding scripting isn't an easy feature (Especially on a product that didn't grow with it). This is a huge feature to develop and you are right, it needs to be done really carefully as it will affect all the new features dev as well.

I think blender for example does it right (I'm not a big fan of the blender interface prior the latest versions, but their approach to scripting is top notch.)

gtkwave has something similar too that might look more similar to what could be attained here.

Adding scripting to a product is always a win, but a costly win for sure.

Thanks for the playlist tips, I will experiment with this :)

Boomerang play:

I agree, I don't know what your caching mechanisms are for yuv playing (I imagine preload of the next frame(s) that come after the one being displayed and maybe retaining the previous one)s)).

I only use the YUV player (I don't use the codec decoder) but I expect that the caching mechanisms with the codecs would be really really annoying (With the DPB and the refs, I expect that you would need to decode from the last IDR/CRA/whatever every time you cache fails you)