EVENT_RSPIMG1, EVENT_RSPIMG2, EVENT_RSPIMG3

 

Description

Get or Set the video image engine of the event configurations.

When event source is triggered, the device could upload the snapshot or video clip to the SMTP mail server, FTP server or the HTTP CGI programs.

The image size of snapshot is the same as the streaming video resolution and not configurable. The extend file name of the snapshot is *.jpg.

The video clip is the raw data of the video stream. The specific header will be inserted in the head of raw data to allow the specific player plays it. The extend file name of the video clip is *.raw.

The FTP server, SMTP server and HTTP servers have to be configured well before activate the event upload by this URL.

When the video upload to FTP server is selected, the audio raw data will be uploaded if the audio function is enabled. No audio upload is available when the HTTP server is the target for uploading. The snapshot upload does not include the audio raw data upload.

The upload time should be smaller than the repeat time if the event source is SCH. If the upload time is larger than the repeat time, the device will use the repeat time as the time base to handle the image upload in this case. The upload time is not used then. Refer to EVENT_CONFIG URL.

Input Argument

Type,PreBuf,UploadTime,ImageRate,ImageName,UploadPath,[HostUrl],subject,VideoSrc
where

Type : the method of sending message.
value in Type description
0 no image will be uploaded. disable this function
1 upload the snapshot to SMTP server
2 upload the snapshot to the HTTP CGI Program 1
3 upload the snapshot to the HTTP CGI Program 2
4 upload the snapshot to the FTP server.
5 upload the video clip to the HTTP CGI Program 1
6 upload the video clip to the HTTP CGI Program 2
7 upload the video clip to the FTP server. Audio data will be uploaded if audio function was enabled.
8 upload the snapshot to to the local storage device.
Only valid with the device which it has local storage device.
9 save the video to the local storage device. Audio data will be saved if audio function was enabled.
Only valid with the device which it has local storage device.
PreBuf : the time in seconds before the event source was triggered. It could be 0, 1, 2 or 3 seconds. It does not guarantee to have video with precise timing control. And it is only valid for Type 4~7 and 9. For still image upload, this argument has to fixed to 0.
When the Type=9, the firmware writes 3 seconds pre-buffer video and audio to local storage regardless of PreBuf setting.
UploadTime : the time in seconds to upload video to the remote server when the event source was triggered. It could be from 0 to 86400. If it is 0, the video upload will be stopped as the event source becomes inactive.
if the event source is scheduler, the actual upload time will be the repeated time in the schedule event if this repeat time is smaller than UploadTime.
ImageRate : the frame rate of the still image. The device schedules the snapshot for upload based on the UploadTime. The time interval of two successive snapshot is UploadTime/ImageRate. The number of snapshots in an upload is not guarantee. It will do its best effort to reach the requested image rate.
When ImageRate is 0, the device will perform snapshot as fast as possible. The video streaming performance will be much dropped.
With snapshot response, the event rules have to manage carefully. Otherwise, the result of snapshot might not match expectation. The following conditions of event rules with snapshot response should be followed.
  1. If the associated event source is a schedule event and the response type is snapshot, the UploadTime and scheduler's Repeat time need special care. Both of them should be not zero and the UploadTime should be shorter then Repeat time.
  2. If the associated event source is not a schedule event and the response type is snapshot with non-zero ImageRate, the corresponding UploadTime must be not zero. Because firmware could not know how long the event becomes inactive to schedule the snapshot task.
  3. For uploading video clip, this argument is not used and has to be fixed to 0. The frame rate of the video clip is the same frame rate in streaming mode.
Firmware does not check the dependence between ImageRate and UploadTime with snapshot response type in this URL. But the event response might not meet your expectation.
ImageName : the prefix of file name of the video still image or video clip. The postfix of the file name could be decoded by the rule of postfix naming rule. The first character of this value most not be '%'. The maximum length is 63.
UploadPath : the prefix of the upload path of the snapshot or video clip. The postfix of the file name could be decoded by the rule of postfix naming rule. The first character of this value must not be '%'. The maximum length is 63.
HostUrl : The destination host address. It depends on the value in Type argument. This argument has to be enclosed with left/right brackets.The maximum length is 63 not including the left/right brackets.
If the length of the input argument is longer than its maximum length limitation, the error message will be returned.
The '['and ']' are NOT allowed in HostUrl.
value in Type definition of HostUrl
0 no used.
1 The receipt email address. The ';" was used to connect several email addresses.
2, 5 The URL for CGI 1 including the CGI path
3, 6 The URL for CGI 2 including the CGI path
4, 7, 8, 9 Not used
Special Note
The CGI path and CGI program name are included in this argument. Most of cases, the '&' is used to connect two commands. Therefore, the '&' is the part of this input arguments. In this case, two different meaning of '&' in this URL command. It will confuse the encoder device when it parsers this URL command. To solve this problem, the %26, the ASCII code of '&', has to be used when '&' acts as the input argument. For example,
EVENT_RSPIMG1=2,0,5,5,name,folder,[/cgi-bin/cmd/system?CMD1=A%26CMD2=B],,1
subject : The subject of the mail. This is only used if the Type is 1. It was not used in another type. The character in the subject has to follow RFC 3986 Uniform Resource Identifier Generic Syntax. The maximum length is 31.
VideoSrc : This is used of dual stream platform. For PlatformA it is fixed to 1.
In Dual Streams Platform, it indicates which video stream is used for uploading video images. The 1 is for video stream 1 and 2 is for video stream 2.
With PlatformK cameras,
there are 4 video streams in 4VGA video streaming mode and 6 video streams in 6VGA video streaming mode. The value of VideoSrc indicates the video stream in these two video streaming modes. For example, VideoSrc=5 indicates the video stream 5 in 6VGA streaming mode is the video source for video or snapshot upload.

Attribute

Return of Message

EVENT_RSPIMGn='1,0,3,0,image_%N-%Y,Dir%hh%mm%ss,[myname@mail,com],MySubject,1'
where n could be 1, 2 or 3

OK: EVENT_RSPIMGn='4,0,1,0,snapshot-%Y,Dir-%N,[host],subject,1'
or
ERROR: EVENT_RSPIMGn='7,1,5,0,video-%Y,Dir-%N,[host],subject,1'
where n could be 1, 2 or 3

Applicability

Status

Valid

See Also

EVENT_CONFIG, EVENT_RSPDOn, EVENT_RSPMSGn, EVENT_RSPGO, FTP_SERVER, SMTP_PRI, SMTP_SEC

Example

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_RSPIMGn
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPIMGn
where n could be 1, 2 or 3

http://ip:port/cgi-bin/encoder?USER=Admin&PWD=123456&EVENT_RSPIMGn=4,0,1,0,name,folder,[],,1
or
http://ip:port/cgi-bin/cmd/encoder?EVENT_RSPIMGn=4,0,1,0,name,folder,[],,1
where n could be 1, 2 or 3

Back to

HOME, ENCODER CGI