clvLabs / PyATEMMax

A Python library to monitor and control Blackmagic Design ATEM video switchers.
https://clvlabs.github.io/PyATEMMax/
GNU General Public License v3.0
79 stars 20 forks source link

Using auto transition feature #11

Closed domipro closed 2 years ago

domipro commented 2 years ago

Hello,

I am using PyATEMMax to control a BlackMagic Mini Extreme ISO using a USB remote which works fine so far.

However I am trying to achieve the auto transition that comes with the ATEM Software Control. I am aware of setting the argument to one of the provided ATEMMixEffects but I do not know how to get the smooth fade between two scenes instead of the hard cut.

Thank you for your help!

EDIT: I think I found a solution for my problem. Instead of doing this

switcher.setProgramInputVideoSource(0, camNr)

I executed the AutoME:

switcher.execAutoME(0)

But I am not quite sure what the passed argument of execAutoME does, putting 0 kind of just worked.

clvLabs commented 2 years ago

Hi domipro, thanks for the feedback!

M/E stands for Mix Effect. This is an example of what you could find on that subject on google.

The fact that it's working when you use a 0 is because it's the first M/E. If you use an 1 instead, it will only affect the second M/E of the mixer (assumig it has more than 1 M/E)

To extend on the answer (I'm not expecting people to do this, but someone might find it interesting):

If you look on the (just fixed) exec methods doc page you'll see this:

execAutoME

execAutoME(mE: ATEMConstant) -> None

Execute: AutoMixEffect

    Args:
        mE: see ATEMMixEffects

The methods docs page talks about the subject and offers a link to Data - Protocol - ATEMConstant page, where you can find an explanation on how to use the mixEffect parameter.

Also, you'll find this in the Value lists section:

swicher.atem.mixEffects

So, with this said, you could execute your execAutoME as:

# All these are equivalent
switcher.execAutoME(0)
switcher.execAutoME("mixEffect1")
switcher.execAutoME(switcher.atem.mixEffects.mixEffect1)

Hope this helps, please tell me if I can close the issue with this.