npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

bmd-videohub-client

v1.1.6

Published

A package for controlling and reading a Blackmagic Smart Videohub

Downloads

37

Readme

Blackmagic Design Smart Videohub Client

This package makes it possible to control a Blackmagic Design Smart Videohub from Node.JS.

Installation

Install bmd-videohub-client using:

npm install --save bmd-videohub-client

Notes

This package contains of a set of methods to send data to and get data from a Videohub.

Due to the way the Ethernet protocol for the Videohub is set up it is not possible to directly request data from a Videohub. That's why this package kees track of the actual Videohub state in-memory. When the state of the Videohub changes the in-memory storage gets updated. To get instant updates you have to subscribe to the dataSubject Subject (requires RxJS).

Input and output numbers are index based meaning input 1 = 0 and so on.

Basic usage

import { Videohub } from 'bmd-videohub-client';

Videohub.connect("127.0.0.1", 9990).then(() => {
    console.log(Videohub.getDeviceInfo());
    console.log(Videohub.getOutputRouting());
    Videohub.changeOutputRoute(0, 2);
    Videohub.changeInputLabel(0, "Label for input 1");
});

process.on('SIGINT', () => {
    Videohub.disconnect();
    process.exit();
});

API

Connect

connect(ipAddress: string, port: number): Promise<>

Disconnect

disconnect()

GetDeviceInfo

getDeviceInfo()
Returns information about the device currently connected. For example:

{
  "Device present": true,
  "Model name": "Blackmagic Smart Videohub",
  "Video inputs": 16,
  "Video processing units": 0,
  "Video outputs": 16,
  "Video monitoring outputs": 0,
  "Serial ports": 0
}

GetInputLabels

getInputLabels(): Label[]
Returns an array of the labels set for the inputs. For example:

[
   {
      "index":0,
      "text":"Label for input 1"
   },
   {
      "index":1,
      "text":"no label"
   },
   {
      "index":2,
      "text":"no label"
   }
]

GetOutputLabels

getOutputLabels(): Label[]
Returns an array of the labels set for the outputs. For example:

[
   {
      "index":0,
      "text":"Label for output 1"
   },
   {
      "index":1,
      "text":"no label"
   },
   {
      "index":2,
      "text":"no label"
   }
]

ChangeInputLabel

changeInputLabel(index: number, text: string)
Sets the text for a input label by index.

ChangeOutputLabel

changeOutputLabel(index: number, text: string)

GetOutputRouting

getOutputRouting(): Route[]
Returns an array of the current routing, sorted by output. It also shows the lock state of the outputs For example:

[
   {
      "output":0,
      "input":2,
      "locked":"U"
   },
   {
      "output":1,
      "input":2,
      "locked":"U"
   },
   {
      "output":2,
      "input":3,
      "locked":"U"
   }
]

ChangeOutputRoute

changeOutputRoute(output: number, input: number)
Changes the input for a given output.

LockOutput

lockOutput(output: number)
Locks an output. This means the output can only be changed from the current device.

UnlockOutput

unlockOutput(output:number)
Unlocks an output.

Models

Label

index: number;
text: string;

Route

output: number;
input: number;
locked: LockState;

LockState (enum)

LOCKED_FROM_OTHER_DEVICE = 'L',
LOCKED_FROM_THIS_DEVICE = 'O',
UNLOCKED = 'U'

Command (enum)

INPUT_LABELS = 'INPUT LABELS:',
OUTPUT_LABELS = 'OUTPUT LABELS:',
VIDEO_OUTPUT_ROUTING = 'VIDEO OUTPUT ROUTING:',
VIDEO_OUTPUT_LOCKS = 'VIDEO OUTPUT LOCKS:',