videohubctrl can be used to control Blackmagic Design Videohub SDI router device over the network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Georgi Chorbadzhiyski 40bb54c2a3 Parse commands based on their type. 10 years ago
libfuncs @ 0f6dacb790 VideoHub control initial commit. 10 years ago
.gitignore VideoHub control initial commit. 10 years ago
.gitmodules VideoHub control initial commit. 10 years ago
ChangeLog Add support for port statuses (types) reported by Univeral Videohub. 10 years ago
LICENSE-MIT.txt VideoHub control initial commit. 10 years ago
Makefile Makefile: Use short parameters to install. 10 years ago
README Add support for port statuses (types) reported by Univeral Videohub. 10 years ago
RELEASE RELEASE: Version 0.3 10 years ago
TODO Add videohubctrl(1) man page. 10 years ago
cmd.c Parse commands based on their type. 10 years ago
cmd.h Parse commands based on their type. 10 years ago
data.h Create struct port_set which contains a set of ports. 10 years ago
display.c Create struct port_set which contains a set of ports. 10 years ago
display.h Add support for -b / --backup parameter. 10 years ago
net.c Rename -v / --verbose parameter to -d / --debug. 10 years ago
net.h VideoHub control initial commit. 10 years ago
util.c Fix build error under OS X. 10 years ago
util.h VideoHub control initial commit. 10 years ago
version.sh VideoHub control initial commit. 10 years ago
vh_test_commands.txt Add support for port statuses (types) reported by Univeral Videohub. 10 years ago
videohubctrl.1 Add support for port statuses (types) reported by Univeral Videohub. 10 years ago
videohubctrl.c Parse commands based on their type. 10 years ago

README

videohubctrl - Blackmagic Videohub control application
======================================================

videohubctrl implements the simple text based network protocol for
controlling Blackmagic Design Videohub SDI router devices. The
program is tested with Blackmagic Design Micro Videohub 16x16
router and probably will work with other Videohub models.

videohubctrl currently displays and can configure:

- Video input port names
- Video output port names
- Video output routing
- Video output locking
- Input/Output port statuses

The following features found in bigger Videohub models are currently
not supported (I don't have the hardware):

- Configuration of video processing units
- Configuration of Video monitoring outputs
- Configuration of Serial ports

Configuration of Videohub's network settings can be made using
Blackmagic's Windows program when the device is connected via USB.


License
=======

videohubctrl is released under MIT license.
See LICENSE-MIT.txt for full license terms.


Command line parameters
=======================

videohubctrl is controlled using command line parameters. Here is a list
of supported command line parameters:

Main options:
-h --host <host> | Set device host name.
-p --port <port_number> | Set device port (default: 9990).

Commands:
-i --info | Show full device info (default command).
. This command is shows the equivalent of
. running all --list-XXX commands.
-m --monitor | Display real-time config changes monitor.
-b --backup | Show the command line that will restore
. the device to the current configuration.

--list-device | Display device info.
--list-vinputs | List device video inputs.
--list-voutputs | List device video outputs.

Video input/output configuration:
--vi-name <in_X> <name> | Set video input port X name.
--vo-name <out_X> <name> | Set video output port X name.

--vo-route <out_X> <in_Y> | Connect video output X to video input Y

--vo-lock <out_X> | Lock output port X.
--vo-unlock <out_X> | Unlock output port X.

For <in_X/out_X/in_Y> you may use port number or port name.

Misc options:
-T --test-input <file> | Read commands from <file>.
-d --debug | Increase logging verbosity.
-q --quiet | Suppress warnings.
-H --help | Show help screen.
-V --version | Show program version.


Environment variables
=====================

The following environment variables are checked and used by the program
if they are set:

VIDEOHUB_HOST
Sets the device host name. It is equivalent to using -h / --host
command line parameter.

VIDEOHUB_PORT
Sets the device port. It is equivalent to using -p / --port command
line parameter.


Example usage
=============

# Rename video output

videohubctrl -h sdi --vo-name 8 "Output 8 - test"
videohubctrl -h sdi --vo-name "Output 8 - test" "Output 8"


# Rename video input

videohubctrl -h sdi --vi-name 4 "Windows 4 HD"
videohubctrl -h sdi --vi-name "Windows 4 HD" "CPlay4"


# Lock and then unlock output 16 (unlock assumes that the port is
# named Output 16). The host name is set via env variable.

export VIDEOHUB_HOST=sdi
videohubctrl --vo-lock 16
videohubctrl --vo-unlock "Output 16"


# Set two outputs to receive from the same input using port names

videohubctrl -h sdi --vo-route "Output 8" "Windows 4 HD"
videohubctrl -h sdi --vo-route "Output 7" "Windows 4 HD"


# Run several commands at once
# Rename video input 11 and 12
# Rename video output 5,
# Set output 5 to receive from input 12
# Lock output 5

videohubctrl --host sdi \
--vi-name 11 "Test input" \
--vi-name 12 "Playout input" \
--vo-name 5 "Encoder h264" \
--vo-route 5 12 \
--vo-lock 5


Example output
==============

Here is how videohubctrl output looks like using the commands recorded
in vh_test_commands.txt file.

|----------------------------------------------------------------------|
$ videohubctrl --test vh_test_commands.txt
Device info
-----------------------------------------------------------
| Device address | sdi-matrix |
| Device port | 9990 |
| Model name | Blackmagic Micro Videohub |
| Unique ID | 7c2e0d021714 |
| Protocol | 2.4 |
| Video inputs | 16 |
| Video outputs | 16 |
-----------------------------------------------------------

Video inputs
--------------------------------------------------------------------
| ## | Video input name | n | Routed to output | s |
--------------------------------------------------------------------
| 1 | Windows 1 | 2 | Enc1 3 | B |
| | | | Enc1 4 | |
| 2 | Windows 2 | 1 | Enc1 2 | B |
| 3 | Windows 3 | 1 | Enc1 1 | B |
| 4 | Windows 4 HD | 2 | Output 8 | B |
| | | | Enc2 1 | |
| 5 | Input 5 | 1 | Output 5 | o |
| 6 | Input 6 | 1 | Output 6 | o |
| 7 | Input 7 | 1 | Output 7 | o |
| 8 | Input 8 | 0 | - | o |
| 9 | Input 9 | 0 | - | |
| 10 | Input 10 | 1 | Output 10 | |
| 11 | Input 11 | 1 | Output 11 | |
| 12 | DPlay1 | 1 | Output 13 | |
| 13 | DPlay2 | 1 | Denc | |
| 14 | Input 14 | 1 | Output 14 | x |
| 15 | Input 15 | 1 | Output 15 | x |
| 16 | Loopback | 1 | Loopback | |
--------------------------------------------------------------------

Video outputs
--------------------------------------------------------------------
| ## | x | Video output name | Connected video input | s |
--------------------------------------------------------------------
| 1 | L | Enc1 1 | Windows 3 | |
| 2 | L | Enc1 2 | Windows 2 | |
| 3 | L | Enc1 3 | Windows 1 | |
| 4 | L | Enc1 4 | Windows 1 | |
| 5 | | Output 5 | Input 5 | x |
| 6 | | Output 6 | Input 6 | x |
| 7 | | Output 7 | Input 7 | x |
| 8 | | Output 8 | Windows 4 HD | |
| 9 | L | Enc2 1 | Windows 4 HD | B |
| 10 | | Output 10 | Input 10 | B |
| 11 | | Output 11 | Input 11 | B |
| 12 | L | Denc | DPlay2 | B |
| 13 | O | Output 13 | DPlay1 | o |
| 14 | | Output 14 | Input 14 | o |
| 15 | | Output 15 | Input 15 | o |
| 16 | O | Loopback | Loopback | o |
--------------------------------------------------------------------

|----------------------------------------------------------------------|


Video inputs Legend
===================

Column 1 (##) - Input port number
Column 2 - Input port names
Column 3 (n) - To how much outputs this input is routed.
Column 4 - List of output ports which are connected to this input.
Column 5 (s) - Port status /type/. Universal Videohub's support
BNC/Optical ports and this column shows the port type.
- Empty means that the device do not support port
status.
x - The port type is "None". This means that the
port is not installed.
B - The port type is "BNC".
o - The port type is "Optical".


Video outputs Legend
====================

Column 1 (##) - Output port number
Column 2 (x) - Output port lock status
L - The port is locked by another IP address (user)
O - The port is locked by me (from my IP address)
Column 3 - Output port names
Column 4 - Which input port is routed to this output
Column 5 (s) - Port status /type/. Same format as in input ports.


Development
===========

The development is done using git. videohubctrl repository is hosted at

http://github.com/gfto/videohubctrl

To clone the repository issue the following commands:

git clone git://github.com/gfto/videohubctrl.git
cd videohubctrl
git submodule init
git submodule update
make

The code is developed and tested under modern Linux. It's also compiled
from time to time under OS X but it's not tested there.


Updating the code
=================

To update cloned videohubctrl, go to the directory where the repository
is cloned and run the following commands:

git fetch origin
git merge origin/master
git submodule update
make clean all

videohubctrl's master branch should always be useful so it is safe to
use it instead of official release. The master branch will always
be better than any released version.


Reporting bugs
==============

If you think you have found bug in videohubctrl, please report it to
the e-mail listed in Contact section (see below) of this README file.

When reporting bugs, please send the whole output that videohubctrl
generated (preferably by using --debug option) and also the full
command line which you used and describe what you think the videohubctrl
does wrong.


Releases
========

Official releases can be downloaded from videohubctrl home page which is

http://georgi.unixsol.org/programs/videohubctrl/


Contact
=======

For requests, patches, bug reports, complaints and so on send e-mail to

Georgi Chorbadzhiyski <georgi@unixsol.org>