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*/ | |||||||
"Stream": "STRING" | Current stream:
| ||||||
"SnapUrl": "STRING" | http://... HTTP URL for getting previewing video image (Note: essentially, no matter which stream, SnapUrl will get the same content, because there only one Motion-JPEG encoding service) | ||||||
"Config": { /*OBJECT*/ | Current encoding configurations (If specified Config=1 among ARGUMENTS, it returns) | ||||||
"Scaling": "STRING" | Encoding image size
| ||||||
"Chrome": INTEGER | 0|1, 0 means color, 1 means gray. | ||||||
"Codec": "STRING" | H264|H265, video codec algorithm (only for H264 now) | ||||||
"Profile": "STRING" | base|main|high, H.264 Codec profile | ||||||
"BRCtrl": "STRING" | cbr|vbr, Bitrate controlling, 'cbr' or 'vbr'. | ||||||
"Bitrate": INTEGER | Encoding (want) bitrate, in bps. Like 1000000 is 1Mbps. | ||||||
"FrameRateMode": "STRING" | Frame rate mode
| ||||||
"FrameRate": NUMBER | Manually set frame rate (If the 'FrameRateMode' is 'full'/'half', don't set this) | ||||||
"GOPSize": INTEGER | H.264 GOP size (determine I frame interval), frame number as unit. | ||||||
"RefFrame": INTEGER | 1|2, reference frame, 1 means unique reference frame, 2 means multiple reference frames. | ||||||
"BindAudioChannel": INTEGER | Bound audio encoding engine channel number, -1 means no audio channel bound. | ||||||
} | |||||||
"Status": { /*OBJECT*/ | current instant encoding status (If specify Status=1 among ARGUMENTS, it returns) | ||||||
"Codec": "STRING" | H264|H265, Current Codec | ||||||
"Profile": "STRING" | base|main|high, Current H.264 profile | ||||||
"BindAudioChannel": INTEGER | Bound audio encoding engine channel number, -1 means no audio channel bound. (It's same as 'BindAudioChannel' in 'Config') | ||||||
"Width": INTEGER | Actual encoding video width | ||||||
"Height": INTEGER | Actual encoding video height | ||||||
"FrameRate": NUMBER | Actual video encoding frame rate (fps) | ||||||
"Bitrate": INTEGER | Actual video encoding bitrate(Kbps) | ||||||
} | |||||||
} | |||||||
} |
If you need to get instant audio encoding status, please separately call getAudioEngChannel.lua according to BindAudioChannel in RETURNS.
Device HTTP API, v1.0
Copyright (c) 2016.