getSourceScale.lua
[INDEX]

ABSTRACT

Get the (preprocessor) source video scaling configurations

If the encoder has an image preprocessor, it can make the input video scaling up/down. Combine thepreprocessor cropping feature ( Refer to getSourceCrop.lua/setSourceCrop.lua ), it canimplement a digital P/T/Z function. Even no need the cropping feature, it can also scale the sourcevideo to special size and special framerate, e.g. the input video is 720p25 and scale it to1080p50.

NOTE Not all encoders support this feature but only the models with image pre-processor.

ARGUMENTS

HTTP Arguments submit: POST

Test this API over HTTP - (URL):

NONE

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.

"Data": {
/*OBJECT*/

Scaling parameters

"Format":
"STRING"

Scale to what format:

default

Default, no scaling and no framerate conversion.

VIDOUT_1920x1080p60

Scale to 1920x1080@60fps

VIDOUT_1920x1080p59

Scale to 1920x1080@59.94fps

VIDOUT_1920x1080p50

Scale to 1920x1080@50fps

VIDOUT_1920x1080p30

Scale to 1920x1080@30fps

VIDOUT_1920x1080p25

Scale to 1920x1080@25fps

VIDOUT_1280x720p60

Scale to 1280x720@60fps

VIDOUT_1280x720p50

Scale to 1280x720@50fps

VIDOUT_1280x720p30

Scale to 1280x720@30fps

VIDOUT_1280x720p25

Scale to 1280x720@25fps

VIDOUT_640x480p60

Scale to 640x480@60fps

VIDOUT_1024x768p60

Scale to 1024x768@60fps

VIDOUT_1280x1024p60

Scale to 1280x1024@60fps

VIDOUT_1440x900p60

Scale to 1440x900@60fps

...Others

Please contact provider's technical support

"Mode":
"STRING"

Picture stretch. If 'Format' is not 'default', this decides the picture stretch mode:

default

Default (Same as OUTCTRL_ASPECT)

OUTCTRL_ASPECT

Stretch and keep aspect ratio. If input video ratio is different from output video(E.g. input video is 16:9, whileoutput video is 4:3), to order keep aspect ratio, blank part will be filled with black.

OUTCTRL_P2P

Point-to-Point show, that is, each pixel of input video is corresponding with each pixel of output video,display in the center. It means image will not scale up/down, if input video smaller than output video, output video willwill be displayed in the center of output video, surrounding blank part is filled with black; otherwise, it will display thecenter part of the cropping input video.

OUTCTRL_STRETCH

Stretch but not keep aspect ratio (so it may lead to video ratio distortion).

}
}

OTHER NOTES

KILOVIEW Device HTTP API, v1.0