User Tools

Site Tools


http_api_lua |

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
Previous revision
Last revision Both sides next revision
http_api_lua [2017/12/18 23:34]
johnw
http_api_lua [2018/08/10 22:21]
rlancaster [HTTP API for HE4K-01 / HE4K-R4 / MVE-150 / MVE-100R / SME-01 / DME-02/03/04]
Line 1: Line 1:
-====== HTTP API ======+====== HTTP API for HE4K-01 / HE4K-R4 / MVE-150 / MVE-100R / SME-01 / DME-02/​03/​04 ​======
  
 +
 +For Camera/​Sensor based products <font 12.8px/​arial;;#​000000;;#​ffffff>​(Z3Cam/​FXXX)</​font>​ and the HE1080/​DME-10 use [[:​http_api|Z3-Camera_Solutions-http_api]]
  
 ===== Configuration API Syntax ===== ===== Configuration API Syntax =====
Line 89: Line 91:
 print enc_cfg.json() print enc_cfg.json()
 </​code>​ </​code>​
 +
 +
 +==== Persistent Configuration ====
 +
 +If you want the current configuration to be saved for future startups,
 +you must explicitly perform the "​SaveUser"​ action.
 +
 +
 +Python example code for saving configuration to persistent storage:
 +
 +<​code>​
 +#! /​usr/​bin/​env python
 +
 +import requests, json, sys
 +from time import sleep
 +
 +
 +server_url='​http://​192.168.81.7/​cgi-bin/​control.cgi'​
 +
 +payload='​action=SaveUser'​
 +r = requests.post(server_url,​ payload)
 +print r
 +print r.json()
 +</​code>​
 +
 +
  
 ===== Global Configuration ===== ===== Global Configuration =====
Line 287: Line 315:
  
 Possible values: 30 - 100 Possible values: 30 - 100
 +
 +==== C1_enc_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.
 +
 +==== C1_enc_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.
 +
 +
 +==== C1_enc_storage ====
 +
 +Absolute path to mounted media device (e.g. /​media/​sda1/​)
  
 </​file>​ </​file>​
  
 +
 +
 +===== Encoder Audio Configuration =====
  
 ==== C1_enc_audchan1_enable ==== ==== C1_enc_audchan1_enable ====
Line 382: Line 432:
  
  
-==== C1_enc_auxonoff ​====+===== Encoder Text Overlay Configuration (only for DME-02/​03/​04,​ SBE264-01, SBE264-DVR-13) =====
  
-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+==== C1_enc_ovlglobalalpha ====
  
-The path to storage is set by the “storage” parameter.+Description:​ Global alpha blending setting
  
-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.+Possible values: 0 (totally transparent) to 100 (totally opaque)
  
-The recording file size is set by the “filesize” parameter. When the file reaches this size, a new file will be created.+==== C1_enc_ovltext ====
  
-==== C1_enc_fprefix ====+Description:​ ASCII Text to draw
  
-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.+==== C1_enc_ovltextenable ====
  
 +Description:​ Enable or disable text overlay
  
-==== C1_enc_storage ====+Possible values: on, off
  
-Absolute path to mounted media device (e.g. /​media/​sda1/​)+==== C1_enc_ovltextlocation ====  
 + 
 +Description:​ Set position of overlay text onscreen
  
 +Possible values: top_left, top_right, top_center, bottom_left,​ bottom_right,​ bottom_center
  
  
Line 492: Line 546:
  
 ==== Dynamic ==== ==== Dynamic ====
 +
  
 Set a dynamic parameter after encoding has already started Set a dynamic parameter after encoding has already started
 +
  
 <​code>​ <​code>​
Line 506: Line 562:
 </​code>​ </​code>​
  
-   vratediv ​   Set video frame rate divider + 
-   ​vrate       Set bitrate +<​code>​ 
-   ​auxfile ​    ​Dynamically start/stop auxfile recording (value is either on or off) +vratediv ​   Set video frame rate divider 
-    ​+ ​vrate ​      Set bitrate 
 + ​auxfile ​    ​Dynamically start/stop auxfile recording (value is either on or off) 
 +</​code>​ 
 + 
 +The auxfile command will return a status from the table below. 
 + 
 +^Auxfile status ^Number | 
 +   VCAP_VENC_ERR_NO_SPACE ​              | -26 | 
 +|    VCAP_VENC_ERR_THREAD_ERR ​            | -25 | 
 +|    VCAP_VENC_ERR_BAD_MOUNTPOINT ​        | -24 | 
 +|    VCAP_VENC_ERR_STOPPING_AUDIO ​        | -23 | 
 +|    VCAP_VENC_ERR_MTS_INVALID_DEST ​      | -22 | 
 +|    VCAP_VENC_ERR_MTS_BAD_UDP_DEST ​      | -21 | 
 +|    VCAP_VENC_ERR_INSUFFICIENT_TS_RATE ​  | -20 | 
 +|    VCAP_VENC_ERR_NO_SPARE_MTS_BW ​       | -19 | 
 +|    VCAP_VENC_ERR_MTS_START_FAILURE ​     | -18 | 
 +|    VCAP_VENC_ERR_MTS_DUPLICATE_DEST ​    | -17 | 
 +|    VCAP_VENC_ERR_MTS_DUPLICATE_NAME ​    | -16 | 
 +|    VCAP_VENC_ERR_MTS_TEARDOWN_FAILURE ​  | -15 | 
 +|    VCAP_VENC_ERR_MTS_NAME_NOT_FOUND ​    | -14 | 
 +|    VCAP_VENC_ERR_MTS_CREATE_FAILURE ​    | -13 | 
 +|    VCAP_VENC_ERR_MTS_RATE_MISMATCH ​     | -12 | 
 +|    VCAP_VENC_ERR_MTS_NO_FREE_INFO ​      | -11 | 
 +|    VCAP_VENC_ERR_NOT_IMPLEMENTED ​       | -10 | 
 +|    VCAP_VENC_ERR_AUDIO_CAPTURE_SINK ​    | -8 | 
 +|    VCAP_VENC_ERR_NO_FREE_AUDIO_STREAM ​  | -7 | 
 +|    VCAP_VENC_ERR_VIDEO_FILE_NAME_PARSE ​ | -6 | 
 +|    VCAP_VENC_ERR_STREAM_NOT_RUNNING ​    | -5 | 
 +|    VCAP_VENC_ERR_STREAM_HAS_CHILDREN ​   | -4 | 
 +|    VCAP_VENC_ERR_AUDIO_CAPTURE_SOURCE ​  | -3 | 
 +|    VCAP_VENC_ERR_STARTING_AUDIO ​        | -2 | 
 +|    VCAP_VENC_ERR_BAD_DESTINATION ​       | -1 | 
 +|    VCAP_VENC_SUCCESS ​                   | 0 | 
 +|    VCAP_VENC_WARN_ALREADY_STARTED ​      | 1 | 
 + 
 + 
 +\\
  
 ==== EncoderStatus ==== ==== EncoderStatus ====
http_api_lua.txt · Last modified: 2020/02/18 16:08 by johnw