This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## HyperDeckTest.ps1 | |
## By Ian Morrish | |
## Control Blackmagic HyperDesk via Ethernet from Windows PowerShell. PowerShell is part of all modern Windows desktop/server products | |
## see https://technet.microsoft.com/en-us/scriptcenter/powershell.aspx | |
## | |
## To run the script requires enabling PowerShell Script file execution. Run the following command to allow only local scripts to be executed | |
## set-executionpolicy remotesigned | |
# | |
#run with command line e.g. | |
# PS > .\HyperDeckTest.ps1 -remoteHost "10.0.0.34" -commands @('remote: override: true', 'goto: clip id: 2','play: single clip: true') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# record on multiple HyperDecks | |
$HyperDecks = @('10.0.0.34','10.0.0.35','10.0.0.36','10.0.0.37') | |
$fileName = 'Recording' + (Get-Date).tostring("dd_MM_yyyy_hh_mm") | |
$sb = { | |
param ([string] $HyperDeckIP, [string] $HDcommand) | |
try { | |
$socket = new-object System.Net.Sockets.TcpClient($HyperDeckIP, 9993) | |
$stream = $socket.GetStream() | |
$writer = new-object System.IO.StreamWriter($stream) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example using https://midinet.codeplex.com/ to control MIDI device | |
#Copy the following DLL's from above CodePlex project into path you want to use in the script | |
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.dll' | |
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.IO.dll' | |
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.Midi.dll' | |
$midiInCaps = new-object CannedBytes.Midi.MidiInPortCapsCollection | |
$midiOutCaps = new-object CannedBytes.Midi.MidiOutPortCapsCollection | |
"Input Devices-----------------------------" | |
For($i=0; $i -lt $midiInCaps.Count; $i++){ | |
"Device ID: $i Name: " + $midiInCaps[$i].Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Send-PushAlot { | |
<# | |
.SYNOPSIS | |
Send alert via https://pushalot.com/api#webapi to Windows Phone or Desktop device app | |
#> | |
Param( | |
[String] | |
[parameter(Mandatory=$true)] | |
[ValidateLength(1,250)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get SwitcherLib.dll from https://github.com/imorrish/atemlib | |
add-type -path 'C:\Users\imorrish\Documents\WindowsPowerShell\Modules\ATEM\SwitcherLib.dll' | |
$atem = New-Object SwitcherLib.Switcher("192.168.1.8") | |
$atem.Connect() | |
Write-host "ATEM Product: $($atem.GetProductName())" | |
$preview = new-object SwitcherLib.Switcher+PreviewInput | |
[Reflection.Assembly]::LoadWithPartialName("System.Speech") | Out-Null | |
[Reflection.Assembly]::LoadWithPartialName("System.Globalization") | Out-Null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update path below to the location where you save the dll from | |
# https://github.com/ValdemarOrn/SharpOSC/tree/master/Binaries | |
add-type -path 'C:\Users\imorrish\OneDrive\PowerShell\OSC\SharpOSC.dll' | |
#Connection for Resolume | |
$sender = new-object SharpOSC.UDPSender "192.168.1.67", 7000 | |
#start a layer clip | |
$message = new-object SharpOSC.OscMessage "/layer3/clip1/connect", 1; | |
$sender.Send($message); | |
#Enable or dissable a video effect on a clip. 1 = disable, 0 = enabled | |
$message = new-object SharpOSC.OscMessage "/activeclip/video/effect1/bypassed", 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sample script to control Blackmagic ATEM audio mixer using a MIDI device | |
# This script only runs on Windows 10 and ISE 64bit | |
#Requires ATEMLib.dll and PeteBrown.PowerShellMidi.dll | |
# which can be downloaded from https://ianmorrish.wordpress.com | |
# | |
# Blackmagic ATEM Software Control must also be instaled (v6.4 or grater) | |
#ATEM setup | |
add-type -path 'C:\Users\imorrish\OneDrive\PowerShell\ATEM\SwitcherLib.dll' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remote commands for VLC | |
#Run from ISE | |
$socket = new-object System.Net.Sockets.TcpClient("localhost", 5000) | |
if($socket -eq $null) { | |
write-host "Failed to connect to VLC" | |
Exit | |
} | |
$stream = $socket.GetStream() | |
$writer = new-object System.IO.StreamWriter($stream) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Send-CameraTally | |
{ Param ( | |
[Parameter(ValueFromPipeline=$true)] | |
[String[]]$Command, | |
[string]$CamerIP = "IPAddress", | |
[string]$Port = "23" | |
) | |
#Attach to the remote device, setup streaming requirements | |
$WaitTime = 200 | |
$Socket = New-Object System.Net.Sockets.TcpClient($CameraIP, $Port) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#download the DLL from https://1drv.ms/u/s!ApGpqMMpRLhijeR1-4SVgqdytAUhmg | |
# remember to unblock the file by right clicking > Properties > Unblock | |
# some constants | |
$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 'C:\Users\imorrish\Documents\WindowsPowerShell\decklink.dll' | |
$Decklink = new-object VISE_DeckLink.DeckLink |
OlderNewer