Saturday, December 13, 2025

Send VISCA commands using windows batch file

Have a situation where I want to control some FOMAKO cameras using VISCA, but from a windows command prompt.

You'll need two programs

NCAT  (this will send the actual HEX commands)

https://nmap.org/dist/nmap-7.98-setup.exe

and 
XXD   (This tool will translate HEX commands)

https://sourceforge.net/projects/xxd-for-windows/

Download and install these.

From a simplicity sake, drop XXD into a folder that will contain your batch files

the command syntax is as follows:

echo 'HEX VALUE' | xxd -r -p | ncat CAMERA_IP VISCA_PORT

So the example below will send the HEX to the camera at 192.168.0.11 port 52381 and change it to recall a set point #3  (subsitute 03 in bold for 01 or 02 or whatever preset value you want to recall.

echo '8101043f0203ff' | xxd -r -p | ncat 192.168.0.11 52381

This batch file below will send command from one computer to another computer running OBS.  So the first computer runs a .bat file and it looks like this:

echo '8101043f0203ff' | xxd -r -p | ncat 192.168.0.11 52381
timeout /T 3 /NOBREAK > NUL
C:\OBSCommand\OBSCommand.exe /server=192.168.0.10:4455 /password="password01" /scene="Slide1" /delay=1

So the above syntax contained in a BAT file, first tells camera @ 192.168.0.11 to recall scene 03
Then wait 3 seconds (for camera to move)
Then sends an WebSocket command (using a program called obscommander) to change the scene to "Slide1"