bitfocus / companion-module-bmd-atem

MIT License
54 stars 32 forks source link

Display Still media on button background #301

Open Santana1053 opened 3 months ago

Santana1053 commented 3 months ago

Would it be possible to have the ability to set the background image of a button in companion to be the image that was uploaded as a still in the media library? I currently have the image name as dynamic label but sometimes the labels can be ambiguous, and it would be super helpful to just be able to see the image on the button itself. I was thinking that since the images can be previewed in the ATEM controller then the image information must be available to other remote clients as well.

dragon788 commented 1 month ago

This would be pretty tricky because the ATEM internally scales the image to either 720p or 1080p I think (16:9 formats), and so Companion would need a way to pull a preview AND decide how much to cut off the edges to fit the square button (since images are typically centered with black on the edges if they are 4:3 or something other than 16:9).

Julusian commented 4 weeks ago

I have made some progress on this (you can follow #312 for occasional updates). It semi-works, but needs some effort putting into making sure it is reliable, and to handle clips.

Its been quite a bit of work, as the atem library didn't have support for this, requiring porting of some code from another library, and figuring out the colour conversion formula. And tracking the state inside the module is not simple either. And this needs a performance analysis before it can be considered for merging, it won't be good if fetching images causes actions to get delayed

But it is doable, and will make an appearance one day (shown here is some random screenshots I had on my mac, being pulled by the module from the atem) image