ATEM Mini remote access methods

23/07/2021 - 09:06
No votes yet

Access, configure, record, stream and make changes to an ATEM Mini (Pro or Pro ISO) remotely without using the proprietary software.

The ATEM Mini switches can be manipulated any many different ways. There is the proprietary Windows/OS X only software and UDP protocol that is used to do just about everything possible. Unfortunately the software is Windows and OS X only, strange enough as it is also made with Qt, so Linux build should be a walk in the park. And the UDP protocol is closed and undocumented officially. Fortunately it has been reverse engineered and there are plenty of libraries available so custom applications are possible.

But the devices can also be accessed with simple TCP protocols:

  • Videhub routing protocol on port 9990
  • Configuration protocol on 9977
  • Blackmagic ATEM Ethernet Protocol 1.0 on port 9993.
  • FTP is also available on the Pro devices for recording transfer.

Altough the protocols are limited in functionality, they do provide some nice features. For example you can easily start a video stream to a custom RTMP endpoint, something you actually can't do from the proprietary software without edinting the Streaming settings XML file.

Videohub Routing protocol

The basic input to output routing can be changed and monitored using the videohub routing protocol on port 9990. This is a very simple protocol, a bit verbose perhaps, but still very easy to use for both setting outputs but also for monitoring changes. And the monitoring could be used things like custom tally devices. Or the routing for custom input/output switching devices, say rotary encoders, motion detection, buttons, etc.

Example connection using the Videohub protocol

Videohub Routing protocol examples
Operation Input/Output
Initial connection message
telnet 192.168.1.99 9990
Trying 192.168.1.99...
Connected to 192.168.1.99.
Escape character is '^]'.
PROTOCOL PREAMBLE:
Version: 2.7

VIDEOHUB DEVICE:
Device present: true
Model name: ATEM Mini Pro
Friendly name: ATEM Mini Pro
Unique ID: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Video inputs: 14
Video outputs: 3

INPUT LABELS:
0 Black
1 Camera 1
2 Camera 2
3 Camera 3
4 Camera 4
5 Color Bars
6 Color 1
7 Color 2
8 Media Player 1
9 Media Player 1 Key
10 Multi View
11 Program
12 Preview
13 Camera 1 Direct

VIDEO INPUT STATUS:
0 Internal
1 HDMI
2 HDMI
3 HDMI
4 HDMI
5 Internal
6 Internal
7 Internal
8 Internal
9 Internal
10 Internal
11 Internal
12 Internal
13 HDMI

OUTPUT LABELS:
0 Output
1 Program
2 Preview

CONFIGURATION:
Video Mode: 1080p30

VIDEO OUTPUT ROUTING:
0 10
1 1
2 1

END PRELUDE:

 

   

ATEM Ethernet protocol

The ethernet protocol is on port 9993 and very close to the Hyperdeck protocol (No you can use ATEM Mini as a hyperdeck). From this interface you can control streaming and recording and query basic device details.

Especially the streaming commands are handy as you can start streaming directly to a custom streaming endpoint, with custom bitrate, without going trough the XML file.

Blackmagic ATEM Ethernet Protocol 1.0 examples
Operation Input/Output
Initial connection message
telnet 192.168.1.99 9993
Trying 192.168.1.99...
Connected to 192.168.1.99.
Escape character is '^]'.
500 connection info:
protocol version: 1.0
model: ATEM Mini Pro
friendly name: ATEM Mini Pro
unique id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 

Help

Send: ?\n

201 help:
Blackmagic ATEM Ethernet Protocol 1.0
-------------------------------------------

Available commands:
    help                                       return this help
    commands                                   return commands in XML format
    device info                                return device information
    quit                                       disconnect ethernet control
    ping                                       check device is responding
    record                                     record from current input
    record: name: {name}                       record named clip (supports UTF-8 name)
    record spill                               spill current recording to next slot
                                               use current slot id to spill to same slot
    stop                                       stop playback or recording
    slot info                                  query active slot
    slot info: slot id: {n}                    query slot {n}
    slot select: slot id: {n}                  switch to specified slot
    stream start: url: {url} key: {key}        start video streaming using specified url and key (bitrate selected automatically)
    stream start: url: {url} key: {key} bitrate: {bitrate} start video streaming using specified url, key and bitrate (in bps)
    stream stop                                stop video streaming
    configuration                              query configuration settings
    configuration: record prefix: {name}       set the record prefix name (supports UTF-8 name)
    watchdog: period: {period in seconds}      client connection timeout

 

Start video stream to custom RTMP endpoint

Send:

stream start: url: rtmp://your.own.server/live key: SECRETVIDEO

Configuration protocol

The configuration protocol is on port 9977, and can be used to seting some of  the settings available in the ATEM Setup program. The input button cut behaviour (direct or with preview), keep/drop chroma/PictureInPicture keys on input change and the button backlight intensity. Strangely enough you can also get the streaming and recording status from this interface, but you need to poll for them, the device won't send any changes on status updates.

Configuration protocol examples
Operation Input/Output
Initial connection message
telnet 192.168.1.99 9977
Trying 192.168.1.99...
Connected to 192.168.1.99.
Escape character is '^]'.
PROTOCOL PREAMBLE:
Version: 1.0

ATEM SWITCHER DEVICE:
Model name: ATEM Mini Pro
Unique ID: 598de294c8e949168d127c1819aaee0d
Label: ATEM Mini Pro
Host name: ATEM-AVB-7c2e0d11f1b1

ATEM MINI PANEL SETTINGS:
Switching mode: 2
Drop picture in picture key: 1
Drop chroma key: 1
Button led backlight level: 45

RECORD AND STREAM:
Is streaming: 0
Is recording: 0

END PRELUDE:

 

Get record and stream status

Send:

RECORD AND STREAM:\n\n

Device responds with:

ACK

RECORD AND STREAM:
Is streaming: 0
Is recording: 0
Send PING

Send:

PING:\n\n

Device should respond with:

ACK

Set and configuration option,

for example button backlight level.

The other options work exactly the same way.

Send:

ATEM MINI PANEL SETTINGS:\n
Button led backlight level: 75\n\n

The device will respond with the settings:

ACK

ATEM MINI PANEL SETTINGS:
Switching mode: 2
Drop picture in picture key: 1
Drop chroma key: 1
Button led backlight level: 75

 

FTP

The ATEM Mini Pro and Pro ISO models supports ftp access to attached storage. The ATEM Mini obviously does not. You can easily transfer your recordings from the USB storage device without unplugging it and you can even do it while a recording is active!

FTP sessions example
FTP Download session
# ftp 192.168.1.99
Connected to 192.168.1.99.
220 Hello, Blackmagic FTP Server
Name (192.168.1.99:xxxxx): anonymous
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Directory okay; about to open data connection.
drwxrwxrwx 3 root root                0 Jan  1  1970 ATEMVideoR
226 Directory send completed.
ftp> cd ATEMVideoR
250 directory changed to /ATEMVideoR
ftp> ls
200 PORT command successful.
150 Directory okay; about to open data connection.
drwxrwxrwx 3 root root           131072 Jul  8 11:42 System Volume Information
-rw-rw-rw- 1 root root          1209676 Jul 19 18:07 testitesti.mp4
-rw-rw-rw- 1 root root             4096 Jul 19 18:07 ._testitesti.mp4
drwxrwxrwx 3 root root           131072 Jul  8 11:55 $RECYCLE.BIN
226 Directory send completed.
ftp> bin
200 Command successful.
ftp> get testitesti.mp4
local: testitesti.mp4 remote: testitesti.mp4
200 PORT command successful.
150 File status okay; about to open data connection.
250 Requested file action okay, completed.
1209676 bytes received in 0.03 secs (37.0813 MB/s)
ftp> close
221 Goodbye.
ftp>

 

 

 

Keywords: 
ATEM, Blackmagic