1. Home
  2. Docs
  3. HTTP API of NDI
  4. Advanced options of encoding output and switching

Advanced options of encoding output and switching

The default rule of video/audio output is by following the format of NDI source, that’s the same resolution/frame rate/audio sampling rate/channels as NDI source.

But you can specify the advanced option of resolution, frame rate and audio sampling rate.

API URL

/api/v1/decoder/output/set

Request

​ Method: GET/POST

Parameter Value Description
resolution [STRING], Optional You can set up the following option value:
auto: default,follow NDI source resolution
deint: If the video format of NDI source is interlaced,it will deinterlace to progressive format automatically (1080i -> 1080p conversion). If the Source format is progressive, no affected.
frame_rate [INT], Optional Specify frame rate output. optional value include:
23.98, 24, 25, 29.97, 30, 50, 59.94, 60 and one specified value: 0
0 mean use the same frame value as NDI Source.
if specified an effective frame rate value,NDI decoder will force output the specified frame rate. For example,the original video format of NDI source is 1920x1080p 60Hz,but if specify frame_rate as 29.97,NDI decoder will force output as 1920x1080p 29.97Hz.
sample_rate [INT], Optional Specify audio sampling rate.
pay attention: due to the version of hardware limitation,sample_rate can only be set up 48000. So,please miss the this parameter.

Response

Example:

{
    "result": "ok"
}

If set successfully, it will return the message of result = "ok", or please refer to 1.3 for error message descriptions.

Get video/audio advanced output options


API URL

/api/v1/decoder/output/get

Request

​ Method: GET/POST

​ Parameters: NONE

Response

Example:

{
    "result": "ok",
    "data": {
        "resolution": "auto",
        "frame_rate": 59.94,
        "sample_rate": 48000
    }
}
Field Value Description
resolution [STRING] Refer to 8.3/api/v1/decoder/output/set description
frame_rate [INT] Refer to 8.3/api/v1/decoder/output/set description
sample_rate [INT] Refer to 8.3/api/v1/decoder/output/set description

How can we help?