“look and feel” and arrangement of such Content, contained in this Manual is owned, controlled or licensed by or to Avonic, and is protected by trade dress, copyright, patent and trademark laws, and various other intellectual property rights and unfair competition laws.
Contents DISCLAIMER, CONTACT AND LIABILITY....................ii Symbols Used in This Manual......................ii INTRODUCTION............................4 Purpose of This Manual......................4 Target Audience......................... 4 Document Structure........................4 APPENDIX C - HTTP API.........................5 How to use HTTP API........................5 Curl............................. 6 {"GetEnv"}........................... 6 HTTP API code list........................7 PTZ..............................7 PTZ speed...........................8 Speed by Zoom........................
INTRODUCTION Purpose of This Manual This Manual describes the instructions and programming codes of the HTTP API functionality of the CM70 camera, which you could use to control the camera over IP. Target Audience This manual is developed for IT professionals who are responsible for operating the Product. Document Structure The Manual is subdivided into the following Chapters: Introduction...
APPENDIX C - HTTP API With the HTTP API you can control the camera by using a web browser like Microsoft Edge or Google Chrome. It is possible to change multiple settings at once using this feature. This document is available as an Appendix in the CM70 series manual and as a separate document that can be downloaded on the product website.
Curl It is also possible to change the camera settings at once by using the Command Prompt from Windows. Follow instructions below: 1. Click on Start in the left corner of your screen in Windows. 2. Type Notepad and open this application. 3.
HTTP API code list PTZControl Code: http://192.168.5.126/ajaxcom?szCmd={"SysCtrl":{"PtzCtrl":{"nChanel":0,"szPtzCmd":"left_start","byValue":50}}} Command Setting Function Command nChanel byValue 0,100 used to control the speed of ptz szPtzCmd left start left_start left stop left_stop leftup start leftup_start leftup stop leftup_stop leftdown start leftdown_start leftdown stop leftdown_stop rightstart right_start rightstop...
Audio Audio Configure Get audio configure Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"Audio":{}}} Set audio configure Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"Audio":{"nSampleBits":16,"nAudioSmstMask": [33554888,33554888,33554433],"bEnable":0,"nInpVolume":4,"nBitRate":64,"nAEncType":7,"byAudioCodecList": [6,7,2],"nSampleRate":44100,"nChannel":1}}} Function Code Command Setting Enable http://192.168.5.126/ajaxcom? bEnable 0: off szCmd={"SetEnv":{"Audio": 1: on {"bEnable":1}}} Encode http://192.168.5.126/ajaxcom? nAEncType 6: Mp3AAC Type szCmd={"SetEnv":{"Audio": 7: G.711A {"nAEncType":7}}} Sample http://192.168.5.126/ajaxcom? nSampleRate (Only 16000 Rate...
Page 11
Video encode settings Video Encode Settings Function Code Command Setting Compressed Format http://192.168.5.126/ajaxcom? emVideoCodec 5: H.264 szCmd={"SetEnv":{"VideoEncode":[{"stMaster": 7: H.265 (BP profile only) {"emVideoCodec":5},"nChannel":0}]}} Profile http://192.168.5.126/ajaxcom? byProfile 0: BP szCmd={"SetEnv":{"VideoEncode":[{"stMaster": 1: MP {"byProfile":0},"nChannel":0}]}} 2: HP http://192.168.5.126/ajaxcom?szCmd={"GetEnv": byImageSizeList (Lists {"VideoEncode": {"nChannel":-1}}} and receive its all imagesize, different returning value.
Video Streaming Stream Publish Get stream publish parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"StreamPublish":{"nChannel":-1}}} Set stream publish parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"StreamPublish":[{"stSlave": {"wHostPort":1935,"szHostUrl":"192.168.5.11", "nProtolType":2,szStreamName":"live/ av1","bEnable":0,"nAbProtolMask":1,"szSrtKey":"","wSrtKeyLen":0,"szUserName":"","szPassword":""},”stMaster”: {"wHostPort":1935, "szHostUrl":"192.168.5.11",”nProtolType":3,"szStreamName":"live/av0","bEnable":0, "nAbProtolMask":1,"szSrtKey":"1111111111","wSrtKeyLen":0,"szUserName":"", "szPassword":""},"nChannel":0}]}} NOTE: When modifying one param, you should take along wHostPort. Otherwise, the host port will be zero. Function Code Command...
RTP Multicast NOTE: When modifying one param you should take along bEnable and awMultiCastPort. Otherwise, it will be set to 0. Suggesting that when setting env, you can distinguish the stMaster and stSlave. RTP Multicast Settings RTP Multicast Settings Function Code Command Setting...
Page 14
Camera Settings Mode http://192.168.5.126/ajaxcom?szCmd={"SetEnv": emExpMode Auto {"VideoParam":[{"stExp":{"stExpMode": Manual {"emExpMode":0}}"nChannel":0}]}} Bright Exposure: Auto http://192.168.5.126/ajaxcom? expcomp_mode szCmd={"SetEnv":{"VideoParam":[{"stExp": {"expcomp_mode":2},"nChannel":0}]}} http://192.168.5.126/ajaxcom? expcomp [0, 14] Level szCmd={"SetEnv":{"VideoParam":[{"stExp": {"expcomp":8},"nChannel":0}]}} http://192.168.5.126/ajaxcom?szCmd={"SetEnv": backlight {"VideoParam":[{"stExp":{"backlight":2},"nChannel":0}]}} Camera Settings Exposure: Auto Function Code Command Setting Flicker http://192.168.5.126/ajaxcom? antiflicker szCmd={"SetEnv":{"VideoParam":[{"stExp": 50HZ {"antiflicker":0},"nChannel":0}]}} 60HZ G.Limit http://192.168.5.126/ajaxcom?
Page 15
Camera Settings Flicker http://192.168.5.126/ajaxcom? Antiflicker szCmd={"SetEnv":{"VideoParam":[{"stExp": 50HZ {"antiflicker":0},"nChannel":0}]}} 60HZ G.Limit http://192.168.5.126/ajaxcom? gainLimit [0, 15] szCmd={"SetEnv":{"VideoParam":[{"stExp": {"gainLimit":5},"nChannel":0}]}} Iris http://192.168.5.126/ajaxcom? nIris [0, 12] szCmd={"SetEnv":{"VideoParam":[{"stExp": {"stIris":{"nIris":12}},"nChannel":0}]}} http://192.168.5.126/ajaxcom? [0, 8] szCmd={"SetEnv":{"VideoParam":[{"stExp": {"drc":6},"nChannel":0}]}} Exposure: Bright Bright http://192.168.5.126/ajaxcom? bright [0, 23] szCmd={"SetEnv":{"VideoParam":[{"stExp": {"bright":0},"nChannel":0}]}} Flicker, G.Limit, DRC You can find the same configure at AAE Color and Image Camera Settings...
Video OSD Video OSD Get video parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"VideoOsd":{"nChannel":-1}}} Set set video parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"VideoOsd":[{"stTime": {"bEnable":1,"nIndex":0,"nXPos":0,"szText":"","nYPos":10000, "stFtColor": {"byAlpha":128,"byRed":255,"byGreen":255,"byBlue":255},"stBkColor": {"byAlpha":0,"byRed":0,"byGreen":0,"byBlue":0}},"stTitle": {"bEnable":0,"nIndex":0,"nXPos":0,"szText":"","nYPos":0,"stFtColor": {"byAlpha":128,"byRed":255,"byGreen":255,"byBlue":255},"stBkColor": {"byAlpha":0,"byRed":0,"byGreen":0,"byBlue":0}},"nChannel":0}]}} NOTE: All params can be saved by this command and also you can set one param alone. Function Code Command Setting...
OSD Font Size Get OSD font size parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"TTFFontSize":{"nChannel":-1}}} Set video parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"TTFFontSize":{"nFontSize":[48,48],"bAutoSize":1}}} Function Code Command Setting bAutoSize 0: off,1: on nFontSize [8,200] Output Format (Video) Output Format Get video out parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"VideoOut":{"nChannel":-1}}} Set video out parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"VideoOut": {"nNetMode":2,"emVoutFormat":9,"byFormatList":[10,9,4,3,8,7,6,5,26,25,20,21,22,23,24]}}}...
Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"NetWork":{"nChannel":-1}}} Set network SRT parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork":{"stSrt": {"wSrtLen":0,"wSrtPort":9000,"szSrtPin":"xxxxxxxxxx"}}}} Function Code Command Setting crypto key length in bytes wSrtLen [0-32] Port SRT wSrtPort Default 9000 Password stream encryption szSrtPin user-defined Network Network configure and port settings Network Configure Get network port parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"NetWork":{"nChannel":-1}}} Set network port parameters...
Command Setting Preferred DNS Server http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork":{"stDns": {"szDns1":"8.8.8.8"}}}} Alternative DNS Server http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork":{"stDns": {"szDns2":"8.8.8.8"}}}} Get NDI parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"NetWork":{"nChannel":-1}}} Set NDI parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork":{"stNdi": {"szNdiName":"Avonic-82342","bNdiControlEnable":1,"bNdiEnable":1,"szNdiGroup":"public"}} Function code command setting Ndi Enable http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork": bNdiEnable 0: off 1: on {"stNdi":{"bNdiEnable":1}}}} Ndi Control http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"NetWork": bNdiControlEnable 0: off 1: on {"stNdi":{"bNdiControlEnable":1}}}}...
System System Configure Get sysattr parameters Code http://192.168.5.126/ajaxcom?szCmd={"GetEnv":{"SysAttr":{"nChannel":-1}}} Set sysattr parameters Code http://192.168.5.126/ajaxcom?szCmd={"SetEnv":{"SysAttr": {"nLanguage":0,"szDeviceID":"1","emVideoStandard":1,"szDevName":"testname"}}} Function Code Command Setting Device Name szDevName user-defined, cannot use white space Device ID szDeviceID cannot modify Language nLanguage 0: Simplified Chinese 2: English License License Get License parameters Code http://192.168.5.126/ajaxcom?szCmd=:{"QueryState":{"QueryLicenseState":{}}}...
SysUser Password szPassword user-defined, no white space. This command must set three users at the same time. Update Update Get update parameters Code http://192.168.5.126/ajaxcom?szCmd={"QueryState":{"QueryVersion":{}}} Code Get the return value and split it like this: szText.Format(“%d.%d.%d%d-%d-%d”,(stVersion.dwCamVersion>>16)&0xFF,(stVersion.dwCamVersion>>8)&0xFF, (stVersion.dwCamVersion0xFF),(stVersion.dwCamDate>>16)&0xFFFF,(stVersion.dwCamDate>>8)&0xFF, (stVersion.dwCamDate&0xFF)); Set update parameters Not supported update with API, you can do this through webpage.
Need help?
Do you have a question about the CM70-NDI and is the answer not in the manual?
Questions and answers