User Tools

Site Tools


http_api |

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
http_api [2020/10/30 18:49]
rachel [Decode Command]
http_api [2020/10/30 18:55]
rachel
Line 1: Line 1:
 ====== HTTP API for Z3CAM / HE2K-DCK / HE4K-DCK / FV2K-DCK / FV4K-DCK/ FSDI-DCK / DME-10 / HE1080-RPS / ZCube / ZCube-SDI ====== ====== HTTP API for Z3CAM / HE2K-DCK / HE4K-DCK / FV2K-DCK / FV4K-DCK/ FSDI-DCK / DME-10 / HE1080-RPS / ZCube / ZCube-SDI ======
- 
  
 For HE4K-01 / HE4K-R4 / MVE-150 / MVE-100R / SME-01 / DME-02/​03/​04 use [[:​http_api_lua|Z3-TI-http_api]] For HE4K-01 / HE4K-R4 / MVE-150 / MVE-100R / SME-01 / DME-02/​03/​04 use [[:​http_api_lua|Z3-TI-http_api]]
  
 ===== Configuration API Syntax ===== ===== Configuration API Syntax =====
- 
  
 ==== Reading Configuration ==== ==== Reading Configuration ====
Line 54: Line 52:
  
 ---- ----
- 
  
 ===== Decode Command ===== ===== Decode Command =====
  
 decode instance=%d url=%s codec=%s viewport=%s decode instance=%d url=%s codec=%s viewport=%s
- 
  
 ==== max_latency_ms ==== ==== max_latency_ms ====
Line 78: Line 74:
  
 Possible values: h264, h265 Possible values: h264, h265
- 
  
 ==== viewport ==== ==== viewport ====
Line 85: Line 80:
  
 Possible values: <font 16px/​inherit;;​inherit;;​inherit>​=</​font>​original,​ fit, keep_aspect,​ scale\\ Possible values: <font 16px/​inherit;;​inherit;;​inherit>​=</​font>​original,​ fit, keep_aspect,​ scale\\
-\\ 
- 
- 
 ====== ZIXI URL Parameters ====== ====== ZIXI URL Parameters ======
  
 The URL may have parameters passed in as: The URL may have parameters passed in as:
  
-base_url?​param1=val1&​param2=val2+base_url?​param1=val1¶m2=val2
  
 ==== fec ==== ==== fec ====
Line 156: Line 148:
 Possible values: <​password>​ Possible values: <​password>​
  
-==== feccol ​====+===== Display Command =====
  
-Description:​ Column count for ProMPEG.+==== display port ====
  
-Possible valuesinteger greater than 1+Description:
  
-==== feconoff ====+Possible values: display1, display2, ultrahd, hd
  
-Description:​ Enable ProMPEG if supported.+==== format ====
  
-Possible valueson, off+Description:
  
-==== fecrow ====+Possible values: format_name
  
-DescriptionRow count for ProMPEG.+Supported names:
  
-Possible values: integer greater than 1+<font 10px/​inherit;;​inherit;;​inherit>​2160p60</​font>​
  
-==== filesize ====+<font 10px/​inherit;;​inherit;;​inherit>​2160p5994</​font>​
  
-Description:​ Size of TSFILE or AUX file recording, in bytes.+<font 10px/​inherit;;​inherit;;​inherit>​2160p50</​font>​
  
-A "​K"​ suffix indicates kilobytes (thousands of bytes/second).+<font 10px/inherit;;​inherit;;​inherit>​2160p30</​font>​
  
-A "​M"​ suffix indicates megabytes (millions of bytes/second).+<font 10px/inherit;;​inherit;;​inherit>​2160p2997</​font>​
  
-==== fprefix ====+<font 10px/​inherit;;​inherit;;​inherit>​2160p25</​font>​
  
-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.+<font 10px/​inherit;;​inherit;;​inherit>​1080p60</​font>​
  
-==== storage ====+<font 10px/​inherit;;​inherit;;​inherit>​1080p5994</​font>​
  
-Absolute path to mounted media device (e.g. /media/sda1/)+<font 10px/inherit;;​inherit;;​inherit>​1080p50<​/font>
  
-==== telopcharsize ====+<font 10px/​inherit;;​inherit;;​inherit>​720p60</​font>​
  
-OSD overlay text character size in pixels+<font 10px/​inherit;;​inherit;;​inherit>​720p5994</​font>​
  
-Possible values: 16, 32, or 64+<font 10px/​inherit;;​inherit;;​inherit>​720p50</​font>​
  
-==== telopenable ====+<font 10px/​inherit;;​inherit;;​inherit>​480p60</​font>​
  
-Enable or disable telop (i.e. OSD overlay of text).+<font 10px/​inherit;;​inherit;;​inherit>​576p50</​font>​
  
-Possible values: on, off+<font 10px/​inherit;;​inherit;;​inherit>​2560x1600_60</​font>​
  
-==== teloplocation ====+<font 10px/​inherit;;​inherit;;​inherit>​2560x1440_30</​font>​
  
-Where to overlay text in the encoded video+<font 10px/​inherit;;​inherit;;​inherit>​1920x1200_60</​font>​
  
-Possible values: top_left top_right top_center bottom_left bottom_right bottom_center+<font 10px/​inherit;;​inherit;;​inherit>​auto</​font>​
  
-==== teloptext ====+<font 10px/​inherit;;​inherit;;​inherit>​auto_pal</​font>​
  
-Text string for OSD overlay+<font 10px/​inherit;;​inherit;;​inherit>​auto_ntsc_bcast</​font>​
  
-==== vgopsize ​====+==== layout ​====
  
-Description: ​Distance between I frames (key frames) in GOP sequence+Description:​
  
-Possible values: ​1 through 240 +Possible values: ​1x12x2
- +
-==== vbitrate ==== +
- +
-Description:​ Video bitrate in bits per second. +
- +
-Possible values: A "​K"​ suffix indicates kilobits (thousands of bits/​second). +
- +
-A "​M"​ suffix indicates megabits (millions of bits/​second). +
- +
-Note: In UDP transport stream casethe tsrate should be set +
- +
-higher than the vbitrate, with at least 15% margin. +
- +
-==== vdelay ==== +
- +
-Description:​ Video maximum burst size in milliseconds. +
- +
-Possible values: 100 to 2000 +
- +
-==== vdest ==== +
- +
-Description:​ Destination URL address for encoded bitstream. May be interpreted differently depending on "​vprotocol"​ setting. +
- +
-For UDP and RTP transports:​ +
- +
-client_ip:​client_port +
- +
-For RTMP transport:​ +
- +
-<​code>​ +
- ​server_ip[:​server_port]/​application/​streamname +
- +
-</​code>​ +
- +
-==== vframeratediv ==== +
- +
-Description:​ Divide video input frame rate by this number to get encode frame rate.\\ +
-The encoder will discard (frameratediv-1) out of (frameratediv) frames.\\ +
-\\ +
-Possible values: 1, 2, 3, 4, 5, 6 +
- +
-==== vgdr ==== +
- +
-Description:​ Enable or disable Gradual Data Refresh. Reduces I-frame size (reduces latency). At lower bitrates, a horizontal rolling artifact may be visible. +
- +
-Possible values: on, off +
- +
-==== vcodec ==== +
- +
-Description:​ Specifiec which codec to encode with. +
- +
-Possible values: h265, h264, mjpeg +
- +
-==== vprofile ==== +
- +
-Description:​ H.264 profile (see [[https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles|https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles]]​ for full description) +
- +
-Possible values: baseline, main, high +
- +
-==== vprotocol ==== +
- +
-Description:​ Protocol used to transport the encoded bitstream. +
- +
-Possible values: rtp, rtmp, udp, asi, tsfile, mts, tsrtp +
- +
-==== vquality ==== +
- +
-Description:​ Set balance between low latency, and higher quality bitrate compliance. +
- +
-Possible values: lowlat, balanced, high +
- +
-==== vratectrl ==== +
- +
-Description:​ Rate control mode for encoder. +
- +
-Possible values: cbr, vbr +
- +
-vbr mode may be burstier than cbr. +
- +
-==== vres ==== +
- +
-Description:​ Video resolution +
- +
-Possible values: follow_input preserve video source resolution, no resize +
-<​code>​ +
- +
-               ​WxH ​          ​resize to width W and height H +
- +
-</​code>​ +
- +
-==== vsource ==== +
- +
-Description:​ Video input from which encoder will source its video +
- +
-<font 12.8000001907349px/​arial;;#​000000;;#​ffffff>​Possible values: Board-dependent</​font>​ +
- +
-==== pipenable ==== +
- +
-Description:​ Enable PIP of channel 2 on channel 1 encode. Only available on FV4K/​FV2K/​FSDI +
- +
-Possible values: on, off +
- +
-==== piplocaton ==== +
- +
-Description:​ Sets the location of the PIP on channel one. Only available on FV4K/​FV2K/​FSDI +
- +
-Possible values: top_left, top_right, bottom_left,​ bottom_right +
- +
-==== vinterlacemode ==== +
- +
-Description:​ Sets the interlaced mode for the video input +
- +
-Possible values: combined, separated (H265 only) +
- +
-==== vmulticastdest ==== +
- +
-Description:​ video multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions +
- +
-Possible values: valid multicast addresses +
- +
-==== amulticastdest ==== +
- +
-Description:​ audio multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions +
- +
-Possible values: valid multicast addresses +
- +
-==== rtsp_auth_enable ==== +
- +
-Description:​ enables/​disables rtsp authorization for stream +
- +
-Possible values: on, off +
- +
-==== rtsp_auth_username ==== +
- +
-Description:​ username for rtsp authorization +
- +
-Possible values: alpha numeric string +
- +
-==== rtsp_auth_password ==== +
- +
-Description:​ password for rtsp authorization +
- +
-Possible values: * +
- +
-===== Transport Stream Parameters ===== +
- +
-The following parameters only apply to transport stream encoding (transport is set to udp, asi, tsfile, mts, or tsrtp). +
- +
-==== vpid ==== +
- +
-Description:​ Video PID for transport stream. +
- +
-Possible values: 32 to 8191 – must not conflict with other PID assignments +
- +
-==== apid ==== +
- +
-Description:​ Audio PID for transport stream. +
- +
-Possible values: 32 to 8191 – must not conflict with other PID assignments +
- +
-==== pcrpid ==== +
- +
-Description:​ PCR PID for transport stream. +
- +
-Possible values: 32 to 8191 – must not conflict with other PID assignments +
- +
-==== pmtpid ==== +
- +
-Description:​ PMT PID for transport stream. +
- +
-Possible values: 16 to 31 – must not conflict with other PID assignments +
- +
-==== tsrate ==== +
- +
-Description:​ Transport stream total transport rate in bits per second. +
- +
-Possible values: The '​K'​ suffix indicates kilobits (thousands of bits/​second). The '​M'​ suffix indicates megabits (millions of bits/​second). +
- +
-Note: In UDP transport stream case, the tsrate should be set higher than the vbitrate, with at least 15% margin. +
- +
-==== tslowlat ==== +
- +
-Description:​ Low latency transport stream mode (VBR). +
- +
-Possible values: off, on +
- +
-==== auxonoff ==== +
- +
-Describe: Enable AUXillary file recording in UDP mode – allows simultaneous UDP streaming and TS file recording on the same channel. Only valid if transport is UDP and tslowlat is off +
- +
-The path to storage is set by the "​storage"​ parameter. +
- +
-The filename is set by the "​fprefix"​ parameter. The default value is "​MOV1_%F_%T"​. The "​%F"​ specifier inserts a date stamp, and the "​%T"​ specifier inserts a time stamp. +
- +
-The recording file size is set by the "​filesize"​ parameter. When the file reaches this size, a new file will be created. +
- +
-==== klvbrate ==== +
- +
-Description:​ Bitrate to allocate in transport stream for KLV data. +
- +
-==== klvenable ==== +
- +
-Description:​ Enable KLV capture from SDI, if supported. +
- +
-Possible values: off, on +
- +
-==== klvpid ==== +
- +
-Description:​ PID for KLV data in transport stream +
- +
-==== klvsrc ==== +
- +
-Description:​ Source device for KLV metadata +
- +
-==== pcrinterval ==== +
- +
-Description:​ Interval between PCR packets in milliseconds. +
- +
-Possible values: 30 - 100+
  
 ===== Global Configuration ===== ===== Global Configuration =====
Line 911: Line 684:
  
 ​Encoder channel to apply dynamic command to. ​Encoder channel to apply dynamic command to.
- 
-<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 
- 
-=== val === 
  
 Value to set dynamic variable to. Value to set dynamic variable to.
Line 1045: Line 812:
  
 </​code>​ </​code>​
- 
  
 ==== asamplerate ==== ==== asamplerate ====
- 
  
 Description:​ Audio sample rate Description:​ Audio sample rate
- 
  
 Possible values: 48000, 44100 Possible values: 48000, 44100
- 
  
 ==== asource ==== ==== asource ====
- 
  
 Description:​ Select audio input Description:​ Select audio input
- 
  
 Possible values: MICL (microphone,​ line input levels) Possible values: MICL (microphone,​ line input levels)
 +<​code>​
  
- 
-<​code>​ 
                ​MIC ​   (unpowered microphone levels)                ​MIC ​   (unpowered microphone levels)
                ​HDMI ​  ​(microHDMI input, for HE4K-DCK only)                ​HDMI ​  ​(microHDMI input, for HE4K-DCK only)
                ​HD-SDI (SDI input, for DME-10/​FSDI-DCK only)                ​HD-SDI (SDI input, for DME-10/​FSDI-DCK only)
 +
 </​code>​ </​code>​
- 
  
 ==== apid ==== ==== apid ====
- 
  
 Description:​ Audio PID for transport stream. Description:​ Audio PID for transport stream.
- 
  
 Possible values: 32 to 8191 - must not conflict with other PID assignments. Possible values: 32 to 8191 - must not conflict with other PID assignments.
- 
  
 ==== aport ==== ==== aport ====
- 
  
 Description:​ Destination UDP port for RTP audio Description:​ Destination UDP port for RTP audio
- 
  
 ==== aptspcr ==== ==== aptspcr ====
- 
  
 Description:​ For transport stream modes only – intial PTS to PCR offset for audio, in milliseconds Description:​ For transport stream modes only – intial PTS to PCR offset for audio, in milliseconds
- 
  
 Possible values: 100 to 2000 Possible values: 100 to 2000
- 
  
 ==== auth_passwd ==== ==== auth_passwd ====
- 
  
 Description:​ Password for RTMP authentication. Description:​ Password for RTMP authentication.
- 
  
 ==== auth_user ==== ==== auth_user ====
- 
  
 Description:​ Username for RTMP authentication. Description:​ Username for RTMP authentication.
- 
  
 ==== authonoff ==== ==== authonoff ====
- 
  
 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 ====
- 
  
 Description:​ Encoder channel number Description:​ Encoder channel number
- 
  
 Possible values: 1, 2, 3 Possible values: 1, 2, 3
- 
  
 ==== feccol ==== ==== feccol ====
- 
  
 Description:​ Column count for ProMPEG. Description:​ Column count for ProMPEG.
- 
  
 Possible values: integer greater than 1 Possible values: integer greater than 1
- 
  
 ==== feconoff ==== ==== feconoff ====
- 
  
 Description:​ Enable ProMPEG if supported. Description:​ Enable ProMPEG if supported.
- 
  
 Possible values: on, off Possible values: on, off
- 
  
 ==== fecrow ==== ==== fecrow ====
- 
  
 Description:​ Row count for ProMPEG. Description:​ Row count for ProMPEG.
- 
  
 Possible values: integer greater than 1 Possible values: integer greater than 1
- 
  
 ==== filesize ==== ==== filesize ====
- 
  
 Description:​ Size of TSFILE or AUX file recording, in bytes. Description:​ Size of TSFILE or AUX file recording, in bytes.
- 
  
 A "​K"​ suffix indicates kilobytes (thousands of bytes/​second). A "​K"​ suffix indicates kilobytes (thousands of bytes/​second).
- 
  
 A "​M"​ suffix indicates megabytes (millions of bytes/​second). A "​M"​ suffix indicates megabytes (millions of bytes/​second).
- 
  
 ==== 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.
- 
  
 ==== storage ==== ==== storage ====
- 
  
 Absolute path to mounted media device (e.g. /​media/​sda1/​) Absolute path to mounted media device (e.g. /​media/​sda1/​)
- 
  
 ==== 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
- 
  
 ==== telopenable ==== ==== telopenable ====
- 
  
 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
- 
  
 ==== teloplocation ==== ==== teloplocation ====
- 
  
 Where to overlay text in the encoded video Where to overlay text in the encoded video
- 
  
 Possible values: top_left top_right top_center bottom_left bottom_right bottom_center Possible values: top_left top_right top_center bottom_left bottom_right bottom_center
- 
  
 ==== teloptext ==== ==== teloptext ====
- 
  
 Text string for OSD overlay Text string for OSD overlay
- 
  
 ==== vgopsize ==== ==== vgopsize ====
- 
  
 Description:​ Distance between I frames (key frames) in GOP sequence Description:​ Distance between I frames (key frames) in GOP sequence
- 
  
 Possible values: 1 through 240 Possible values: 1 through 240
- 
  
 ==== vbitrate ==== ==== vbitrate ====
- 
  
 Description:​ Video bitrate in bits per second. Description:​ Video bitrate in bits per second.
- 
  
 Possible values: A "​K"​ suffix indicates kilobits (thousands of bits/​second). Possible values: A "​K"​ suffix indicates kilobits (thousands of bits/​second).
- 
  
 A "​M"​ suffix indicates megabits (millions of bits/​second). A "​M"​ suffix indicates megabits (millions of bits/​second).
- 
  
 Note: In UDP transport stream case, the tsrate should be set Note: In UDP transport stream case, the tsrate should be set
- 
  
 higher than the vbitrate, with at least 15% margin. higher than the vbitrate, with at least 15% margin.
- 
  
 ==== vdelay ==== ==== vdelay ====
- 
  
 Description:​ Video maximum burst size in milliseconds. Description:​ Video maximum burst size in milliseconds.
- 
  
 Possible values: 100 to 2000 Possible values: 100 to 2000
- 
  
 ==== vdest ==== ==== vdest ====
- 
  
 Description:​ Destination URL address for encoded bitstream. May be interpreted differently depending on "​vprotocol"​ setting. Description:​ Destination URL address for encoded bitstream. May be interpreted differently depending on "​vprotocol"​ setting.
- 
  
 For UDP and RTP transports: For UDP and RTP transports:
- 
  
 client_ip:​client_port client_ip:​client_port
- 
  
 For RTMP transport: For RTMP transport:
- 
  
 <​code>​ <​code>​
  ​server_ip[:​server_port]/​application/​streamname  ​server_ip[:​server_port]/​application/​streamname
 +
 </​code>​ </​code>​
- 
  
 ==== vframeratediv ==== ==== vframeratediv ====
  
- +Description:​ Divide video input frame rate by this number to get encode frame rate.\\ 
-Description:​ Divide video input frame rate by this number to get encode frame rate.\\  +The encoder will discard (frameratediv-1) out of (frameratediv) frames.\\ 
-The encoder will discard (frameratediv-1) out of (frameratediv) frames.\\  +\\
-\\ +
 Possible values: 1, 2, 3, 4, 5, 6 Possible values: 1, 2, 3, 4, 5, 6
- 
  
 ==== vgdr ==== ==== vgdr ====
- 
  
 Description:​ Enable or disable Gradual Data Refresh. Reduces I-frame size (reduces latency). At lower bitrates, a horizontal rolling artifact may be visible. Description:​ Enable or disable Gradual Data Refresh. Reduces I-frame size (reduces latency). At lower bitrates, a horizontal rolling artifact may be visible.
- 
  
 Possible values: on, off Possible values: on, off
- 
  
 ==== vcodec ==== ==== vcodec ====
- 
  
 Description:​ Specifiec which codec to encode with. Description:​ Specifiec which codec to encode with.
- 
  
 Possible values: h265, h264, mjpeg Possible values: h265, h264, mjpeg
- 
  
 ==== vprofile ==== ==== vprofile ====
- 
  
 Description:​ H.264 profile (see [[https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles|https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles]]​ for full description) Description:​ H.264 profile (see [[https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles|https://​en.wikipedia.org/​wiki/​H.264/​MPEG-4_AVC#​Profiles]]​ for full description)
- 
  
 Possible values: baseline, main, high Possible values: baseline, main, high
- 
  
 ==== vprotocol ==== ==== vprotocol ====
- 
  
 Description:​ Protocol used to transport the encoded bitstream. Description:​ Protocol used to transport the encoded bitstream.
- 
  
 Possible values: rtp, rtmp, udp, asi, tsfile, mts, tsrtp Possible values: rtp, rtmp, udp, asi, tsfile, mts, tsrtp
- 
  
 ==== vquality ==== ==== vquality ====
- 
  
 Description:​ Set balance between low latency, and higher quality+bitrate compliance. Description:​ Set balance between low latency, and higher quality+bitrate compliance.
- 
  
 Possible values: lowlat, balanced, high Possible values: lowlat, balanced, high
- 
  
 ==== vratectrl ==== ==== vratectrl ====
- 
  
 Description:​ Rate control mode for encoder. Description:​ Rate control mode for encoder.
- 
  
 Possible values: cbr, vbr Possible values: cbr, vbr
- 
  
 vbr mode may be burstier than cbr. vbr mode may be burstier than cbr.
- 
  
 ==== vres ==== ==== vres ====
- 
  
 Description:​ Video resolution Description:​ Video resolution
- 
  
 Possible values: follow_input preserve video source resolution, no resize Possible values: follow_input preserve video source resolution, no resize
 +<​code>​
  
 +               ​WxH ​          ​resize to width W and height H
  
-<​code>​ 
-               ​WxH ​          ​resize to width W and height H 
 </​code>​ </​code>​
- 
  
 ==== vsource ==== ==== vsource ====
- 
  
 Description:​ Video input from which encoder will source its video Description:​ Video input from which encoder will source its video
  
- +<font 12.8000001907349px"><​font inherit/arial;;inherit;;#​ffffff>​Possible values: Board-dependent</​font>​
-<font 12.8000001907349px/​arial;;​#000000;;#​ffffff>​Possible values: Board-dependent</​font>​ +
  
 ==== pipenable ==== ==== pipenable ====
- 
  
 Description:​ Enable PIP of channel 2 on channel 1 encode. Only available on FV4K/​FV2K/​FSDI Description:​ Enable PIP of channel 2 on channel 1 encode. Only available on FV4K/​FV2K/​FSDI
- 
  
 Possible values: on, off Possible values: on, off
- 
  
 ==== piplocaton ==== ==== piplocaton ====
- 
  
 Description:​ Sets the location of the PIP on channel one. Only available on FV4K/​FV2K/​FSDI Description:​ Sets the location of the PIP on channel one. Only available on FV4K/​FV2K/​FSDI
- 
  
 Possible values: top_left, top_right, bottom_left,​ bottom_right Possible values: top_left, top_right, bottom_left,​ bottom_right
- 
  
 ==== vinterlacemode ==== ==== vinterlacemode ====
- 
  
 Description:​ Sets the interlaced mode for the video input Description:​ Sets the interlaced mode for the video input
- 
  
 Possible values: combined, separated (H265 only) Possible values: combined, separated (H265 only)
- 
  
 ==== vmulticastdest ==== ==== vmulticastdest ====
- 
  
 Description:​ video multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions Description:​ video multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions
- 
  
 Possible values: valid multicast addresses Possible values: valid multicast addresses
- 
  
 ==== amulticastdest ==== ==== amulticastdest ====
- 
  
 Description:​ audio multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions Description:​ audio multicast destination for RTSP. Used by ONVIF StartMulticast/​StopMulticast functions
- 
  
 Possible values: valid multicast addresses Possible values: valid multicast addresses
- 
  
 ==== rtsp_auth_enable ==== ==== rtsp_auth_enable ====
- 
  
 Description:​ enables/​disables rtsp authorization for stream Description:​ enables/​disables rtsp authorization for stream
- 
  
 Possible values: on, off Possible values: on, off
- 
  
 ==== rtsp_auth_username ==== ==== rtsp_auth_username ====
- 
  
 Description:​ username for rtsp authorization Description:​ username for rtsp authorization
- 
  
 Possible values: alpha numeric string Possible values: alpha numeric string
- 
  
 ==== rtsp_auth_password ==== ==== rtsp_auth_password ====
- 
  
 Description:​ password for rtsp authorization Description:​ password for rtsp authorization
- 
  
 Possible values: * Possible values: *
- 
  
 ===== Transport Stream Parameters ===== ===== Transport Stream Parameters =====
- 
  
 The following parameters only apply to transport stream encoding (transport is set to udp, asi, tsfile, mts, or tsrtp). The following parameters only apply to transport stream encoding (transport is set to udp, asi, tsfile, mts, or tsrtp).
- 
  
 ==== vpid ==== ==== vpid ====
- 
  
 Description:​ Video PID for transport stream. Description:​ Video PID for transport stream.
- 
  
 Possible values: 32 to 8191 – must not conflict with other PID assignments Possible values: 32 to 8191 – must not conflict with other PID assignments
- 
  
 ==== apid ==== ==== apid ====
- 
  
 Description:​ Audio PID for transport stream. Description:​ Audio PID for transport stream.
- 
  
 Possible values: 32 to 8191 – must not conflict with other PID assignments Possible values: 32 to 8191 – must not conflict with other PID assignments
- 
  
 ==== pcrpid ==== ==== pcrpid ====
- 
  
 Description:​ PCR PID for transport stream. Description:​ PCR PID for transport stream.
- 
  
 Possible values: 32 to 8191 – must not conflict with other PID assignments Possible values: 32 to 8191 – must not conflict with other PID assignments
- 
  
 ==== pmtpid ==== ==== pmtpid ====
- 
  
 Description:​ PMT PID for transport stream. Description:​ PMT PID for transport stream.
- 
  
 Possible values: 16 to 31 – must not conflict with other PID assignments Possible values: 16 to 31 – must not conflict with other PID assignments
- 
  
 ==== tsrate ==== ==== tsrate ====
- 
  
 Description:​ Transport stream total transport rate in bits per second. Description:​ Transport stream total transport rate in bits per second.
- 
  
 Possible values: The '​K'​ suffix indicates kilobits (thousands of bits/​second). The '​M'​ suffix indicates megabits (millions of bits/​second). Possible values: The '​K'​ suffix indicates kilobits (thousands of bits/​second). The '​M'​ suffix indicates megabits (millions of bits/​second).
- 
  
 Note: In UDP transport stream case, the tsrate should be set higher than the vbitrate, with at least 15% margin. Note: In UDP transport stream case, the tsrate should be set higher than the vbitrate, with at least 15% margin.
- 
  
 ==== tslowlat ==== ==== tslowlat ====
- 
  
 Description:​ Low latency transport stream mode (VBR). Description:​ Low latency transport stream mode (VBR).
- 
  
 Possible values: off, on Possible values: off, on
- 
  
 ==== auxonoff ==== ==== auxonoff ====
- 
  
 Describe: Enable AUXillary file recording in UDP mode – allows simultaneous UDP streaming and TS file recording on the same channel. Only valid if transport is UDP and tslowlat is off Describe: Enable AUXillary file recording in UDP mode – allows simultaneous UDP streaming and TS file recording on the same channel. Only valid if transport is UDP and tslowlat is off
- 
  
 The path to storage is set by the "​storage"​ parameter. The path to storage is set by the "​storage"​ parameter.
- 
  
 The filename is set by the "​fprefix"​ parameter. The default value is "​MOV1_%F_%T"​. The "​%F"​ specifier inserts a date stamp, and the "​%T"​ specifier inserts a time stamp. The filename is set by the "​fprefix"​ parameter. The default value is "​MOV1_%F_%T"​. The "​%F"​ specifier inserts a date stamp, and the "​%T"​ specifier inserts a time stamp.
- 
  
 The recording file size is set by the "​filesize"​ parameter. When the file reaches this size, a new file will be created. The recording file size is set by the "​filesize"​ parameter. When the file reaches this size, a new file will be created.
- 
  
 ==== klvbrate ==== ==== klvbrate ====
- 
  
 Description:​ Bitrate to allocate in transport stream for KLV data. Description:​ Bitrate to allocate in transport stream for KLV data.
- 
  
 ==== klvenable ==== ==== klvenable ====
- 
  
 Description:​ Enable KLV capture from SDI, if supported. Description:​ Enable KLV capture from SDI, if supported.
- 
  
 Possible values: off, on Possible values: off, on
- 
  
 ==== klvpid ==== ==== klvpid ====
- 
  
 Description:​ PID for KLV data in transport stream Description:​ PID for KLV data in transport stream
- 
  
 ==== klvsrc ==== ==== klvsrc ====
- 
  
 Description:​ Source device for KLV metadata Description:​ Source device for KLV metadata
- 
  
 ==== pcrinterval ==== ==== pcrinterval ====
- 
  
 Description:​ Interval between PCR packets in milliseconds. Description:​ Interval between PCR packets in milliseconds.
- 
  
 Possible values: 30 - 100 Possible values: 30 - 100
- 
  
 ===== Global Configuration ===== ===== Global Configuration =====
- 
  
 ---- ----
- 
  
 ===== Action Syntax ===== ===== Action Syntax =====
- 
  
 ===== Generic Actions (POST) ===== ===== Generic Actions (POST) =====
- 
  
 Python example code for starting/​stopping all channels: Python example code for starting/​stopping all channels:
- 
  
 <​code>​ <​code>​
Line 1586: Line 1190:
     headers={'​Content-Type':'​application/​x-www-form-urlencoded;​ charset=UTF-8'​}     headers={'​Content-Type':'​application/​x-www-form-urlencoded;​ charset=UTF-8'​}
     r = requests.post(control_cgi_url,​ data=payload,​ headers=headers)     r = requests.post(control_cgi_url,​ data=payload,​ headers=headers)
-    ​+
     print r.text     print r.text
 +
 </​code>​ </​code>​
- 
  
 The "​loadfromdb=true"​ parameter will load the current settings from the database. The "​loadfromdb=true"​ parameter will load the current settings from the database.
- 
  
 If you omit the loadfromdb parameter, *none* of the database settings will be used – any parameters you do not supply, will be set to default values. If you omit the loadfromdb parameter, *none* of the database settings will be used – any parameters you do not supply, will be set to default values.
- 
  
 For example, this is what a StartChannel request from the web server looks like: For example, this is what a StartChannel request from the web server looks like:
- 
  
 <​code>​ <​code>​
 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 ====
  
- +\\
-\\ +
 Transition the encoder channel into the running state. Transition the encoder channel into the running state.
  
- +Once you start the channel, it will not transmit data until the\\
-Once you start the channel, it will not transmit data until the\\ +
 video input is detected. video input is detected.
- 
  
 ==== StopChannel ==== ==== StopChannel ====
- 
  
 Transition the encoder channel into the stopped state. Transition the encoder channel into the stopped state.
- 
  
 ==== SaveUser ==== ==== SaveUser ====
- 
  
 Save current settings to non-volatile memory, so they will be used on the next startup. Save current settings to non-volatile memory, so they will be used on the next startup.
- 
  
 ==== RestartBoard ==== ==== RestartBoard ====
- 
  
 Reboot the board Reboot the board
- 
  
 ==== PtzContinuousMove ==== ==== PtzContinuousMove ====
  
 Pan to the left at half speed Pan to the left at half speed
-    ​action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​-0.5,"​y":​0},"​idx":​0}+ 
 +<​code>​ 
 +  ​action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​-0.5,"​y":​0},"​idx":​0} 
 + 
 +</​code>​
  
 Pan to the right at half speed Pan to the right at half speed
-    ​action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​0.5,"​y":​0},"​idx":​0}+ 
 +<​code>​ 
 +  ​action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​0.5,"​y":​0},"​idx":​0} 
 + 
 +</​code>​
  
 Tilt down at max speed Tilt down at max speed
-    action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​0,"​y":​1},"​idx":​0} 
  
 +<​code>​
 +  action=PtzContinuousMove&​data={"​PanTilt":​{"​x":​0,"​y":​1},"​idx":​0}
 +
 +</​code>​
  
 ==== PtzStop ==== ==== PtzStop ====
Line 1650: Line 1253:
 Stop pan and tilt Stop pan and tilt
  
-    ​action=PtzStop&​data={"​mode":​1,"​idx":​0}+<​code>​ 
 +  ​action=PtzStop&​data={"​mode":​1,"​idx":​0}
  
 +</​code>​
  
 ==== CameraControl ==== ==== CameraControl ====
Line 1837: Line 1442:
  
 The values accepted are either 1 or 2 The values accepted are either 1 or 2
- 
  
 ==== SaveCamera ==== ==== SaveCamera ====
- 
  
 Save camera-related settings below. Save camera-related settings below.
- 
  
 === zoom_direct_value === === zoom_direct_value ===
- 
  
 Description:​ Set camera zoom Description:​ Set camera zoom
- 
  
 Possible values: 0 (wide) to 0x7ac0 (full zoom) Possible values: 0 (wide) to 0x7ac0 (full zoom)
- 
  
 === white_balance_mode === === white_balance_mode ===
- 
  
 Possible values: auto. indoor, outdoor, onepush, autotrace, manual, outdoor_auto,​ Possible values: auto. indoor, outdoor, onepush, autotrace, manual, outdoor_auto,​
- 
  
 <​code>​ <​code>​
                ​sodium_lamp_auto,​ sodium_lamp_fixed,​ sodium_lamp_outdoor                ​sodium_lamp_auto,​ sodium_lamp_fixed,​ sodium_lamp_outdoor
 +
 </​code>​ </​code>​
- 
  
 === color_gain === === color_gain ===
- 
  
 Possible values: Range from 0 (60%) to 14 (200%) Possible values: Range from 0 (60%) to 14 (200%)
- 
  
 === color_hue === === color_hue ===
- 
  
 Possible values: Range from 0 (60%) to 14 (200%) Possible values: Range from 0 (60%) to 14 (200%)
- 
  
 === chroma_suppress === === chroma_suppress ===
- 
  
 Possible values: 0=none, 1, 2, 3 Possible values: 0=none, 1, 2, 3
- 
  
 === wb_manual_rgain_direct === === wb_manual_rgain_direct ===
- 
  
 Possible values: 0 to 255 Possible values: 0 to 255
- 
  
 === wb_manual_bgain_direct === === wb_manual_bgain_direct ===
- 
  
 Possible values: 0 to 255 Possible values: 0 to 255
- 
  
 === optical_zoom_only === === optical_zoom_only ===
- 
  
 Possible values: 0, 1 Possible values: 0, 1
- 
  
 === focus_direct_value === === focus_direct_value ===
- 
  
 Description:​ Set manual camera focus distance Possible values: 0x1000 to 0xf000 Description:​ Set manual camera focus distance Possible values: 0x1000 to 0xf000
- 
  
 === manual_focus === === manual_focus ===
- 
  
 Description:​ Set focus mode Description:​ Set focus mode
- 
  
 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
- 
  
 ==== UpdateTerm ==== ==== UpdateTerm ====
- 
  
 Control serial port terminal server for VISCA Control serial port terminal server for VISCA
- 
  
 === term_mode === === term_mode ===
- 
  
 Possible values: client, server Possible values: client, server
- 
  
 === term_protocol === === term_protocol ===
- 
  
 Possible values: clearchannel,​ telnet Possible values: clearchannel,​ telnet
- 
  
 === term_localport === === term_localport ===
- 
  
 Local TCP port (for server mode) Local TCP port (for server mode)
- 
  
 === term_servaddr === === term_servaddr ===
- 
  
 Remote IP address (for client mode only) Remote IP address (for client mode only)
- 
  
 === term_servport === === term_servport ===
- 
  
 Remote TCP port (for client mode only) Remote TCP port (for client mode only)
- 
  
 === term_baudrate === === term_baudrate ===
- 
  
 Possible values: 9600, 19200, 38400, 57600, 115200 Possible values: 9600, 19200, 38400, 57600, 115200
- 
  
 === term_devicefile === === term_devicefile ===
- 
  
 ==== Overlay ==== ==== Overlay ====
- 
  
 Add/Update overlay Add/Update overlay
- 
  
 === chn === === chn ===
- 
  
 ​Encoder channel to add overlay to. ​Encoder channel to add overlay to.
- 
  
 === rgn_idx === === rgn_idx ===
- 
  
 ​Index to map overlay to. ​Index to map overlay to.
- 
  
 === ​type === === ​type ===
- 
  
 Type of overlay to be used possible values: text or png. Type of overlay to be used possible values: text or png.
- 
  
 === source === === source ===
- 
  
 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.
- 
  
 === location === === location ===
- 
  
 This is the location of the overlay. Possible values: '​top_left',​ '​top_right',​ '​top_center',​ '​bottom_left',​ '​bottom_right',​ '​bottom_center',​ '​x,​y'​ (negative numbers not supported for x or y) This is the location of the overlay. Possible values: '​top_left',​ '​top_right',​ '​top_center',​ '​bottom_left',​ '​bottom_right',​ '​bottom_center',​ '​x,​y'​ (negative numbers not supported for x or y)
- 
  
 === char_size === === char_size ===
- 
  
 For text overlay this is the character size. Possible values: 16,32,64 For text overlay this is the character size. Possible values: 16,32,64
- 
  
 === layer === === layer ===
- 
  
 This will set the layer for the overly higher numbers will overlay over lower numbers if overlapping. This will set the layer for the overly higher numbers will overlay over lower numbers if overlapping.
- 
  
 === alpha === === alpha ===
- 
  
 Sets the transparency of the text. Possible values: 0-255 Sets the transparency of the text. Possible values: 0-255
- 
  
 ==== OverlayStop ==== ==== OverlayStop ====
- 
  
 === chn === === chn ===
- 
  
 ​Encoder channel to remove overlay from. ​Encoder channel to remove overlay from.
- 
  
 === rgn_idx === === rgn_idx ===
- 
  
 ​Index of overly for this channel. ​Index of overly for this channel.
- 
  
 ==== ​Dynamic ==== ==== ​Dynamic ====
- 
  
 === chn === === chn ===
- 
  
 ​Encoder channel to apply dynamic command to. ​Encoder channel to apply dynamic command to.
- 
  
 <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
- 
  
 === val === === val ===
- 
  
 Value to set dynamic variable to. Value to set dynamic variable to.
- 
  
 ==== ​SetSNTP ==== ==== ​SetSNTP ====
- 
  
 === enable === === enable ===
- 
  
 Enable/​Disable SNTP. Enable/​Disable SNTP.
- 
  
 === servers === === servers ===
- 
  
 NTP server or list of NTP servers. NTP server or list of NTP servers.
- 
  
 === timezone === === timezone ===
- 
  
 Linux TZ database value for Timezone. Linux TZ database value for Timezone.
- 
  
 ==== ​SetOnvif ==== ==== ​SetOnvif ====
- 
  
 === enable === === enable ===
- 
  
 Enable/​Disable ONVIF. Enable/​Disable ONVIF.
- 
  
 === fixed_profile_max === === fixed_profile_max ===
- 
  
 Maximum ONVIF profiles to allow (1 or 2). Maximum ONVIF profiles to allow (1 or 2).
- 
  
 ==== ​SetTermSrvEnable ==== ==== ​SetTermSrvEnable ====
- 
  
 === termserve_remote_enable === === termserve_remote_enable ===
- 
  
 Enable/​Disable remote access to terminal server. Enable/​Disable remote access to terminal server.
- 
  
 ==== ​SetZFinderEnable ==== ==== ​SetZFinderEnable ====
- 
  
 === zfinder_enable === === zfinder_enable ===
- 
  
 Enable/​Disable zfinder support. Enable/​Disable zfinder support.
- 
  
 ===== Encoder Actions (POST) ===== ===== Encoder Actions (POST) =====
- 
  
 ==== SetEncoder ==== ==== SetEncoder ====
- 
  
 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 ====
- 
  
 Requests an update to encoder_status_str variable. Requests an update to encoder_status_str variable.
  
- +To read the result, you need to POST the “stats” control as shown<​nowiki>​\</​nowiki> ​in the Python example code below.
-To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. +
  
 ==== StreamStatus ==== ==== StreamStatus ====
- 
  
 Requests an update to stream_status_str variable. Requests an update to stream_status_str variable.
  
- +To read the result, you need to POST the “stats” control as shown<​nowiki>​\</​nowiki> ​in the Python example code below.
-To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. +
  
 ==== AStreamStatus ==== ==== AStreamStatus ====
- 
  
 Requests an update to astream_status_str variable. Requests an update to astream_status_str variable.
  
- +To read the result, you need to POST the “stats” control as shown<​nowiki>​\</​nowiki> ​in the Python example code below.
-To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. +
  
 ==== SourceStatus ==== ==== SourceStatus ====
- 
  
 Requests an update to source_status_str variable. Requests an update to source_status_str variable.
  
- +To read the result, you need to POST the “stats” control as shown<​nowiki>​\</​nowiki> ​in the Python example code below.
-To read the result, you need to POST the “stats” control as shown%%\%% in the Python example code below. +
  
 ---- ----
- 
  
 ===== Setting Encoder Configuration ===== ===== Setting Encoder Configuration =====
- 
  
 To set the encode configuration per channel the **SetEncoder** action is used with a post. All variables should be present or they will be replaced with a defualt that may not be valid for your application. More than one channel can be set per command. It is recommended you first read the current settings from the encoder then modify them and send the new settings back as in the Python example below: To set the encode configuration per channel the **SetEncoder** action is used with a post. All variables should be present or they will be replaced with a defualt that may not be valid for your application. More than one channel can be set per command. It is recommended you first read the current settings from the encoder then modify them and send the new settings back as in the Python example below:
Line 2244: Line 1722:
 print new_cfg print new_cfg
 requests.post(server_url,​ data=new_cfg) requests.post(server_url,​ data=new_cfg)
 +
 </​code>​ </​code>​
- 
  
 ===== Reading Statistics ===== ===== Reading Statistics =====
- 
  
 Python example of updating and reading encoder statistics: Python example of updating and reading encoder statistics:
- 
  
 <​code>​ <​code>​
Line 2264: Line 1740:
  
 print requests.get(server_url,​ params='​ctrl=stats&​chn='​).json() print requests.get(server_url,​ params='​ctrl=stats&​chn='​).json()
 +
 </​code>​ </​code>​
- 
  
 Example output: Example output:
- 
  
 <​code>​ <​code>​
Line 2278: Line 1753:
  ​u'​source_status_str':​ u'​+CAMERA 1920x1080p 60.00 fps +OK',  ​u'​source_status_str':​ u'​+CAMERA 1920x1080p 60.00 fps +OK',
  ​u'​stream_status_str':​ u'​Channel 1 URL rtsp Frames 11524 +OK'}  ​u'​stream_status_str':​ u'​Channel 1 URL rtsp Frames 11524 +OK'}
 +
 </​code>​ </​code>​
 +
  
http_api.txt · Last modified: 2024/04/05 15:35 by anthony