Skip navigation.
Home

ATEM Protocol Unleashed

26 posts / 0 new
Last post
Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
ATEM Protocol Unleashed

Hi folks,

Celebrating the three years anniversary of our pioneering work on implementing the ATEM protocol on the Arduino platform, we decided to give our libraries a serious overhaul and implement everything meaningful on that platform. In the process we decided to document it all and this is the result:

http://skaarhoj.com/fileadmin/BMDPROTOCOL.html

This should be authoritative! It's completely tested with all 6 ATEM models, all supported features are checked within their value ranges - and we intend to keep this continuously updated and tested in the future too! We have been working a full man month on this project with no direct compensation whatsoever, so we hope this is not just very useful for all you guys doing other hacking on the protocol, but that you will also let us know if you have additional information to add to our documentation - just send it to me directly or post it here and we will gladly incorporate it. We are very proud to present this to the community!

Love and sharing,

- Kasper, SKAARHOJ K/S, http://skaarhoj.com/

Offline

Location

Brighton,
United Kingdom
Joined: 23/04/2011
Posts: 1209
Thank you Kasper this is a

Thank you Kasper this is a really useful resource

cheers
tom

thos-berlin's picture
Offline

Location

berlin
Germany
Joined: 19/06/2012
Posts: 444
Great work, thank you for

Great work, thank you for sharing !

Thomas  S e e w a l d - thos-berlin (amateur)

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
Thanks guys, So far no one

Thanks guys,

So far no one has found reason to add stuff (which of course is no surprise because it's so comprehensive already ;-)

But actually I found a few errors myself and also a chance to upgrade it the other day when Black Magic Design released software version 6.2 adding zoom control. This is now in the library as well. And tested. :-)

Merry Christmas!

- kasper

Offline

Location

London
United Kingdom
Joined: 08/03/2013
Posts: 19
It's a shame there is no way

It's a shame there is no way via the protocol to control L/R channel volume and balance... I know it's not an audio router this product but would be very useful to be able to mix channels as multiple mono inputs! Would be icing on the cake!

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
My top list of features in

My top list of features in this regard would be: a) adjustment of high/mid/low tones and b) variable audio delay to compensate for video processing delay. And maybe to be able to gain inputs more than 6db.

rcourtney's picture
Offline

Location

Eastern Iowa,
United States
Joined: 07/12/2011
Posts: 299
setAudioInputBalance

In Peter's lib it has balance control

/// Set the balance of the audio input. @p balance is a value between -1.0 and +1.0.
void setAudioInputBalance(quint16 index, float balance);
/// Set the gain of the audio input @p index. @p left and @p right is between +6dB and -60dB (-infdB)
void setAudioInputGain(quint16 index, float gain);
/// Set the gain of the audio master output. @p left and @p right is between +6dB and -60dB (-infdB)
void setAudioMasterOutputGain(float gain);

I don't use my ATEM for audio mixing.  I do use the main level metering for recording confidence.

I am not sure that you can receive actual audio packets from the ATEM to contour the audio profile.
An external mixer such as RML Lab's Software Audio Console or Behringer's X32 Core/Rack that can be
controlled by OSC packets might be be better.

I'd love to see this done Kasper!

 

 

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
The Arduino library does all

The Arduino library does all that too of course, for instance:

void setAudioMixerInputBalance(uint16_t audioSource, int balance)

You can receive audio packets from any input source as well.

Offline

Location

Brighton,
United Kingdom
Joined: 23/04/2011
Posts: 1209
Balance isn't PAN though,

Balance isn't PAN though, AFAIK it is a BMD hardware (firmware) issue that prevents you from using channels as mono inputs - you cannot choose to use channel 1of SDI 2 and have it come out of both L+R master outputs. 

The ATEM audio mixer is next to useless, it has some limited applications for very basic audio mixing needs but it cannot replace a proper audio mixer.  It is a fairly trivial task to integrate an external audio mixer into a Skaarhoj controller and spit out OSC or MIDI to give you AFV on certain channels of a Behringer X32 or Yamaha 01v or whatever. 

cheers
tom

rcourtney's picture
Offline

Location

Eastern Iowa,
United States
Joined: 07/12/2011
Posts: 299
ATEM audio

I see what you are getting at.   Camera audio has been de-embedded from the SDI stream for our "proper audio mixer"
so never experimented with it.

Plugging in headphones into the computer controlling the ATEM may be interesting to monitor the program L/R.
Can't say I'd trust it as final source for program out.

psn
psn's picture
Offline

Location

Varberg
Sweden
Joined: 03/06/2012
Posts: 84
Correction for TrSS

Hi,
Here's a fix for the TrSS command:
Byte 1: Style for the ongoing transition
Byte 2: Key bitmask for the ongoing transition
Byte 3: Style for next transition
Byte 4: Key bitmask for next transition

Byte 3 and 4 are only different if you change the bitmask or style during an ongoing transition.

// Peter Simonsson

Offline

Location

Copenhagen
Denmark
Joined: 03/09/2012
Posts: 35
Short presentation video

Hi guys

We made a short video where Kasper presents the new ATEM protocol for the Arduino platform.

See video

/>
Regards

Bjørn E. Thorup // Engineering and Marketing, http://skaarhoj.com

psn
psn's picture
Offline

Location

Varberg
Sweden
Joined: 03/06/2012
Posts: 84
Addition to MPfe

MPfe is missing the following:
Byte 5-20: Hash of the still (string)

Oh and the name can be longer than 16 bytes.

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
Thanks, Peter! I really

Thanks, Peter! I really appreciate. I'll add them to the online documentation at the earliest convenience.

- kasper

psn
psn's picture
Offline

Location

Varberg
Sweden
Joined: 03/06/2012
Posts: 84
One more update

Hi,

Forth byte in CCmd message for focus, iris and zoom (might be in more but I haven't started to look into color correction yet) tells whether the change is relative or not. (1 == relative)

// Peter Simonsson

Benpaul's picture
Offline

Location

Minneapolis,
United States
Joined: 23/01/2015
Posts: 5
I'm new here =)

Hi everyone, I've been reading from this site for a few months now and finally decided to sign up. Anyways, I have an ATEM TVS, and I do all control from Lenovo U510. My set up is 2 sony a6000 (trying to add a third), connected by hdmi to Atem, Alesis mixer to digital audio converter. Atem connects to lenovo by Cat5e and USB, PROG HDMI output to BMD Intensity shuttle USB 3.0- Then Streaming using Wirecast. I'm quite the beginner with everything and learning "on the job" basically. What I'm trying to figure out is "unlocking" the other 3 keyers, DSK, and the other stuff that is Greyed out and unselectable on the BMD Atem Control software. If its possible, please let me know. I use the Atem in versatile environments, sometimes I would like to use it in Chroma key, and other times in Live Production of Conferences. So Far I have the basics, if someone can point me in the right direction.
Thanks in Advance

Joshua Lee
Guide US TV Media Production
www.GuideUS.tv

thos-berlin's picture
Offline

Location

berlin
Germany
Joined: 19/06/2012
Posts: 444
Sorry. "Unlocking" of grayed

Sorry. "Unlocking" of grayed out controls s not possible. The control software supports different ATEM versions. The grayed out controls are for other models.

Thomas  S e e w a l d - thos-berlin (amateur)

psn
psn's picture
Offline

Location

Varberg
Sweden
Joined: 03/06/2012
Posts: 84
Upstream key DVE mask

Hi,
Support for DVE mask:

KeDV:
47= Mask enable
48,49= float Top mask*1000
50,51= float Bottom mask*1000
52,53= float Left mask*1000
54,55= float Right mask*1000

CKDV:
20 - enabled
21 - top
22 - bottom
23 - left
24 - right

// Peter Simonsson

psn
psn's picture
Offline

Location

Varberg
Sweden
Joined: 03/06/2012
Posts: 84
More DVE mask

Hi again,
The DVE mask is also available in the keyframe.

KKFP:
44,45 = top mask
46,47 = bottom mask
48,49 = left mask
50,51 = right mask

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
ATEM 6.3 report

Generally, thanks Peter for all the additions, they are now integrated in various ways at http://skaarhoj.com/fileadmin/BMDPROTOCOL.html which is also updated for ATEM Software Control 6.3 and the firmware version 2.16.

Changelog of firmware:
- IMPORTANT: The "CAuS" and "AuxS" commands are changed from 8 to 4 bytes! Thats all. But important of course.
- I experience for a lot of values like size and position that the ATEM switcher stores/returns a value with a rounding error or something. For instance, if I set the DVE Position X to 890, the return value becomes 889 instead. But it's not consistent, for instance setting the value to 1880 is accepted and stored/returned as such. This behaviour has defintely changed with the new version. It's not a big deal in some ways, but for any code that sets a value and wait for it to be confirmed, this will have to be taken into account. Does anybody have a clue why this has changed?
- The Symmetry value and slider under "Transition / Wipe" settings doesn't work anymore. The get command always returns 5000 (50%) and any change made doesn't result in a value update back to the bus. It's like they decided to skip this feature but forgot to remove the control in the software. Weird.

- kasper

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
ATEM Macros in Arduino Library

Oh, forgot to mention that we of course have implemented playback and recording of the new macros feature in the ATEM switchers:

http://skaarhoj.com/fileadmin/ATEM_PROTOCOL.html

Have fun with your Arduinos! :-)

- kasper

Offline

Location

Surprise,
United States
Joined: 17/03/2015
Posts: 5
In Regards to this:

In Regards to this: IMPORTANT: The "CAuS" and "AuxS" commands are changed from 8 to 4 bytes! Thats all. But important of course.

I cannot get the changeAuxState/CAuS command to work with my newer "4k" Switchers (I have a 1ME and a 2ME).  Other commands work properly, but not this one.  I made sure I'm running the latest ATEM.h and ATEM.cpp files.  What else should I check?

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
You need to use one of the

You need to use one of the latests _NEW_ library versions, for instance this one:

https://github.com/kasperskaarhoj/SKAARHOJ-Open-Engineering/tree/master/...

It's almost backwards compatible with the old "ATEM" library, but there is a slight change you need to do around the loop() function (see the examples for what to change).

When you use this and you use the latest firmware for your ATEM switcher it will work.

- kasper

(Notice the old "ATEM" arduino library is obsolete and we will not maintain it anymore although some of the example sketches will still be useful, but slowly migrated over to ATEMstd or some of the other variants.)

Offline

Location

Surprise,
United States
Joined: 17/03/2015
Posts: 5
That resolved my issue, thank

That resolved my issue, thank you!

Related question: with the new library, the responses from the system are no longer shown (verbose).  Is there a way to enable so that when a button is pressed on the switcher it alerts the arduino library?  Previously it would send an update to the console.

Offline

Location

Vanløse
Denmark
Joined: 08/10/2011
Posts: 101
TRy to open ATEMbase.h and

TRy to open ATEMbase.h and find the line

#define ATEM_debug 0

and change to 1.

That will enable extra stuff in the serial monitor in combination with high values of .serialOutput()

Offline

Location

new york
United States Minor Outlying Islands
Joined: 19/01/2017
Posts: 1
Most of the free stuff you

Most of the free stuff you can find on this page shares in the form of instructional videos or files available for download from GitHub or this website. can be found on GitHub SKAARHOJ Open Engineering lot of printed board design (PCB) and Arduino-compatible library for free. In return, we ask only that respects the license terms at the most basic level tells us that you have to credit the visible when using our free technology. Money is not everything, and while we can help you with open source hardware and software, you can help us to become famous in the world. This should be a sweet thing for all. We did a Q & A page on licensing which will help to make us happy.