Code Monkey home page Code Monkey logo

cgf.cameracontrol.main.core's Introduction

Cgf.CameraControl.Main CodeFactor

Typescript application that uses a Gamepad to control a Video mixer and multiple cameras.

Quick start

To start using this project use the following steps:

  • install node.js
  • clone the repository (git clone https://github.com/sensslen/Cgf.CameraControl.Main.Cli.git)
  • install dependencies by calling npm install
  • edit src/config.json to match your setup or just create a new configuration and run the application with the config parameter.
  • compile the app : npm run build
  • run the application using node dist/index.js --config path/to/my/specail/config.json or use one of the starter scripts available for Windows and Mac

⚠ WARNING: Under Construction.
The following chapters need to be rebuilt. These reflect the configuration of version 1 and do no longer apply

Configuration

Configuration of the Application is storead as JSON File. There is the default configuration (src/config.json) which is loaded when the config parameter is omitted when starting the application. Additionally the application may be started with a custom configuration that may be located anywhere on the file system.

The configuration format is basically shown in src/config.json. Please keep reading for further explanations.

Video mixer connections

The application basically supports connections to multiple video mixers. These are configured in the AtemConnections array which is located in the root element of the configuration file directly.

    "AtemConnections": [
        {
            "identifier": "me4",
            "IP": "192.168.1.123"
        },
        {
            "identifier": "i am a string identifier",
            "IP": "192.168.1.123"
        }
    ],

Gamepads

Also there are multiple gamepads supported by one instance of the application. Each gamepad connects to exactly one ME Block on the video mixer and allows to control it. Then there may be an arbitrary number of Image Connections associated with it. Each gamepad also supports executing a number of special functions (setting Keys or executing macros).

⚠️ Currently there is the unfortunate restriction to only support one gamepad per gamepad type. This is a restriction of the gamepad connection library used. This is planned to be changed in the future.

 "Controllers": [
        {
            // Type of the gamepad to connect to
            "ControllerType": "logitech/gamepadf310",

            // Serial number of the gamepad (used to identify the exact camepad to connect to -- currently not supported)
            //"SerialNumber": 123553

            // The Atem identifier (used in the Atem Connection array) associated with the Mixing Console that should be controlled
            "AtemConnection": "me4",

            // The effective ME Block that should be controlled. Be aware that this number is zero based!
            "AtemMixEffectBlock": 2,

            // Key mapping for the special function keys on the Gamepad: A, B, X, Y.
            "SpecialFunctions": {
                "A": {
                    "Type": "key",
                    "Index": 0
                },
                "B": {
                    "Type": "macro",
                    "Index": 0
                }
            },
            // This tag may be omitted. If so, SpecialFunctions will be used
            "AltSpecialFunctions":{
                "X": {
                    "Type": "key",
                    "Index": 1
                }
            },
            // This tag may be omitted. If so, SpecialFunctions will be used
            "AltLowerSpecialFunctions":{
                "Y": {
                    "Type": "macro",
                    "Index": 2
                }
            },

            // Array of connections to images -- see Image Connections chapter below
            "ImageConnections": [
                //...
            ]
        }
    ]

Image Connections

The ImageConnections tag allows to specify an arbitrary number of Inputs to the video Mixer to be controlled via a Gamepad. This tag is structured like following:

{
    // The input number of the image (this corresponds to the physical input number on the video mixer)
    // The name of the input is taken from ATEM
    AtemInputNumber: 1,

    // Optional section that specifies the connection to the camera control.
    // This section is required to get access to the pan/tilt and the zoom feature of a camera
    CgfCameraConnection: {
        ConnectionUrl: 'http://localhost:5000',
        ConnectionPort: 'COM6',
    },

    // This section specifies which camera should be selected when the connection change buttons get pressed. Possible values: up, down, left, right
    ConnectionChangeDefinition: {
        left: 2,
        right: 2,
    },

    // Connection change definition when the "Alt" key is pressed while changing the connection.
    // This section may be omitted. If so, the values defined in ConnectionChangeDefinition are used
    AltConnectionChangeDefinition: {
        up: 5,
        down: 6,
    },

    // Connection change definition when the "AltLower" key is pressed while changing the connection.
    // This section may be omitted. If so, the values defined in ConnectionChangeDefinition are used
    AltLowerConnectionChangeDefinition: {
        up: 7,
        down: 8,
    },
}

cgf.cameracontrol.main.core's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.