Adjust ATEM USK Chroma Key settings with Midi Device

I found it a bit frustrating trying to set up the chroma key using the Blackmagic Design ATEM Software panel. Trying to change the values using the mouse while looking at the preview monitor was not very efficient.

So I used a MIDI device that has some rotary encoders and PowerShell to make the adjustments. See the video below for a demo

Using this almost made it fun playing with the options.

The Behringer CMD DC-1 seems to be on special at

This was automated using Windows PowerShell but could have just as easily been done with JustMacros.

You can find example code for this here…

Blackmagic Design TVS HD Flying Key animations

The Blackmagic Design Television Studio HD has added flying key features to the upstream key, something the original TVS did not support.

I created a demo video showing this feature in action using the software panel to control it.

A more seamless experience can achieved using PowerShell to automate the “key fly to” commands.

Example script (assumes you have already used SwitcherLib to connect to the TVS HD.

$mp1.MediaStill = 2
$key1.Fly = 1
$key1.OnAir = 1
$key1.FlyRunToKeyFrame = [SwitcherLib.FlyKeyFrameDestination]::FlyKeyFrameFull
start-sleep 1
start-sleep 1
start-sleep 1
start-sleep 1
$key1.OnAir = 0
$key1.Fly = 0

You can see from the video below how well the animation flows.

VS-Code Snippet file for Blackmagic ATEM Configuration XML file

The Blackmagic ATEM software allows users to export all or a subset of the switcher configuration as an XML file. This can be useful for manipulating complex functions such as key’s and DVE options but has become even more important with the support for macros.

The ATEM software allows recording of simple macros by watching what you do in the software or hardware panel but these macros will often require some post editing to get them working just the way you want.

After exporting the configuration from the software you will need to edit the file. Any text or code editor can be used for this.

A good open source, cross platform, code editor I use is VS-Code You can download ready to install versions for Mac, Linux and Windows from

I have created this snippet definition for VS-Code to insert some common macro operations or create an entire ATEM configuration file for macros.

Just copy the xml.jason file to the default location based on your OS:

Windows: %APPDATA%\Code\User\snippets\

MAC: $HOME/Library/Application Support/Code/User/snippets/

Linux: $HOME/.config/Code/User/snippets/

One of the useful things about Snippets is that they can insert multiple elements (Operations) and globally update attribute values. For example, inserting all the DSK options is that you have specify the keyIndex value. This can easily be done by just editing the first occurrence of the attribute.


Once the snippet is more complete I’ll publish it to the VS-Code gallery.

Control Hyperdeck via ATEM with PowerShell script

SwitcherLib now supports Blackmagic Hyperdeck control (version 2.9).

Everything but media file details has been implemented.

Full list of features:

Example PowerShell:

add-type -path ‘C:\Users\ian\Documents\WindowsPowerShell\SwitcherLib.dll
$Global:atem = New-Object SwitcherLib.Switcher(“”)
start-sleep 5
Start-Sleep 5
$HyperDeck[0].CurrentClipTime = “00:02:00:25”
start-sleep 5
$HyperDeck[0].Jog(500) #jump 5 seconds (50p)
start-sleep 5
start-sleep 5
$HyperDeck[0].CurrentTimelineTime #time from start of clip 0


Control ATEM Multi view layout with PowerShell

I have updated SwitcherLib.dll to support configuration of the multi view properties.

Example code:

#Get input label for each window
$inputs = $atem.GetInputs()
$lookup = @{} # hashtable for quick lookup of inputID Label
foreach($a in $inputs){
While ($i -lt $mv[0].WindowCount) {
    Write-host "Window: $($i) InputID: "$mv[0].GetWindowInput($i) $lookup.Get_Item($mv[0].GetWindowInput($i))
    $i ++
$mv[0].Layout = "Left"
$mv[0].SetWindowInput(3,1000) #Color Bars in preview window

I  have not been able to test the SetWindowInput function as my TVS doesn’t have this capability (CanRouteInputs returns False)


How to set ATEM Mixer Property Values

I have started adding enumerators for some of the mixer properties. This is handy when you can’t remember what the valid parameters are.

For example the Transition Style. The intelli-sense in PowerShell makes it easy to discover the valid values as can be seen in this screen capture (click the image to show full screen):


To list all the available values, try this command:

[enum]::GetValues([SwitcherLib.MixerTransitionStyle]) | ?{$_.Value__ }

Record H.264 from Blackmagic Television Studio USB Port with MXPTiny

The Blackmagic Television Studio (TVS) has a built in H264 encoder for the Program bus output. It provides this via the USB 2.0 port. The BMD H.264 Pro Recorder has the same capability.

Blackmagic Desktop Video utility can capture this but the file is very big and you have to wait until you stop and save the file before you can access it. If the software crashes then the content is lost. This solution also doesn’t allow streaming the content in real-time.

There is a good 3rd party product, MX Light that many people use for streaming which you may want to evaluate.

MXPTiny is an open source solution worth considering. I have found this to be very reliable and it creates a file that can be read by other applications such as VLC or ffmpeg at the same time as it is being created.


This version was created in Dec 2015 from a fork of the original project created over 4 years. I have found this new version it to be reliable with the latest BMD drivers (ATEM 6.8 and Desktop Video 10.7 – must be installed on same computer as MXPTiny).

I have made a compiled version available here (updated to release rather than debug build)…

It requires that you also install the required  Visual C++ Redistributable for Visual Studio 2015 x86 or x64 (install the x86 version even if running 64bit OS). Only tested on Windows 8.1 and 10.

If MXPTiny reports no device found, try running C:\Program Files (x86)\Blackmagic Design\Blackmagic Desktop Video\BMDStreamingServer.exe