ATEM MultiView configuration options updated

Now that I have a Television Studio HD I feel like one of the big boys. I have added the ability to set VU options and routing of inputs to a window of the MultiView.

This means you could in theory do VU follow window via X-Keys. I often have more than 8 inputs to preview so I can assign 2 or more of the windows to toggle between different inputs and enable/disable the VU meters depending on whether they are relevant for the input or not.

$mv=$atem.GetMultiViews()

$mv[0].Layout = “Top”

$mv[0].CanRouteInputs

$mv[0].WindowCount

$mv[0].CanToggleSafeArea

$mv[0].SupportsProgramPreviewSwapp

$mv[0].SafeAreaEnabled=1

$mv[0].ProgramPreviewSwapped=1

$mv[0].VuMeterOpacity=.7

$mv[0].SetVuMeterEnabled(7,2)

$mv[0].SetWindowInput(9,3020) #MP2 in last window

If you have a 2 M/E then $mv[1] would also exist

I have added a GetSwitcherLibVersion method so I can start adding a “requires” function to my scripts and modules.

$atem.GetSwitcherLibVersion() needs to be 2.9.6.0 for the sample above to work.

There is still some inconsistency in the way I have implemented the properties. Some values are bool and some are int 0 or 1 for enabled or disabled settings. Haven’t decided which way I’ll go. The ATEM API is a bit strange, documented properties that are Bool in the API actually output as Int32 in C#

Advertisements

ATEM SuperSource support in PowerShell

I have not been able to test this except for a brief confirmation that the object is returned. I ran out of time while I had access to a 2 M/E so have implemented all the SuperSource methods and properties as per the API.

I should be able to test this and fix any issues next weekend.
Update: GetSuperSourceBox causes a memory error, requires some more work…

Update: It is now working 🙂

#Get the SuperSource (only one - at the moment)
$Supersources = $atem.GetSuperSource()
$Supersource[0] #this will show all properties and methods of SuperShource

$Supersources[0].InputCut = 3011 # MediaPlayer1 Cut
$Supersources[0].InputFill = 3010 #MediaPlayer1 Fill

#Get the SuperSource boxes
$SSBox = $Atem.GetSuperSourceBox()
$SSBox[0] #this will show all methods and properties of the first box

$SSBox[0].InputSource=2
$SSBox[1].InputSource=3
$SSBox[0].Enabled=1
$SSBox[1].Enabled=1 

This dll is now the current version of SwitcherLib.dll and is available from the downloads page.
I’m looking forward to creating some demos that show how to move the SuperSource boxes around while they are live

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 https://www.bhphotovideo.com/c/search?Ntt=cmd+dc-1

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

You can find example code for this here… https://gist.github.com/imorrish/5614d4369ca111f7096aff31d27e4d98

Description of the chroma key values for Hue, Gain, Y Suppress, Lift and Narrow from the ATEM manual:

Chroma Key parameters

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.

$key1.Type="Chroma"
$mp1.MediaStill = 2
$key1.InputFill=3010
$key1.InputCut=3011
$key1.Fly = 1
$key1.OnAir = 1
$key1.FlyRunToKeyFrame = [SwitcherLib.FlyKeyFrameDestination]::FlyKeyFrameFull
start-sleep 1
$key1.FlyRunToKeyFrame="FlyKeyFrameB"
start-sleep 1
$key1.FlyRunToKeyFrame="FlyKeyFrameFull"
start-sleep 1
$key1.FlyRunToKeyFrame="FlyKeyFrameA"
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 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.

macrosnippet

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:
hyperdeckfeatures

Example PowerShell:

add-type -path ‘C:\Users\ian\Documents\WindowsPowerShell\SwitcherLib.dll
$Global:atem = New-Object SwitcherLib.Switcher(“192.168.0.240”)
$atem.Connect()
$HyperDeck=$atem.GetHyperdecks()
$HyperDeck.Capacity
$HyperDeck[0].NetworkAddress
$HyperDeck[0].RemoteAccessEnabled
$HyperDeck[0].Play()
start-sleep 5
$HyperDeck[0].stop()
$HyperDeck[0].CurrentClipTime
Start-Sleep 5
$HyperDeck[0].CurrentClipTime = “00:02:00:25”
start-sleep 5
$HyperDeck[0].Jog(500) #jump 5 seconds (50p)
start-sleep 5
$HyperDeck[0].CurrentClip=1
$HyperDeck[0].Play()
start-sleep 5
$HyperDeck[0].stop()
$HyperDeck[0].CurrentClipTime
$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:


$mv=$atem.GetMultiViews()
$mv.count
$mv[0].Layout
$mv[0].CanRouteInputs
$mv[0].WindowCount
#Get input label for each window
$inputs = $atem.GetInputs()
$lookup = @{} # hashtable for quick lookup of inputID Label
foreach($a in $inputs){
    $lookup.add($a.ID,$a.Label.ToString())
}
$i=0
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)