Skip to content

Instantly share code, notes, and snippets.

View imorrish's full-sized avatar
🏠
Working from home

Ian Morrish imorrish

🏠
Working from home
View GitHub Profile
@imorrish
imorrish / UploadStills.ps1
Created January 3, 2017 07:04
Upload all files in a directory to Blackmagic ATEM Media Stills
Function Copy-ATEMUploadImages{
#<#
#.Synopsis
# Find all images matching ATEM resolution in a folder and upload to media pool
#.Description
# Uses SwitcherLib and mediaupload.exe to find all PNG images (can be changed to another format) in the specified folder
# and upload them to the media pool from a starting slot number (or from 1 if not specified)
#
# Requires ATEMLib.dll and MediaUpload.exe in the \documents\WindowsPowerShell directory
# Download them from https://1drv.ms/f/s!ApGpqMMpRLhiiv4zoZRIXcnbIInsLQ
# Sample script using midi device to control Blackmagic ATEM Upstream Key Chroma settings
# Uses these 2 projects
# https://ianmorrish.wordpress.com/v-ise/atem/
# https://github.com/Psychlist1972/Windows-10-PowerShell-MIDI
#
add-type -path 'documents\windowspowershell\SwitcherLib.dll'
Import-Module ".\Documents\WindowsPowerShell\PeteBrown.PowerShellMidi.dll"
#region ATEM settings
$Global:atem = New-Object SwitcherLib.Switcher("192.168.1.8")
$atem.Connect()
@imorrish
imorrish / Main.ps1
Created February 6, 2017 02:48
XKR-32 X-Keys and Blackmagic ATEM Television Studio sample
#region About
# Stript to control ATEM with X-keys 32
#
# Button layout
#
# 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 - blue
# 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 - Red
# 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 -blue
# 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 -red
@imorrish
imorrish / MouseClicket.ps1
Last active February 13, 2023 12:18
PowerShell Mouse click on screen location for Blackmagic ATEM Software Audio tab
# I used this to jump to Blackmagic ATEM softwre audio tab with hot key
# credit http://stackoverflow.com/questions/39353073/how-i-can-send-mouse-click-in-powershell
$cSource = @'
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class Clicker
{
//https://msdn.microsoft.com/en-us/library/windows/desktop/ms646270(v=vs.85).aspx
@imorrish
imorrish / Get-VideoHubRouting.ps1
Last active June 4, 2019 10:34
Create Excel Matrix showing Blackmagic VideoHub routing
#Get video hub properties and add to Excel file
# Author: Ian Morrish
# Website: https://ianmorrish.wordpress.com
# tested on Windows 10 running in ISE with Excel 2016
# update the IP address and path to included send-tcprequest.ps1 scrit as required
$VideoHupIP = "127.0.0.1"
$hubcommand = @"
VIDEO OUTPUT ROUTING:
`r`n
@imorrish
imorrish / StreamDeckAtem.ps1
Last active July 21, 2020 15:33
Use Elgato Streamdeck to control Blackmagic Design ATEM
#
# ATEM Legato Stream Deck controler
#
# By Ian Morrish
# https://ianmorrish.wordpress.com
#
# Disable display and sleep mode timeouts
function DisableSleepTimeout {
Write-Host "Disabling display and sleep mode timeouts..."
@imorrish
imorrish / ATEMTally.ps1
Created July 5, 2018 03:52
ATEM program tally using PowerShell and Arduino
$host.ui.RawUI.WindowTitle = “Arise Tally Monitor”
$stayActive = $true
#Wait for ATEM to be online
Do{
Start-Sleep -Seconds 10
}
Until(Test-Connection -ComputerName "10.1.1.240" -Quiet)
add-type -path 'C:\vise\SwitcherLib.dll'
$Global:atem = New-Object SwitcherLib.Switcher("10.1.1.240")
@imorrish
imorrish / ScheduledRecording.ps1
Last active July 14, 2018 04:01
Gang record Blackmagic Huperdecks with file name matching source using Windows Task Scheduler
# Start recording on multiple Hyperdeck's using Windows Scheduled task
#
# Executable: “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe”
# Arguments: -NoProfile -NonInteractive -command ". c:\scripts\ScheduledRecord.ps1; exit $LASTEXITCODE"
# Author: Ian Morrish
# Website: https://ianmorrish.wordpress.com
# tested on Windows 10. No error checking. Ensure Remote button is on.
# Must "set-executionpolicy RemoteSigned" one time from PowerShell running as Administrator
# update the IP address and file names as required
@imorrish
imorrish / UploadImageFromMonitoredFolder.ps1
Created July 24, 2018 06:48
PowerShell script to monitor folder for new/changed image and upload to ATEM media pool
# File System Watcher to upload image to ATEM media pool
Function ATEMUploadImage
{
param
(
[String]$File,
[Int]$Slot,
[string]$ATEMip
)
# Just use command line utility as dll may conflict with JustMacros
@imorrish
imorrish / ATEM_Multiview.ps1
Created July 29, 2018 19:54
Windows PowerShell script to show ATEM Multiview using ffplay and touch overlay to switch ATEM inputs
# Ian Morrish
# https://ianmorrish.wordpress.com
# Powershell script to to allow touch screen control of ATEM by overlaying multiview source with transparent WPF grid
# Any USB 3 capture card that can be detected by ffplay (Direct Show drivers) can be used to display the multiView
#launch ffplay
start-process -filepath c:\tools\launchcamlink.cmd
Start-Sleep 2
function Show-Process($Process, [Switch]$Maximize)
{