I played a bit with ATEM 1 M/E Constellation HD, firmware 8.7, which worked fine in direct operation. However, I observed that the macro function is not yet implemented, at least not in a workable way.
The switcher I played with had some macros already defined (via native ATEM software on Windows), but then I also created a few simple test macros (also via native ATEM software on Windows). All macros are then present as buttons in Openswitcher, but that's about all.
By comparing the scripts, it gives this:
example 1:
(original xml from ATEM Autosave)
...
<MacroPool>
<Macro index="0" name="test" description="">
<Op id="ProgramInput" mixEffectBlockIndex="0" input="Camera1"/>
<Op id="PreviewInput" mixEffectBlockIndex="0" input="Camera2"/>
<Op id="CutTransition" mixEffectBlockIndex="0"/>
</Macro>
</MacroPool>
...
(Openswitcher macro source)
program-input
preview-input index=0 source=2
unknown-action
example 2:
(original xml from ATEM Autosave)
...
<MacroPool>
<Macro index="2" name="CAM2" description="SHAKE">
<Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="0" onAir="False"/>
<Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="1" onAir="False"/>
<Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="2" onAir="False"/>
<Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="3" onAir="False"/>
<Op id="ProgramInput" mixEffectBlockIndex="0" input="Camera3"/>
<Op id="DownstreamKeyOnAir" keyIndex="0" onAir="False"/>
<Op id="DownstreamKeyOnAir" keyIndex="0" onAir="True"/>
<Op id="MediaPlayerSourceStillIndex" mediaPlayer="1" index="2"/>
<Op id="MediaPlayerSourceStill" mediaPlayer="1"/>
<Op id="DownstreamKeyOnAir" keyIndex="0" onAir="False"/>
<Op id="DownstreamKeyOnAir" keyIndex="0" onAir="True"/>
</Macro>
</MacroPool>
...
(Openswitcher macro source)
unknown-action
unknown-action
unknown-action
unknown-action
program-input
unknown-action
unknown-action
unknown-action
unknown-action
unknown-action
unknown-action
Maybe I could have made some additions to the Python code for some of the missing macro entries, but unfortunately I could not compile successfully the Openswitcher under Windows, as I get stuck at compile errors (currently at mediaconvertmodule, something like "pyatem/mediaconvertmodule.c(13): error C2099: initializer is not a constant" etc.) and while I am a bit skilled at Python to some degree, I a have no experience with C/C++ at all (and not much time to dig).
Are there any plans for macro further development ?
*If* I could do some additions to Python in a Linux environment, can these be later added to the Windows build somehow ?
Cristi
--
Cristian Secară
mobil: +40 722 570015
https://www.secarica.ro
Hello Cristian,
Yes the macro functionality is quite lacking in the pyatem module at the
moment. The Macros in the ATEM protocol is a complete seperate set of
commands to the normal switcher control. So for having full coverage of
the the ATEM macros everything has to be implemented twice (and for xml
import/export everything has to be implemented for a third time). None
of these things have an actual 1-to-1 mapping or way to do automatic
translation.
Actually triggering the macros from OpenSwitcher is something that's
easier implement. Only thing missing is the TriggerMacro command and a
bit of UI work.
Doing development on Windows is significantly more difficult than making
it work on Linux first and letting CI figure out the Windows build. The
full codebase between Windows and Linux is shared so any improvement you
make on Linux will trickle down to the Windows builds once a new release
has been made.
Greetings,
Martijn Braam
On 7/13/23 10:23, Cristian Secară wrote:
> I played a bit with ATEM 1 M/E Constellation HD, firmware 8.7, which worked fine in direct operation. However, I observed that the macro function is not yet implemented, at least not in a workable way.
>
> The switcher I played with had some macros already defined (via native ATEM software on Windows), but then I also created a few simple test macros (also via native ATEM software on Windows). All macros are then present as buttons in Openswitcher, but that's about all.
>
> By comparing the scripts, it gives this:
>
> example 1:
>
> (original xml from ATEM Autosave)
> ...
> <MacroPool>
> <Macro index="0" name="test" description="">
> <Op id="ProgramInput" mixEffectBlockIndex="0" input="Camera1"/>
> <Op id="PreviewInput" mixEffectBlockIndex="0" input="Camera2"/>
> <Op id="CutTransition" mixEffectBlockIndex="0"/>
> </Macro>
> </MacroPool>
> ...
> (Openswitcher macro source)
> program-input
> preview-input index=0 source=2
> unknown-action
>
> example 2:
>
> (original xml from ATEM Autosave)
> ...
> <MacroPool>
> <Macro index="2" name="CAM2" description="SHAKE">
> <Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="0" onAir="False"/>
> <Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="1" onAir="False"/>
> <Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="2" onAir="False"/>
> <Op id="KeyOnAir" mixEffectBlockIndex="0" keyIndex="3" onAir="False"/>
> <Op id="ProgramInput" mixEffectBlockIndex="0" input="Camera3"/>
> <Op id="DownstreamKeyOnAir" keyIndex="0" onAir="False"/>
> <Op id="DownstreamKeyOnAir" keyIndex="0" onAir="True"/>
> <Op id="MediaPlayerSourceStillIndex" mediaPlayer="1" index="2"/>
> <Op id="MediaPlayerSourceStill" mediaPlayer="1"/>
> <Op id="DownstreamKeyOnAir" keyIndex="0" onAir="False"/>
> <Op id="DownstreamKeyOnAir" keyIndex="0" onAir="True"/>
> </Macro>
> </MacroPool>
> ...
> (Openswitcher macro source)
> unknown-action
> unknown-action
> unknown-action
> unknown-action
> program-input
> unknown-action
> unknown-action
> unknown-action
> unknown-action
> unknown-action
> unknown-action
>
> Maybe I could have made some additions to the Python code for some of the missing macro entries, but unfortunately I could not compile successfully the Openswitcher under Windows, as I get stuck at compile errors (currently at mediaconvertmodule, something like "pyatem/mediaconvertmodule.c(13): error C2099: initializer is not a constant" etc.) and while I am a bit skilled at Python to some degree, I a have no experience with C/C++ at all (and not much time to dig).
>
> Are there any plans for macro further development ?
> *If* I could do some additions to Python in a Linux environment, can these be later added to the Windows build somehow ?
>
> Cristi
>