Stream Management

    set-stream

    This method create, remove, or modify streams. Request:

    {
        "cmd": "set-stream",
        "id": "...",
        "stream": {
            "enable": true,
            "type": "spts",
            "id": "...",
            "name": "...",
            "input: [ ... ],
            "output: [ ... ]
        }
    }
    • id – unique stream identifier. Option required on stream modification. This option is not required to create a new stream.
    • enable – required field, enabled srteam or not.
    • type – required field, stream type. Available values: spts or mpts.
    • id – unique stream identifier.
    • name – stream name.
    • input – list of the stream sources.
    • output – list of the stream destinations.

    To remove stream send similar request:

    {
        "cmd": "set-stream",
        "id": "...",
        "stream": {
            "remove": true
        }
    }

    get-stream

    Get stream options. Request:

    {
        "cmd": "get-stream",
        "id": "..."
    }

    Response:

    {
        "get-stream": "ok",
        "stream": { ... }
    }
    • stream - contains all stream options

    toggle-stream

    Turn off/on stream. Request:

    {
        "cmd": "toggle-stream",
        "id": "..."
    }

    restart-stream

    Restart stream. Request:

    {
        "cmd": "restart-stream",
        "id": "..."
    }

    set-stream-input

    Choose active input. Works only for streams with next backup types: passive, disable. Request:

    {
        "cmd": "set-stream-input",
        "id": "...",
        "input": "..."
    }
    • input – input number. If option not defined will be started next input after the active