setJPEGStreaming.lua
[INDEX]

ABSTRACT

Set parameter of Motion-JPEG encoding/streaming.

Motion-JPEG encoding/streaming in all KILOVIEW encoder products is defaultly open, assisted to snap photography for preview. But Motion-JPEG can be configured to different modes, like only used for preview (image is small, frame-rate is 5fps) or same as main stream or same as sub stream for different applications.

ARGUMENTS

HTTP Arguments submit: POST

Test this API over HTTP - (URL):

Type

Set Motion-JPEG encoding mode

preview

Only for preview (size should be 720x405, 5fps)

main

The image size is same as main H.264 stream (and frame rate is configurable)

sub

The image size is same as sub H.264 stream (and frame rate is configurable)

Test value:

Quality
INTEGER

1-99, JPEG image quality (higher value means higher quality). WARNING: If the quality value higher than 90, the encoding bitrate may be very high!

Test value:

Chrome
INTEGER

0|1, 0 means color, 1 means gray

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:

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