Blackmagic Television Studio HD DVE features

I’m loving having DVE capability in the new ATEM TVS HD. It is not as rich as the ATEM 1 and 2 M/E’s but is a big improvement over the old TVS.

Although only a 2D DVE, it provides most of the Key and transition features of the bigger ATEM’s. By far the most useful feature I think is Picture-In-Picture and I was especially surprised to see the TVS HD support flying key.

I have been adding more DVE automation functionality to my PowerShell ATEM Switcher library and will have an update version that supports all TVS HD feature soon (although it will require the 7.0 firmware in all other ATEM’s you might want to automate from PowerShell). A beta 6.9 version of the switcherlib.dll is available from the downloads folder.

Some tips below for people who are new to the DVE capabilities found in the TVS HD.

The position values are defined from the center of the window. Maximum to have the center point hard left or right values are

x:-16.00 to 16.00

y:-9.00 to 9.00

The size of the window

X:0.00 to 1.00

So, if you wanted a ¼ of full screen size (1/2 width and height), the size would be 0.5 (aspect ratio is maintained by default)

And for top left, x= -8 & y= 4.5

In PowerShell I just define these values in an array.


= @(-8,4.5,.5,.5)

= @(8,4.5,.5,.5)

= @(8,-4.5,.5,.5)

= @(-8,-4.5,.5,.5)

Then I have a function you pass the array to




$script:usk1.FlyPositionX = $window[0]

$script:usk1.FlyPositionY = $window[1]

$script:usk1.FlySizeX = $window[2]

$script:usk1.FlySizeY = $window[3]


So to set the IP to top left

setPIPWindow $topLeft

You can also set the border to be a combination of pixels that are inside or outside the DVE window size

The Key Frame option lets you transition the PIP window to a new location.

Unfortunately, you can’t load position and size values directly into the A and B positions. You can only set the current values to one of these 2 so you would have to have the key off air to load up initial values. Once the key is on air you are limited to only the 2 presets, full screen, off screen in one of the 8 directions.

In PowerShell you can save the current position and size with



You can initiate the Fly with




Where the value after :: (which will be shown using intellisense) can be:

  • FlyKeyFrameA
  • FlyKeyFrameB
  • FlyKeyFrameFull
  • FlyKeyFrameInfinityTopLeft
  • FlyKeyFrameInfinityBottomRight
  • FlyKeyFrameInfinityCenter
  • FlyKeyFrameInfinityCenterOfKey
Squeeze the current program item to reveal the preview item.

The DVE transition can be set with PowerShell

$me1.TransitionStyle =

$me1.DVETransitionStyle =

Where the values after the :: can be…

  • SqueezeTopLeft
  • SqueesTop
  • SqueezeTopRight
  • Squeez bottomRight
  • PushTopLeft
  • PushBottomRight

Note: you can’t enable the DVE transition style if the USK key type is set to DVE and is on air.

There is also an option in the DVE transition to have a source that will fly across the screen as part of the transition to preview (Graphic Wipe). This should be a source that has the image you want in the center and transparent background.

The width should be less than 25% of the video standard width with the majority of the image have an alpha transparency (or black background).

For 720p the centre 320 horizontal pixels will be used for vertical strip

I’m yet to implement this in PowerShell.

Xkeys XKR-32 for Blackmagic ATEM TVS operation

I have posted some sample Windows PowerShell scripts for controlling the Blackmagic Design ATEM Television Studio (TVS) on GitHub.

The main thing I did with this sample is define the actions for each key in a JSON file. You can store any combination of PowerShell commands for a button or call a function.

The JSON file is loaded into the script and a hash table is created which holds just the key ID and string to evaluate as code.

function LoadXkeys(){
$xkFile = ConvertFrom-Json (get-content "documents\WindowsPowerShell\xkr32.json" -raw)
$Global:xkCommands = @{}
foreach($key in $xkFile.keys){

This means you can edit the JSON file and just re-run the LoadXKeys function to make changes on the fly.

I’ll probably change the format of the JSON file but for now it looks like this:

“keys”: [
“Type”: “Script”,
“KeyID”: 0,
“Command”: ” “,
“Script”: “$ActiveME.Program=1”,
“Caption”: “Prog 1”,
“Description”: “CUT”
“Type”: “Script”,
“KeyID”: 1,
“Command”: ” “,
“Script”: “if($Global:KeypadMode -eq \”\”){$ActiveME.Preview=1} else {keypad 1}”,
“Caption”: “Prev 1”,
“Description”: “ME1 Auto Transition”

You can find the full code here

The bottom row of buttons function as preview selection by default but if you select Macro or Color then the bottom row allows selecting a macro from 1-10 or one of 10 predefined colors (ROYGBIV, White, Grey, Black in that order).

If MP1 or MP2 is already on preview, selecting it again then lets you pick the slot from the media pool to load into the currently previewed media player.

I did get a few ideas from the new TVS HD panel so might make an expanded version of this with only preview selection and making 1-20 for data input.

Picture in picture (pnp) with Blackmagic Television Studio and PowerPoint.

The Blackmagic TVS doesn’t have a picture in picture function like the 1 or 2 M/E units. If you want a PowerPoint (or other windowed application (even YouTube video would work) then you can use the DSK with mask to

Setup your secondary monitor to match the resolution of your ATEM

In PowerPoint, select the “Slide Show” tab and Set Up Slide Show icon.

Change the Show Type to “Browsed by an individual (window)” as shown above. When you start the presentation (press ) you can resize the player and use the keyboard arrows or space bar to change slides.

Use the Down Stream Keyer in the ATEM to specify the input source for the key as your computer screen input and set the mask coordinates to block out he unwanted window border.

Just be careful not to move the mouse pointer over the PowerPoint presentation.

Using Arduino as an input trigger to PowerShell


I have previously blogged about using the Arduino as an I/O device to set the output pins to drive camera tally lights.

PowerShell can also read the input status of pins on the Arduino using the Solid.Arduino .Net library.

This is an example of using the Arduino to detect the monitor switch on camera RCP units so that you can switch the signal to a scope or monitor.

I have used this for both Sony RCP-1500 and Panasonic AK-HRP200 RCP’s which provide dry contact closures on monitor selection.

The code is very simple and sets up an event to wait for input pin status changes on the Arduino…

add-type -path '.\Documents\WindowsPowerShell\Solid.Arduino.dll'
$connection = New-Object Solid.Arduino.SerialConnection("COM4",[Solid.Arduino.SerialBaudRate]::Bps_57600)
$session = New-Object Solid.Arduino.ArduinoSession($connection, 2000)
# Define the function that is called when a digitial pin event happens
function inputevent($event){
    #Write-Host "Something happened on port $($event.value.port) Type $($event.value.pins)"
    if($event.value.pins -band 4) #using binary AND incase multiple inputs are activated
        # put code here to switch ATEM Aux or VideoHub routing
        Write-host "Cam 1 preview selected"
# set up the event to montor digital pin state change
$session.SetDigitalReportMode(0,$true) #enable events for pins on port 0
Unregister-Event -SourceIdentifier eventBitChange #incase we are re-running the script
$ArduinoEvent = Register-ObjectEvent -InputObject $session -EventName DigitalStateReceived -SourceIdentifier eventBitChange -Action {inputevent($eventArgs)}

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.

Blackmagic Decklink Device Information from PowerShell Script


I have started working on a providing control of Blackmagic Design Decklink cards from Windows PowerShell scripts.

Just at the initial stage of being able to read the configuration of cards connected to the PC.

Updated: Can now set some card options also. Use $Devices | Get-Member
To find the methods and properties. $devices[0].
Will give you more options for the first device detected.

Example script:

$VideoConnections = @{1 = "SDI"; 2 = "HDMI"; 4 = "Optical SDI"; 8 = "Component"; 16 = "Composit"; 32 = "S-Video" }
$AudioConnections = @{1 = "Embedded" ; 2 = "AESEBU" ; 4 = "Analog"; 8 = "Analog XLR"; 16 = "Analog RCA"; 32 = "Microsophone"; 64 = "Headphones"}
$VideoIOSupport = @{1 = "Capture"; 2 = "Playback"}
add-type -path '\Documents\WindowsPowerShell\decklink.dll'
$cards = new-object VISE_DeckLink.DeckLink
$Devices = $cards.DeckLinkDevices()
write-host "Number of devices detected: $($Devices.Count)"
foreach ($device in $Devices){
    write-host "$($device.DisplayName)" -ForegroundColor red -BackgroundColor white
    Write-host " IO Support:"
    $VideoIOSupport.Keys | where { $_ -band $device.VideoIOSupport } | foreach { $VideoIOSupport.Get_Item($_)} 
    Write-host " Input Video Connections:"
    $VideoConnections.Keys | where { $_ -band $device.VideoInputConnections } | foreach { $VideoConnections.Get_Item($_)}
    Write-host " Input Audio Connections:"
    $AudioConnections.Keys | where { $_ -band $device.AudioInputConnections } | foreach { $AudioConnections.Get_Item($_)}
    Write-host " Output Video Connections:"
    $VideoConnections.Keys | where { $_ -band $device.VideoOutputConnections } | foreach { $VideoConnections.Get_Item($_)}
    Write-host " Output Audio Connections:"
    $AudioConnections.Keys | where { $_ -band $device.AudioOutputConnections } | foreach { $AudioConnections.Get_Item($_)}

Write-host ""

Here is an example the output.


Download the decklink.dll file from here!ApGpqMMpRLhijeR1-4SVgqdytAUhmg

Using a Raspberry Pi as an operations clock


I know this is not a “World Clock” but for general event coordination, even across multiple venues, is a useful tool. We use it for multi-campus coordination of live linking.

Rather than relying on iPads and people phones (which always seem to go flat) to display the time, we can use a Raspberry Pi running a browser in Kiosk mode to generate an accurate clock and feed this into our video hub for distribution.

Overview of setting up your Raspberry Pi

There are many resources on the Internet for performing these tasks so I won’t go into the detail here but the basic steps are:

Install noob onto SD card as per instructions
I did do the standard update to ensure the latest stuff was installed.
The default seems to be to boot into the graphical UI.

I changed the config.txt to force the HDMI mode to match my ATEM video standard of 720p 50Hz

From the desktop, run a terminal session and from that run leafpad.
Press down arrow to get the path box to display and type


Add the following to the blank file and then save.

@chromium-browser –disable-session-crashed-bubble –disable-infobars  –kiosk
@xset s off
@xset -dpms
@xset noblank


You can experiment with the display options to change font and color, then update the url for Chromium.