This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
http_api [2019/02/27 20:44] cflintiii [CameraControl] |
http_api [2020/07/24 16:26] cflintiii [CameraControl] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== HTTP API for Z3CAM / HE2K-DCK / HE4K-DCK / FV2K-DCK / FV4K-DCK/ FSDI-DCK / DME-10 / HE1080-RPS ====== | + | ====== HTTP API for Z3CAM / HE2K-DCK / HE4K-DCK / FV2K-DCK / FV4K-DCK/ FSDI-DCK / DME-10 / HE1080-RPS / ZCube / ZCube-SDI ====== |
Line 61: | Line 61: | ||
---- | ---- | ||
+ | |||
===== Encoder Channel Configuration ===== | ===== Encoder Channel Configuration ===== | ||
Line 145: | Line 146: | ||
Description: Password for RTMP authentication. | Description: Password for RTMP authentication. | ||
+ | |||
==== auth_user ==== | ==== auth_user ==== | ||
Line 150: | Line 152: | ||
Description: Username for RTMP authentication. | Description: Username for RTMP authentication. | ||
+ | |||
==== authonoff ==== | ==== authonoff ==== | ||
Line 155: | Line 158: | ||
Description: Enable or disable RTMP authentication. Default: off Possible values: on, off | Description: Enable or disable RTMP authentication. Default: off Possible values: on, off | ||
+ | |||
==== channel ==== | ==== channel ==== | ||
Line 205: | Line 209: | ||
==== fprefix ==== | ==== fprefix ==== | ||
+ | |||
Description: Relative filename for TSFILE or AUX file recording. Note that "fprefix" does NOT include the absolute media path – the "storage" parameter is the proper place to specify the absolute media path. | Description: Relative filename for TSFILE or AUX file recording. Note that "fprefix" does NOT include the absolute media path – the "storage" parameter is the proper place to specify the absolute media path. | ||
Line 210: | Line 215: | ||
==== storage ==== | ==== storage ==== | ||
+ | |||
Absolute path to mounted media device (e.g. /media/sda1/) | Absolute path to mounted media device (e.g. /media/sda1/) | ||
Line 215: | Line 221: | ||
==== telopcharsize ==== | ==== telopcharsize ==== | ||
+ | |||
OSD overlay text character size in pixels | OSD overlay text character size in pixels | ||
- | Possible values: 16, 32, or 64 | + | |
+ | Possible values: 16, 32, or 64 | ||
Line 225: | Line 233: | ||
Enable or disable telop (i.e. OSD overlay of text). | Enable or disable telop (i.e. OSD overlay of text). | ||
+ | |||
Possible values: on, off | Possible values: on, off | ||
Line 234: | Line 243: | ||
Where to overlay text in the encoded video | Where to overlay text in the encoded video | ||
- | Possible values: | + | |
- | top_left | + | Possible values: top_left top_right top_center bottom_left bottom_right bottom_center |
- | top_right | + | |
- | top_center | + | |
- | bottom_left | + | |
- | bottom_right | + | |
- | bottom_center | + | |
Line 339: | Line 343: | ||
Possible values: baseline, main, high | Possible values: baseline, main, high | ||
+ | |||
==== vprotocol ==== | ==== vprotocol ==== | ||
Line 400: | Line 405: | ||
Possible values: on, off | Possible values: on, off | ||
+ | |||
==== piplocaton ==== | ==== piplocaton ==== | ||
Line 408: | Line 414: | ||
Possible values: top_left, top_right, bottom_left, bottom_right | Possible values: top_left, top_right, bottom_left, bottom_right | ||
+ | |||
==== vinterlacemode ==== | ==== vinterlacemode ==== | ||
Line 416: | Line 423: | ||
Possible values: combined, separated (H265 only) | Possible values: combined, separated (H265 only) | ||
+ | |||
==== vmulticastdest ==== | ==== vmulticastdest ==== | ||
Line 424: | Line 432: | ||
Possible values: valid multicast addresses | Possible values: valid multicast addresses | ||
+ | |||
==== amulticastdest ==== | ==== amulticastdest ==== | ||
Line 432: | Line 441: | ||
Possible values: valid multicast addresses | Possible values: valid multicast addresses | ||
+ | |||
==== rtsp_auth_enable ==== | ==== rtsp_auth_enable ==== | ||
Line 449: | Line 459: | ||
Possible values: alpha numeric string | Possible values: alpha numeric string | ||
+ | |||
==== rtsp_auth_password ==== | ==== rtsp_auth_password ==== | ||
Line 457: | Line 468: | ||
Possible values: * | Possible values: * | ||
+ | |||
===== Transport Stream Parameters ===== | ===== Transport Stream Parameters ===== | ||
Line 573: | Line 585: | ||
===== Global Configuration ===== | ===== Global Configuration ===== | ||
- | |||
- | |||
- | |||
Line 640: | Line 649: | ||
action=StartChannel&chn=1&vsource=&vres=follow_input&vcodec=h265&vgdr=on&vprofile=high&vratectrl=cbr&vbitrate=2M&vframeratediv=1&vgopsize=60&vprotocol=rtsp&vdest=192.168.0.6:8600&storage=&fprefix=MOV1_%F_%T_&vpid=221&vdelay=1000&pcrpid=521&pcrinterval=50&pmtpid=31&tsrate=3000K&tslowlat=on&feconoff=off&fecrow=1&feccol=5&zixioverhead=15&zixiauthen=off&zixisession=test&zixiuser=user&aenable=on&asource=MICL&acodec=fdk_aaclc&abitrate=128000&asamplerate=48000&aport=8700&apid=120&aptspcr=250&klvenable=off&klvmode=sdi&klvsrc=/dev/gv7601.0&klvpid=35&klvbrate=1000&authonoff=off&auth_user=user&auth_passwd=password&auxonoff=off&filesize=1024M&telopenable=off&teloptext=ENCDEV&teloplocation=top_left&telopcharsize=32&vquality=balanced | action=StartChannel&chn=1&vsource=&vres=follow_input&vcodec=h265&vgdr=on&vprofile=high&vratectrl=cbr&vbitrate=2M&vframeratediv=1&vgopsize=60&vprotocol=rtsp&vdest=192.168.0.6:8600&storage=&fprefix=MOV1_%F_%T_&vpid=221&vdelay=1000&pcrpid=521&pcrinterval=50&pmtpid=31&tsrate=3000K&tslowlat=on&feconoff=off&fecrow=1&feccol=5&zixioverhead=15&zixiauthen=off&zixisession=test&zixiuser=user&aenable=on&asource=MICL&acodec=fdk_aaclc&abitrate=128000&asamplerate=48000&aport=8700&apid=120&aptspcr=250&klvenable=off&klvmode=sdi&klvsrc=/dev/gv7601.0&klvpid=35&klvbrate=1000&authonoff=off&auth_user=user&auth_passwd=password&auxonoff=off&filesize=1024M&telopenable=off&teloptext=ENCDEV&teloplocation=top_left&telopcharsize=32&vquality=balanced | ||
</code> | </code> | ||
+ | |||
==== StartChannel ==== | ==== StartChannel ==== | ||
Line 670: | Line 680: | ||
- | ==== CameraControl ==== | + | ==== PtzContinuousMove ==== |
+ | Pan to the left at half speed | ||
+ | action=PtzContinuousMove&data={"PanTilt":{"x":-0.5,"y":0},"idx":0} | ||
- | Send VISCA commands to camera. | + | Pan to the right at half speed |
+ | action=PtzContinuousMove&data={"PanTilt":{"x":0.5,"y":0},"idx":0} | ||
+ | Tilt down at max speed | ||
+ | action=PtzContinuousMove&data={"PanTilt":{"x":0,"y":1},"idx":0} | ||
- | Only one command can be sent at a time; the list below are the only supported VISCA commands through the HTTP API. To use VISCA commands that are not listed, usage of the TCP socket can be used to send those VISCA commands. | ||
+ | ==== PtzStop ==== | ||
- | API Format: | + | Stop pan and tilt |
+ | action=PtzStop&data={"mode":1,"idx":0} | ||
- | <code> | ||
- | action=CameraControl&command=visca_command | ||
- | </code> | ||
+ | ==== CameraControl ==== | ||
- | **example:** | + | Send VISCA commands to camera. |
+ | Only one command can be sent at a time; the list below are the only supported VISCA commands through the HTTP API. To use VISCA commands that are not listed, usage of the TCP socket can be used to send those VISCA commands. | ||
- | Commands without value assignments | + | API Format: |
<code> | <code> | ||
- | action=CameraControl&command=dzoom_off | + | action=CameraControl&command=visca_command&cam_index=1 |
</code> | </code> | ||
+ | **example:** | ||
- | Commands with value assignments | + | Commands without value assignments |
<code> | <code> | ||
- | action=CameraControl&command=set_monitor_mode 1080p-59.94 | + | action=CameraControl&command=dzoom_off&cam_index=1 |
</code> | </code> | ||
+ | Commands with value assignments | ||
- | The commands use the same syntax as the serial menu "V" command, as shown below | + | <code> |
+ | action=CameraControl&command=set_monitor_mode 1080p-59.94&cam_index=1 | ||
+ | </code> | ||
- | For the most current list of VISCA commands supported press "V" from the Serial/SSH session of the Serial Menu. | + | The commands use the same syntax as the serial menu "V" command, as shown below |
+ | For the most current list of VISCA commands supported press "V" from the Serial/SSH session of the Serial Menu. | ||
<code> | <code> | ||
- | auto_icr_disable | + | auto_icr_disable |
- | auto_icr_enable | + | auto_icr_enable |
- | cam_control_inquiry | + | cam_control_inquiry |
- | cam_custom_recall | + | cam_custom_recall |
- | cam_custom_reset | + | cam_custom_reset |
- | cam_custom_set | + | cam_custom_set |
- | chroma_get_suppress | + | chroma_get_suppress |
chroma_suppress Set Chroma Suppression (0=none, 1 to 3=chroma supression strength) | chroma_suppress Set Chroma Suppression (0=none, 1 to 3=chroma supression strength) | ||
- | clear_if | + | clear_if |
color_gain Set Color gain (0=60%, 14=200%) | color_gain Set Color gain (0=60%, 14=200%) | ||
- | color_get_gain | + | color_get_gain |
- | color_get_hue | + | color_get_hue |
color_hue Set Color hue (0=-14 degrees, 14=+14 degrees) | color_hue Set Color hue (0=-14 degrees, 14=+14 degrees) | ||
- | debug_rx | + | debug_rx |
- | dzoom_combine_mode | + | dzoom_combine_mode |
dzoom_direct D-Zoom Position (0x00 to 0xeb) | dzoom_direct D-Zoom Position (0x00 to 0xeb) | ||
* Enabled during Separate mode | * Enabled during Separate mode | ||
- | dzoom_off | + | dzoom_off |
- | dzoom_on | + | dzoom_on |
- | dzoom_separate_mode | + | dzoom_separate_mode |
- | dzoom_stop | + | dzoom_stop |
- | dzoom_super_res | + | dzoom_super_res |
dzoom_tele_var p = 0 (Low) .. 7 (High) | dzoom_tele_var p = 0 (Low) .. 7 (High) | ||
* Enabled during Separate Mode | * Enabled during Separate Mode | ||
dzoom_wide_var p = 0 (Low) .. 7 (High) | dzoom_wide_var p = 0 (Low) .. 7 (High) | ||
* Enabled during Separate Mode | * Enabled during Separate Mode | ||
- | dzoom_x1_max | + | dzoom_x1_max |
- | eflip_off | + | eflip_off |
- | eflip_on | + | eflip_on |
- | ext1_func_inquiry | + | ext1_func_inquiry |
- | ext2_func_inquiry | + | ext2_func_inquiry |
- | ext3_func_inquiry | + | ext3_func_inquiry |
- | focus_auto | + | focus_auto |
focus_direct focus pos | focus_direct focus pos | ||
Min. 0x1000 Over Inf | Min. 0x1000 Over Inf | ||
Line 761: | Line 781: | ||
0xd000 6cm | 0xd000 6cm | ||
0xe000 1cm | 0xe000 1cm | ||
- | focus_get_mode | + | focus_get_mode |
- | focus_get_pos | + | focus_get_pos |
- | focus_manual | + | focus_manual |
focus_near_limit focus near limit | focus_near_limit focus near limit | ||
Min. 0x1000 Over Inf | Min. 0x1000 Over Inf | ||
Line 779: | Line 799: | ||
0xd000 6cm | 0xd000 6cm | ||
0xe000 1cm | 0xe000 1cm | ||
- | focus_stop | + | focus_stop |
- | focus_tele_std | + | focus_tele_std |
focus_tele_var p = 0 (Low) .. 7 (High) | focus_tele_var p = 0 (Low) .. 7 (High) | ||
- | focus_toggle | + | focus_toggle |
- | focus_wide_std | + | focus_wide_std |
focus_wide_var p (0 (Low) .. 7 (High)) | focus_wide_var p (0 (Low) .. 7 (High)) | ||
get_low_delay_mode Get low delay mode: 0 - normal, 1 - low delay | get_low_delay_mode Get low delay mode: 0 - normal, 1 - low delay | ||
get_monitor_mode get_monitor_mode: Get video mode of camera output | get_monitor_mode get_monitor_mode: Get video mode of camera output | ||
- | help | + | help |
- | high_sensitivity_off | + | high_sensitivity_off |
- | high_sensitivity_on | + | high_sensitivity_on |
icr_mode modes: | icr_mode modes: | ||
- | auto | + | auto |
on | on | ||
off | off | ||
threshold [0-255] | threshold [0-255] | ||
- | lens_control_inquiry | + | lens_control_inquiry |
- | lens_get_temp | + | lens_get_temp |
- | lr_reverse_off | + | lr_reverse_off |
- | lr_reverse_on | + | lr_reverse_on |
- | other_inquiry | + | other_inquiry |
- | power_inquiry | + | power_inquiry |
- | power_off | + | power_off |
- | power_on | + | power_on |
register_read Read internal register. | register_read Read internal register. | ||
register_write Write internal register. | register_write Write internal register. | ||
* Note: To make register changes effective, run power_off and power_on | * Note: To make register changes effective, run power_off and power_on | ||
- | set_address | + | set_address |
set_low_delay_mode Set low delay mode: 0 - normal, 1 - low delay | set_low_delay_mode Set low delay mode: 0 - normal, 1 - low delay | ||
set_monitor_mode Set monitor mode. | set_monitor_mode Set monitor mode. | ||
Line 822: | Line 842: | ||
limit [0-255] | limit [0-255] | ||
trace enable (0=off, 1=on) | trace enable (0=off, 1=on) | ||
- | version_inquiry | + | version_inquiry |
- | wb_auto_mode | + | wb_auto_mode |
- | wb_autotrace_mode | + | wb_autotrace_mode |
- | wb_get_bgain | + | wb_get_bgain |
- | wb_get_mode | + | wb_get_mode |
- | wb_get_mode_name | + | wb_get_mode_name |
- | wb_get_rgain | + | wb_get_rgain |
- | wb_indoor_mode | + | wb_indoor_mode |
wb_manual_bgain_direct Set Manual WB BGain (0..255) | wb_manual_bgain_direct Set Manual WB BGain (0..255) | ||
* Enabled during Manual WB mode | * Enabled during Manual WB mode | ||
- | wb_manual_bgain_reset | + | wb_manual_bgain_reset |
- | wb_manual_mode | + | wb_manual_mode |
wb_manual_rgain_direct Set Manual WB RGain (0..255) | wb_manual_rgain_direct Set Manual WB RGain (0..255) | ||
* Enabled during Manual WB mode | * Enabled during Manual WB mode | ||
- | wb_manual_rgain_reset | + | wb_manual_rgain_reset |
- | wb_onepush_mode | + | wb_onepush_mode |
- | wb_onepush_trigger | + | wb_onepush_trigger |
- | wb_outdoor_auto_mode | + | wb_outdoor_auto_mode |
- | wb_outdoor_mode | + | wb_outdoor_mode |
- | wb_sodium_lamp_auto_mode | + | wb_sodium_lamp_auto_mode |
- | wb_sodium_lamp_fixed_mode | + | wb_sodium_lamp_fixed_mode |
- | wb_sodium_lamp_outdoor_mode | + | wb_sodium_lamp_outdoor_mode |
zoom_direct pos | zoom_direct pos | ||
Min. 0x0000 | Min. 0x0000 | ||
Line 851: | Line 871: | ||
Max. 0x6000h (In Combine mode, DZoom=Super Resolution Zoom, and monitoring mode FHD or less) | Max. 0x6000h (In Combine mode, DZoom=Super Resolution Zoom, and monitoring mode FHD or less) | ||
Max. 0x7AC0h (In Combine mode and DZoom=On) | Max. 0x7AC0h (In Combine mode and DZoom=On) | ||
- | zoom_get_pos | + | zoom_get_pos |
- | zoom_stop | + | zoom_stop |
- | zoom_tele_std | + | zoom_tele_std |
zoom_tele_var p = 0 (Low) .. 7 (High) | zoom_tele_var p = 0 (Low) .. 7 (High) | ||
- | zoom_wide_std | + | zoom_wide_std |
zoom_wide_var p (0 (Low) .. 7 (High)) | zoom_wide_var p (0 (Low) .. 7 (High)) | ||
+ | |||
</code> | </code> | ||
+ | |||
==== SaveCamera ==== | ==== SaveCamera ==== | ||
Line 934: | Line 956: | ||
Possible values: auto, manual | Possible values: auto, manual | ||
- | |||
==== SetIp ==== | ==== SetIp ==== | ||
+ | |||
=== local_ip === | === local_ip === | ||
+ | |||
IPv4 adresss | IPv4 adresss | ||
+ | |||
=== local_netmask === | === local_netmask === | ||
+ | |||
IPv4 netmask | IPv4 netmask | ||
+ | |||
=== default_gw === | === default_gw === | ||
+ | |||
IPv4 default gateway | IPv4 default gateway | ||
+ | |||
=== local_dnsip === | === local_dnsip === | ||
+ | |||
DNS server primary | DNS server primary | ||
+ | |||
=== local dnsip2 === | === local dnsip2 === | ||
+ | |||
DNS server secondary | DNS server secondary | ||
+ | |||
=== do_autostart === | === do_autostart === | ||
+ | |||
Control automatic stream start after bootup | Control automatic stream start after bootup | ||
- | Possible values: 1 = do autostart 0 = do not autostart | + | |
+ | Possible values: 1 = do autostart 0 = do not autostart | ||
=== enc_adv_setting === | === enc_adv_setting === | ||
+ | |||
Control appearance of advanced settings on WebUI | Control appearance of advanced settings on WebUI | ||
- | Possible values: off, on | + | |
+ | Possible values: off, on | ||
==== SetDisplay ==== | ==== SetDisplay ==== | ||
+ | |||
Controls composite output (passthru video from camera) | Controls composite output (passthru video from camera) | ||
+ | |||
=== disp_std === | === disp_std === | ||
+ | |||
Set display standard for composite output | Set display standard for composite output | ||
+ | |||
Possible values; auto, ntsc, pal | Possible values; auto, ntsc, pal | ||
Line 1055: | Line 1096: | ||
- | In the case of text overlay this would be the source text for png overlay this is the path to the png on the encoder. Images must be uploaded to board to be used. | + | In the case of text overlay this would be the source text for png overlay this is the path to the png on the encoder. Images must be uploaded to board to be used. |
Line 1106: | Line 1147: | ||
- | <font 12.8px/Arial, sans-serif;;#000000;;inherit font-family: Arial, sans-serif; font-weight: bold; font-size: 12.8px;>var</font> | + | <font 12.8px/Arial, sans-serif;;#000000;;inherit font-family: Arial, sans-serif; font-weight: bold; font-size: 12.8px;>var</font> |
- | Variable to modify dynamically. Possible values: vratediv, vrate, gop, analog_gain, telop_text, pip_enable, pip_location, startmulticast, stopmulticast | + | Variable to modify dynamically. Possible values: vratediv, vrate, gop, analog_gain, telop_text, pip_enable, pip_location, startmulticast, stopmulticast |
Line 1161: | Line 1202: | ||
Enable/Disable remote access to terminal server. | Enable/Disable remote access to terminal server. | ||
+ | |||
==== SetZFinderEnable ==== | ==== SetZFinderEnable ==== | ||
Line 1169: | Line 1211: | ||
Enable/Disable zfinder support. | Enable/Disable zfinder support. | ||
- | |||
===== Encoder Actions (POST) ===== | ===== Encoder Actions (POST) ===== | ||
+ | |||
==== SetEncoder ==== | ==== SetEncoder ==== | ||
Line 1178: | Line 1220: | ||
Write encoder settings to active preset. See Python example code for Seting Configuration below | Write encoder settings to active preset. See Python example code for Seting Configuration below | ||
+ | |||
==== EncoderStatus ==== | ==== EncoderStatus ==== | ||
Line 1185: | Line 1228: | ||
- | To read the result, you need to POST the "stats" control as shown\\ | + | To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. |
- | in the Python example code below. | + | |
Line 1195: | Line 1237: | ||
- | To read the result, you need to POST the "stats" control as shown\\ | + | To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. |
- | in the Python example code below. | + | |
Line 1205: | Line 1246: | ||
- | To read the result, you need to POST the “stats” control as shown\\ | + | To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. |
- | in the Python example code below. | + | |
Line 1215: | Line 1255: | ||
- | To read the result, you need to POST the “stats” control as shown\\ | + | To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. |
- | in the Python example code below. | + | |
Line 1248: | Line 1287: | ||
requests.post(server_url, data=new_cfg) | requests.post(server_url, data=new_cfg) | ||
</code> | </code> | ||
+ | |||
+ | |||
===== Reading Statistics ===== | ===== Reading Statistics ===== | ||