文章目录
Gain encoding output parameter
API instruction
To obtain the paremeter for output display video sending to encoder for encoding.
Request
- Method: GET/POST
- URL:
encode/get.json
- Headers:
- submit parameter:
field | type | instruction |
---|---|---|
output | alphabetic string | encoder ID,parameter:”OUTPUT1”(it only supports encoding the video from the output 1 at the moment, and new verion will be changed to choose 1/2) |
Response
- Body
{
"result": "ok",
"data": {
"AudioSource": "yes",
"FrameRateMode": "default",
"GOPSize": 60,
"BRCtrl": "cbr",
"Chrome": 0,
"RefFrame": 1,
"Profile": "high",
"Bitrate": 8000000,
"Quality": 80,
"Resolution": "0x0",
"FrameRate": 0,
"Scaling": "default"
}
}
- return instruction:
field | type | instruction |
---|---|---|
RefFrame | alphabetic string | integer,reference frame。1 refers to one reference frame,2 refers to multi reference frames |
GOPSize | alphabetic string | integer H.264 GOP( (determines the interval between I frames), unit in frames |
BRCtrl | alphabetic string | cbr/vbr。Bitrate control type,cbr or vbr |
Chrome | alphabetic string | 0 color 1 grey |
AudioSource | alphabetic string | wheter with audio or not,”yes”:with audio、 “no”:no audio |
Profile | alphabetic string | base/main/high,realted to H.264 encoding Profile |
Bitrate | alphabetic string | integer,encoding bit rate,Unit bps。for exapme 1000000 means 1Mbps |
Scaling | alphabetic string | encoding scale size。 default:not scale。 (w)x(h):w (width),h ( height),related scale size。 |
FrameRate | alphabetic string | realted encoding frame value related by integer (if FrameRateMode is default/half,then no need for FrameRate value ) |
FrameRateMode | alphabetic string | frameRateMode default:full frame rate,the encoding frame rate will be the same as that of the input video half:if frame rate of the input video >=50 , then the frame rate will half down automatically custom:refers to set the frame rate manually |
test calling:
http://192.168.2.123/api/encode/get.json?output=OUTPUT1
Configure encoding output parameter
API instruction
configure the encoder parameter returned from the output video
Request
- Method: GET/POST
- URL:
encode/modify.json
- Headers:
- submit parameter:
field | type | instruction |
---|---|---|
output | alphabetic string | encoder ID,parameter:”OUTPUT1”(it only supports encoding the video from the output 1 at the moment, and new verion will be changed to choose 1/2) |
RefFrame | alphabetic string | integer,parameter stream。1 refers to one reference frame,2 refers to multi reference frames |
GOPSize | alphabetic string | integer H.264 GOP( (determines the interval between I frames), unit in frames |
BRCtrl | alphabetic string | cbr/vbr。Bitrate control type,cbr or vbr |
Chrome | alphabetic string | 0 color 1 grey |
AudioSource | alphabetic string | whether with audio or not,”yes”:with audio、 “no”:no audio |
Profile | alphabetic string | base/main/high,realted H.264 encoding Profile |
Bitrate | alphabetic string | integer,encoding bit rate,Unit bps。for exapme 1000000 means 1Mbps |
Scaling | alphabetic string | encoding scale size。 default:not scale。 (w)x(h):w (width),h ( height),related scale size。 |
FrameRate | alphabetic string | realted encoding frame value related by integer (if FrameRateMode is default/half,then no need for FrameRate value ) |
FrameRateMode | alphabetic string | frameRateMode default:full frame rate,the encoding frame rate will be the same as that of the input video half:if frame rate of the input video >=50 , then the frame rate will half down automatically custom:refers to set the frame rate manually |
Response
- Body
{
"result": "ok"
}
test calling:
http://192.168.2.81/api/encode/modify.json?output=OUTPUT1&Scaling=default&Chrome=0&Profile=main&BRCtrl=vbr&Bitrate=2000000&FrameRateMode=default&GOPSize=1&RefFrame=1&FrameRate=1&AudioSource=yes