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 https://github.com/Microsoft/vscode. You can download ready to install versions for Mac, Linux and Windows from https://code.visualstudio.com/

I have created this snippet definition for VS-Code to insert some common macro operations or create an entire ATEM configuration file for macros. https://github.com/imorrish/ATEMConfigSnippets

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 http://mxlight.co.uk/ 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 https://github.com/FlsZen/MXPTiny/ 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

Upstream Key Object added to SwitcherLib.dll

You can now control all aspects of the Upstream Keys. I have only tested this with a TVS which only has one USK and no DVE. I have not added Key Fly Parameters yet.
DLL version is 2.5

$USKs = $atem.GetKeys()
$USKs[0].Type = "Chroma"
$usks[0].InputFill = 4
$USKs[0].OnAir = 1

$key1.Type = "Pattern"
$key1.Pattern = "VerticalBarnDoor"

You can always use $key1|get-member to see all the methods and properties for the DSK object.

Key Type values: Chroma,DVE,Luma,Pattern
DVEBorderBorderBevel values: None,InOut,In,Out

Pattern values:
LeftToRightBar, TopToBottomBar, HorizontalBarnDoor, VerticalBarnDoor, CornersInFourBox, RectangleIris, DiamondIris, CircleIris, TopLeftBox, TopRightBox, BottomRightBox, BottomLeftBox, TopCentreBox, RightCentreBox, BottomCentreBox, LeftCentreBox, TopLeftDiagonal, TopRightDiagonal