KlvStream Injector Automation

Workflow automation

KlvStreamInjector comes with a workflow execution engine that allows you to automate some of the tasks.

RESTfull interface

KlvStreamInjectorProc provides a REST control interface. In order to use it, launch the process with the --restSelfHost argument, for example:

KlvStreamInjectorProc.exe  --restSelfHost "http://localhost:5000"

You can use any free port.

Info Methods

Method Type Description
status Get Get current status

Action Methods

Method Type Description
start Post Start processing
stop Post or Delete Stop processing
insert Put Insert packet

Examples

Get status

Command GET

 http://localhost:5000/status

Response

 {
    "time": "2017-08-14T14:07:16.1572313+03:00",
    "id": "41db75590d804723aef46af7c1072ee1",
    "playerState": "Running",
    "bytesProcessed": 1609468,
    "bitrate": 0,
    "video": {
        "videoPckts": 101,
        "videoFrameRate": 29.92,
        "videoFrameProcessedRate": 29.75
    },
    "klv": {
        "klvPckts": 101,
        "klvPcktRate": 29.92,
        "klvPcktProcessedRate": 29.75
    },
    "data": {
        "dataPckts": 0,
        "dataPcktsRate": 0,
        "dataPcktsProcessedRate": 0
    },
    "insertedKlv": 202,
    "insertedKlvRate": 59.84
}

Start processing

Command POST

http://localhost:5000/start

Stop processing

Command POST or DELETE

http://localhost:5000/stop

Insert packet

Note, KlvStreamInjector must be in the "Running" state!

Command PUT

http://localhost:5000/insert

content-type: application/json

The metadata packet (in json format) should be sent in the body. For example.

{ 
    "2":1575707331700000,
    "3":"Test Mission",
    "5":20.9897,
    "6":5.6001465,
    "7":4.4999542,
    "8":0,
    "10":"DJI Mavic Mini",
    "13":31.5774835933,
    "14":35.4139793736,
    "15":-374.98,
    "16":83.0002,
    "17":46.7091,
    "18":1.2000000296,
    "19":-12.9999999856,
    "23":31.5797917599,
    "24":35.4150795822,
    "38":35.86,
    "47":63,
    "48":{
    "1":1,
    "2":1,
    "3":"//IL",
    "4":"Impleo test flight",
    "12":1,
    "13":"IL",
    "22":9,
    },
    "51":0,
    "56":0,
    "63":3,
    "65":16,
    "82":31.8203906444,
    "83":35.3142286908,
    "84":31.691432298,
    "85":35.6840658354,
    "86":31.5777757026,
    "87":35.4148252753,
    "88":31.5781990306,
    "89":35.4136135873,
    "109":0.01129150390625,
    "110":40,
    "113":36.5625,
    "123":16,
    "131":1575707292000000,
    "132":2400
}

KlvStreamInjector will encode the packet into MISB 601 KLV and it into the stream.