setVideoEncoding.lua
[INDEX]

ABSTRACT

Set main/sub stream H.264 encoding parameters

ARGUMENTS

HTTP Arguments submit: POST

Test this API over HTTP - (URL):

Stream
(MUST)

Stream:

main

Main stream

sub

Sub stream

Test value:

Scaling

Encoding image size

default

No scaling, for main stream, image size is same as input video size;

for sub stream, default size is 720x576.

(w)x(h)

(w) is the width, (h) is the height (e.g. 1280x720): Specified image scaling size for encoding.

Test value:

Chrome

Color option.

0

Color

1

Gray

Test value:

Codec

H264|H265,Video Codec (Now only support H.264)

Test value:

Profile

base|main|high, H.264 Codec profile

Test value:

BRCtrl

cbr|vbr, Bitrate controlling, 'cbr' or 'vbr'.

Test value:

Bitrate
INTEGER

Encoding (want) bitrate, in bps. Like 1000000 is 1Mbps.

Test value:

FrameRateMode

Frame rate mode

default

Full frame rate, that is, encoding frame rate is same as the input video frame rate

half

Half frame rate, that is, encoding frame rate is half of input video frame rate if input frame rate is >= 50

custom

Manually set frame rate

Test value:

FrameRate
NUMBER

Manually set frame rate (If the 'FrameRateMode' is 'full'/'half', don't set this)

Test value:

GOPSize
INTEGER

H.264 GOP size (determine I frame interval), frame number as unit.

Test value:

RefFrame
INTEGER

1|2, reference frame, 1 means unique reference frame, 2 means multiple reference frames.

Test value:

BindAudioChannel
INTEGER

Bound audio encoding engine channel number, -1 means no audio channel bound.

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

}

OTHER NOTES

Device HTTP API, v1.0