wxATEM – Minimal control interface for (some) BMD ATEM video switchers
Just another software control panel for some * of the Blackmagic Design ATEM video switcher models. Although such thing may seem strange considering the existence of the original, powerful and freely available software control panel from BMD, surprisingly, in my particular use case, there were several reasons why I preferred to build this version of the program – but limited to just basic video sources switching.
* Currently supported models are ATEM Television Studio HD, ATEM 1 M/E Production Studio 4K and ATEM 1 M/E Constellation; support for the ATEM SDI model is also expected to be soon added.
Note: the use of this program makes sense in places where several video switchers are used together in same reachable network; instead, for just a few units, the BMD's original software is, without question, the much better solution; however, even in such a case, you may read the following just for curiosity :)
With reference to the original BMD ATEM Switchers software:
I really don’t like the way the program launches, in that it always connects (or tries to connect) to the last switcher where it was connected before last closing, without asking me if I really want to do this or not; specifically, if I simply want to connect to whatever IP address, I have to wait for the program to connect for no reason to the previous switcher, just to let me enter the new IP address in order to perform a totally useless disconnect-then-connect cycle
there is no way to disconnect from switcher and just let the program open
there is no indication in the main interface about what IP address the switcher is currently connected to
there is no way to select an IP address from a list
there is no IP addresses connections history
if the devices automatic discovery feature on a local network is enabled by the network admins, the IP addresses of the found switchers are hidden
switching an AUX source from that drop-down menu is awkward
switching by MACRO from that floating panel that overlaps the main panel is idiotic
there is no red key tally indication (on PGM keys bus) or green key tally indication (on PVW keys bus) if an input source – like a camera – happens to be in some KEY combination via MACRO, in spite the fact that the corresponding tally outputs of a connected BMD GPI and Tally Interface (if present) are switched ON during that time; because of that, the switcher operator may have no idea about what camera (or cameras) is (or are) currently routed on PGM or PVW buses
Certainly, most of the above listed annoyances are of no importance for single switcher usage; however, the wxATEM software presented here addresses the cases where basic video sources switching needs to be performed on several and mixed models of ATEM switchers – but still one at the time – from a single PC.
Worth mentioning: I am well aware of the Openswitcher project , which to date is already a mature software, has far more functions already implemented than the wxATEM program presented here and has also a few remarkable features not present on the original BMD ATEM Switchers software – like the ability to add authentication to the connection process.
However, in my use case, there were a few facts that ultimately led me to choose a different approach:
there was an express requirement to be able to switch video sources via macro commands, something not yet implemented in Openswitcher
given the above fact, the first thing I did was to try to add the missing macro functionality to Openswitcher; however, while I succeeded to dig into the code on a Linux PC, I get stuck on compiling the pyatem library on Windows PC, which is my daily working tool; since I cannot do programming without the possibility to test immediately the result, I simply abandoned that road
apart from the missing macro implementation, Openswitcher versions 0.9.1 (and also 0.8.2) have a bug, in that the Preferences menu – where the IP address must be entered – does not open; the workaround is to use version 0.7.4 and either stick with it, or use it only to set the IP address and then switch the normal operation to version 0.9.1 (which is obviously a tormented solution)
Openswitcher still retain the same weird “connect-even-if-not-desired” concept at program opening, probably wishing to mimic the original BMD version behaviour
(ii) wxATEM program download
The wxATEM is written in Python programming language, uses the PyATEMMax library to communicate with the physical switcher and its user interface is built using the wxPython GUI library – hence the program’s name. In theory, it should run directly on whatever platform wxPython is already installed, with the mention that – if running on Windows – the pywin32 library is also required; however, as far as I could test on Windows 10, Windows 11 and Linux Mint, the Python source code runs perfectly on Windows, but on Linux some GTK errors occur, which eventually crashes the program. I still have no idea what is the relation between wxPython and GTK and what might be missing or misconfigured.
The program is available below for download, mainly as Windows stand alone executable build, but also as runnable Python source code – just look under the src directory inside the .zip file. Run whichever variant is desired or appropriate.
Notes: Current software version is 184.108.40.206 (click here for versions history) The software is published under the GPLv3 license.
There is no installer for the Windows version, just unpack the archive and run it as portable program. The actual bundle is compiled using Python version 3.11.3 (64 bit) and PyInstaller version 5.6.2.
On Windows, the program creates the wxATEM.ini user data file under the %systemdrive%\Users\%userprofile%\AppData\Roaming\wxATEM user directory path, where it retains a few current settings between sessions – such as the program last position on desktop or the interface language setting.
At the very first program launch, the program looks for the atem_data_source.csv ATEM data source file in the same location as the main executable file; afterwards, the location of this or another similar file can be changed in the IP selection dialog window. This file is the one from which predefined IP addresses can be selected. A sample of it is included in the archive, with a few dummy IP addresses & associated metadata already filled in.
The ATEM data source file is actually just a comma separated values file, with each ‘cell’ enclosed in quotation marks. Initially, the table can be generated either directly from within the IP selection dialog window, or by creating manually a .csv file, or by creating first a LibreOffice Calc file – also included as sample in the archive – and then save it as .csv file. Later on, the fields can be edited directly from within the IP selection dialog window.
Note: the provided source code includes a patched listctrl.py module, in order to address a few bugs in the original module related to row selection and editor cursor visibility under certain circumstances. More details can be found within this topic on the Discuss wxPython web site. The compiled program is based on this patched version.
(iii) A few facts about wxATEM
Known things ...
it is based on – and thus limited to – the PyATEMMax Python library, whose implementation is in turn based on the Blackmagic ATEM switcher protocol as reverse engineered by Kasper Skårhøj (and further limited there to the open sourced version)
right from the start, my intention was to only be able to do basic switching of video sources, with no perspective for audio or cameras adjustments; however, I ended up implementing also a few ON/OFF audio switching, but only for the “old fashion” audio setting style, i.e. not for Fairlight audio mixer version as found in newer Constellation models
at program launch, the program opens, but nothing else happens; connection to switcher must be initiated manually and on demand only
a switcher IP address can be either entered directly, or selected from a predefined list, but anyway in both cases via the IP selection dialog window
upon a successful connection, the ATEM IP address and ATEM model is permanently displayed on the UI; however, no firmware version is displayed, although I wish there was that possibility (either the PyATEMMax has not (yet) this option implemented and/or I don't know how to query it)
effective connection attempt timeout is set programmatically to 8 seconds
actually, the connection is set to be performed in 2 steps – first a PING-like simplified connection handshake and then a full connection handshake; the 8 seconds timeout is related, in principle, to the second connection step
by default, the red key tally indication (on PGM keys bus) and/or green key tally indication (on PVW keys bus) reflect also the global tally indication as sent by the switcher to the GPI and Tally Interface (regardless of whether such one is physically present or connected); this feature can be disabled, so the red and green tally behaviour of the PGM and PVW keys tally indication will then revert like in the original BMD ATEM software
the interface is multilingual, provided the target language translation file exists; current included language are English and Romanian, but any other language can be added relatively easy **, requiring only two things:
define the new language ID between # UI lang sets and # UI lang set end tags in the wxATEM.py file
translate effectively the UI strings, using an editing program that can handle the gettext file format – such as Poedit ; the template used for translation is the wxATEM.pot file from the /src/locale/ directory
** Well, a little bit of programming skills are still required; e‑mail me directly if you are looking for help regarding the translation process.
... and missing ones – at least for now
there are no keyboard shortcuts; I intend to add this option at one point, hopefully in a fully customizable fashion – which means user definable assignments relative to the few keys available on a PC keyboard
the sort order on all columns in the IP selection dialog window is pure arithmetic, i.e. ASCII/Unicode based ascending or descending, meaning that an address like 192.168.1.123 (for example) will appear as smaller number than 192.168.1.2; I intend to try to adapt the
natsort library to the list control code in order to perform a natural sort order on columns, but I am not yet sure if I will succeed or even if I will have time for that in the near future
in a busy network infrastructure, the connection to the switcher may fail on first attempt and therefore another attempt must be initiated; this problem may occcur also if the switcher itself is busy performing an auto loop macro sequence; at the same time, the original BMD ATEM software does not encounter such a problem
(iV) To do list
Things I intend to implement at some point:
make dynamic the columns number in the ATEM data source list, so that more metadata column be able to be added or useless metadata column be abled to be stripped
add a connection timeout when the program remains unused for a few minutes, triggered after 3/5/10 minutes (or never)
make functional all software keys that are currently greyed out in the main interface