All Projects → jensstigaard → node-vmix

jensstigaard / node-vmix

Licence: MIT license
NodeJS vMix utility to easily send commands and receive info such as xml data or real time tally from a vMix instance

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-vmix

SPX-GC
SPX is a graphics control client for live video productions and live streams using CasparCG, OBS, vMix, or similar software.
Stars: ✭ 178 (+888.89%)
Mutual labels:  vmix
deadsfu
Dead-simple WebRTC broadcasting. From the browser, or your application. Cloud-native and scalable.
Stars: ✭ 23 (+27.78%)
Mutual labels:  livestreaming
youtube-livestream-android-app
Livestream to your youtube channel by using this android app. Made using Youtube's live streaming API
Stars: ✭ 18 (+0%)
Mutual labels:  livestreaming
twitch-youtube-restream-chat-overlay
Access the YouTube Live chat and route it to your OBS or VMix Browser source.
Stars: ✭ 52 (+188.89%)
Mutual labels:  vmix
emrah-buster-templates
The templates of the emrah-buster installer.
Stars: ✭ 57 (+216.67%)
Mutual labels:  livestreaming
protocol
Livepeer protocol
Stars: ✭ 136 (+655.56%)
Mutual labels:  livestreaming
vinproma
vMix Input Progress Monitor App. View progress of current playing input in HTML or send to vMix title (XAML recommended).
Stars: ✭ 33 (+83.33%)
Mutual labels:  vmix
wifi-tally
An affordable and reliable Tally Light that works via WiFi based on NodeMCU / ESP8266. Supports multiple video mixers.
Stars: ✭ 66 (+266.67%)
Mutual labels:  vmix
vMix-Titles
A collection of vMix title animation for my work.
Stars: ✭ 31 (+72.22%)
Mutual labels:  vmix
smart rtmpd
RTMP server, smart, compact, high performance(c, c++), high concurrency, easy to maintain, easy to deploy, (supports multiple operating systems Windows and Linux, ARM, FreeBSD)
Stars: ✭ 159 (+783.33%)
Mutual labels:  vmix
Nodetube
Open-source YouTube alternative that offers video, audio and image uploads, livestreaming and built-in monetization
Stars: ✭ 2,066 (+11377.78%)
Mutual labels:  livestreaming
plugin.video.mlbtv
MLB.tv KODI add-on
Stars: ✭ 17 (-5.56%)
Mutual labels:  livestreaming
bitwave-media-server
A dockerized container of NGINX-RTMP and Node.js with transcoding, archiving & stream authentication.
Stars: ✭ 39 (+116.67%)
Mutual labels:  livestreaming
rtsp-bench
RTSP -> WebRTC Server that generates a CPU Usage report
Stars: ✭ 125 (+594.44%)
Mutual labels:  livestreaming
automating-livestream-video-monitoring
This repo presents a demo application for realtime livestream video quality monitoring using AWS serverless and AI/ML services.
Stars: ✭ 20 (+11.11%)
Mutual labels:  livestreaming

node-vmix

NodeJS vMix API utility to enable easy setup to communicate with vMix instance via TCP socket or HTTP alternatively.

It is recommended to use TCP, however, there is currently not implemented feedback/response. It is possible to implement this yourself if necessary, by analysing the responses, but it is not supported out of the box.

package json version npm version npm downloads

NPM Badge

This code previously were found in the vmix-js-utils but are now branched out in its own package to enable usage of the vmix-js-utils to be used in a clean frontend environment (non-NodeJS), and also to give a better experience for the users. Are you looking for vMix utility for your js frontend? Take a look at vmix-js-utils for more info. Both packages are available with npm - see my npm profile.

Purpose

node-vmix consists of two modules - one for TCP connection, one for HTTP. Each can be used on its own, but usually it makes more sense to make it interplay with some of the other modules. The modules are coded as classes, meaning that they are constructed with specific parameters, e.g. that the instanciation of a connection needs a host and a port.

Quick start

const { ConnectionTCP } = require('node-vmix')

const connection = new ConnectionTCP('localhost')

// Listener for xml state data
connection.on('xml', xmlData => {
 // Your logic here!
 // See example to parse the XML correctly
})

// Listener for tally
connection.on('tally', tally => {
 // Your logic here!
})

// Listener for data such as tally
connection.on('data', data => {
 // Your logic here!
})

connection.on('connect', () => {
  // Request vMix API XML state by sending message 'XML'
  connection.send('XML')

  // Request vMix tally info by sending message 'TALLY'
  connection.send('TALLY')
})

Note: One should check whether the connection is actually established before attempting sending message to the socket.

Documentation

Please visit the documentation here: https://jensstigaard.github.io/node-vmix/.

The documentation includes definition and description of classes and type.

Installation and use

NPM

The utilities are published at npmjs as a package for NodeJS, meaning that you can easily add the utilities as a dependency in your project using npm.

npm install node-vmix --save
# or 'yarn add node-vmix'

In your code the simplest way to import the modules is the following:

const { Connection } = require('node-vmix')
// or ES6 import syntax:  import { Connection } from 'node-vmix'

const connection1 = new Connection('localhost')
const connection2 = new Connection('192.168.1.50')

connection1.send({ Function: 'Cut' })
connection2.send({ Function: 'Merge' })

You are also able to import all of the modules as a gathered variable, less elegant way:

const vMix = require('node-vmix')

const connection1 = new vMix.Connection('localhost')
const connection2 = new vMix.Connection('192.168.1.50')

connection1.send({ Function: 'Cut' })
connection2.send({ Function: 'Merge' })

Examples and use

Electron example

Looking for a full blown example project? See the repositories:

These apps are using this library for vMix connection. They are built with ElectronJS and can be compiled for both Windows, Mac or Linux platforms.

Code snippet examples

Here are some basic example of how to use the library

Connection TCP

Legacy:

Standalone project / Fork

The code can be cloned and tested as needed from the source code.

Clone repository and go into directory

git clone https://github.com/jensstigaard/node-vmix.git
cd node-vmix

Install dependencies

npm install # or 'yarn'

Compile TypeScript source code to JavaScript

npm install # or 'yarn'

Run tests

npm test # or 'yarn test'

Contribution

You are more than welcome to contribute to the repository. Fork the repo and make a pull request with the changes.

As you can see in the list on the right side, others have done it already!

Roadmap

  • TCP command sender: feedback/responses on commands sent
  • More tests
  • Perhaps more functionality
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].