ATEM

A Windows PowerShell library to automate Blackmagic ATEM video switcher products.
Tis library uses the official BMD SDK, not the unsupported UDP implementation. You must have the ATEM software control v6.8 or higher installed.
Requires .Net 4.5 and works on Windows 7 8.1 & 10
Can be used with PowerShell 32 or 64bit versions.
Supports most ATEM functionality but known to be missing SuperSource, flying key and camera control (I’m just lacking the equipment with this capability to test).

The latest switcherlib.dll can be downloaded from
Remember to right click on the zip file after downloading and un-block it from the properties window.

Or run this snippet to download and unblock for you


$storageDir = "$($pwd)\Documents\WindowsPowerShell"
if(!(Test-Path -Path $storageDir )){

New-Item -ItemType directory -Path $storageDir

}
$webclient = New-Object System.Net.WebClient
$url = "https://1drv.ms/u/s!ApGpqMMpRLhijqEibfyYzkzSHJYVHQ"
$file = "$($storageDir)\SwitcherLib.dll"
$webclient.DownloadFile($url,$file)
Unblock-File -Path $file

20 Sep 2016 version 2.9 (added Hyperdeck support – Requires 6.8 or higher ATEM Software Control)
19 Sep 2016 version 2.8 (added Multiview support)
Version 2.7 (fixed transition status bool values)
Version 2.6 (added enum values for ME transition type properties)
Version 2.5 (added DSK and USK functionality)

Example use:

Raw commands

add-type -path 'C:\Users\[UserName]\Documents\WindowsPowerShell\SwitcherLib.dll'
Global:atem = New-Object SwitcherLib.Switcher("192.168.1.8")
$atem.Connect()
$atem.GetSwitcherLibVersion()
# view all methods and properties of ATEM object
$atem | get-member
$MEs = $atem.getmes()
$MEs.Count
$me1 = $me[0]
# view all methods and properties of MixerEffectsBloc (you can do the same for other object collections)
$me1 | get-member
$me1.cut()
$inputs = $atem.getinputs()
$inputs
$DSKs = $atem.getdsks()
$DSKs
$USKs = $atem.getKeys()
$USKs

Cmdlet

Not yet available.


MixerEffect


$ME = $atem.GetMEs()
#view all methods and properties
$me | Get-Member

$me[0].Cut()
$me[0].AutoTransition(0)
$me[0].Preview = 1
$me[0].Program = 2

#if you want to have ME object matching logical number
$me1=$me[0]
$me2=$me[1]
$me1.Cut()
$me2.Cut()

Macros


#get number of supported macros
$atem.GetMacroCount()
# display details of Macro id 0
$atem.GetMacro(0)
#Run Macro id 0
$atem.RunMacro(0)
#Display all defined macros
$i=0
do {
$macro = $atem.GetMacro($i)
If($macro[2] -eq 'true')
{
 Write-host "ID: $($i) Title: $($macro[0]), Description: $($macro[1])"
}
$i +=1
}
until($i -eq $atem.GetMacroCount()-1)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s