Headset adapter for the TVS HD

The Blackmagic Television Studio HD provide a talkback option but via an aviation standard jack which is 2.06″ rather than the 1/4″ jack used for headphones.
I have 4 or 5 pin XLR headsets so ordered ths adapter from eBay (China).

Update: It arrived. quality is good but headset jack is mono only. From the picture it is hard to tell which is the smaller (microsophone) jack which I thought was the one on the right.

Control ATEM headphone levels from PowerShell

I have been working on a completely new version of the ATEM Switcher Library for PowerShell which supports multiple ATEM’s but that is taking a long time.

The current SwitcherLib has been working fine for me (and others) but with my new TVS HD, I now wanted to be able to control the headphone monitoring and talkback levels from a midi device.

This update requires the 7.0 ATEM software and switcher firmware to be installed.

All values are in DB’s from -66 to + 6. You can get or set the values as shown in the sample code below:


add-type -path '.documents\WindowsPowerShell\SwitcherLib.dll'
$Global:atem = New-Object SwitcherLib.Switcher("192.168.1.8")
$atem.Connect()
#headphone levels
$headphones = $atem.GetHeadphoneOutputs()
$headphone1 = $headphones[0]
$headphone1.HeadphoneGain = -6
$headphone1.HeadphoneProgramOutGain = 0
$headphone1.HeadphoneSidetoneGain
$headphone1.HeadphoneTalkbackGain</span>

Download SwitcherLib7.dll from SwitcherLib7.dll

Automating Characterworks from PowerShell

I saw a question on the BMD forum asking about the possibility of triggering an action in Characterworks. A quick check of the Characterworks online help showed that the CW Remote Control Server listens to requests on port 5201 and accepts HTTP POST requests containing JSON-encoded commands.

It would be easy to define a keyboard shortcut or X-Keys button that initiated the Characterworks action and switched the input, or enabled a key, on the Blackmagic ATEM using a PowerShell script.

Below is a simple example PowerShell script showing how to send a command to Characterworks:

$url = "http://localhost:5201/"
$command = '{ "action" : "play_motions", "motions" : [ "Motion 1" ], "channel" : "live1" }'

$bytes = [System.Text.Encoding]::ASCII.GetBytes($command)
$web = [System.Net.WebRequest]::Create($url)
$web.Method = "POST"
$web.ContentLength = $bytes.Length
$web.ContentType = "application/x-www-form-urlencoded"
$stream = $web.GetRequestStream()
$stream.Write($bytes,0,$bytes.Length)
$stream.close()

$reader = New-Object System.IO.Streamreader -ArgumentList $web.GetResponse().GetResponseStream()
$reader.ReadToEnd()
$reader.Close()

It would be easy to wrap this in a function to take the motions and channel values as parameters and return the response.

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.

E.G.

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

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

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

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

Then I have a function you pass the array to

E.G.

function
setPIPWindow{


param([double[]]$window)


$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

$usk1.FlySetKeyFrameA()

$usk1.FlySetKeyFrameB()

You can initiate the Fly with

$usk1.FlyRunToKeyFrame(

[SwitcherLib.FlyKeyFrameDestination]::

)

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

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

The DVE transition can be set with PowerShell

$me1.TransitionStyle =
“DVE”

$me1.DVETransitionStyle =
[SwitcherLib.MixerTransitionDVEParameters]::PushLeft

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){
$xkCommands.add($key.KeyID,$key.Script)
}
}
LoadXKeys

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 https://gist.github.com/imorrish/f8a2b6aba612e310169dc7b4da0ac9d9

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 windowed PowerPoint (or other windowed application (even YouTube video would work) then you can use the DSK with mask to simulate PiP.

Setup your secondary monitor to match the resolution of your ATEM (HDMI can be tricky, I use a DVI to SDI extender for 720p50).

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.