CGI

Audio&Video CGI

Version / Author / DateModify
1.0/David/2013-03-30First edition

Overview

User via CGI to get audio and video IP Camera

Capture IP Camera image

Snapshot.cgi

  • Permissions requirements:
Photographed permissions
  • Syntax:
/ Snapshot.cgi [? User = & pwd = & session = & resolution = & filename =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
resolution: the camera's image size values ​​with stream1_resolution parameters, such as not 

to set this parameter is set to empty, the lack of use

Province of image size.
filename: file name, such as the return of this parameter is not set or set to empty, the 

returned file name format: snapshot_ camera

Between. Jpg. For example: snapshot_20110708163405.jpg, photographed 2011-7-8 16:34:05.
  • Returns:
Return the image file.
  • Example:
Http://192.168.0.188/snapshot.cgi?session=1891048766
The IP Camera returns the file name of the image file of the snapshot_20110708163405.jpg.

http://192.168.0.188/snapshot.cgi?session=1891048766&resolution=4&filename=save.jpg
The size of the image file the IP Camera Back the file named save.jpg 320 *240.

Requests IP Camera, audio and video streaming.

Request_av.cgi

  • Description:
Request IP Camera audio and video streaming. Unsuccessful, the user can obtain the 

streaming audio and video in the IP Camera av.asf vlc control but in certain cases, such as 

used in web pages to play av.asf will not get the error message. At this point you can use 

request_av.cgi request audio and video to IP Camera is unsuccessful, an error message is 

returned, such as success, IP Camera will retain the information requested by the user, and 

returns an id as identification, then the user can use The id to directly access IP Camera, 

audio and video. This id for a one-off and the IP Camera longest keep this id, user id, that 

failure, the same, such as minutes later, the user does not use this id the id will lapse. 

  • Permissions requirements:
The video access rights / audio access permissions
  • Syntax:
/ Request_av.cgi [? User = & pwd = & session = & json = & jsonp_callback = & video = & 

audio = & stream = & result = & id =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
json / jsonp_callback: return the json type of data set
video: the need for video; 0: No 1:; such as this parameter is not set or set to null, the 

default is; if you choose, you will need a video access rights.
audio: the need for audio; 0: No, 1: Yes; such as this parameter is not set or set to null, 

the default is; if you choose, you will need audio access rights.
stream: the number of video streams, such as not set this parameter is set to null, the 

default for the first video stream.
result / id: set the variable name returned.
  • Returns:
Result: whether the request was successful
0: Success
-1: The current session is not open to the user
-2: Maximum simultaneous viewing of large ones
id: after the success of the identity back.
  • Example:
Http://192.168.0.188/request_av.cgi?session=1891048766 user requests a video stream 1 

and audio
IP Camera Back:
var result = 0;
var id = 1567918901;

http://192.168.0.188/request_av.cgi?session=1891048766&video=1&audio=0&stream=2&result=ret 

user requests a video stream 2
IP Camera Back:
var ret = 0;
var id = 2084675952;

Get IP Camera MJPEG streaming video

Videostream.cgi

  • Permissions requirements:
The video access rights
  • Syntax:
/ Videostream.cgi [? User = & pwd = & session = & id = & stream =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
the id: request_av.cgi returned a valid id
stream: the number of video streams, such as not set this parameter is set to null, the 

default is the first video stream, Note: MJPEG video streams must be specified encoding 

format, otherwise it will return an error.
  • Returns:
HTTP Server Push mode jpeg image stream.
  • Example:
Http://192.168.0.188/request_av.cgi?

session=1891048766&video=1&audio=0&stream=2&result=ret user requests the video stream 2 

video stream 2 must be MJPEG encoding format
IP Camera Back:
var ret = 0;
var id = 2084675952;
http://192.168.0.188/videostream.cgi?id=2084675952 before request_av.cgi parameters to 

access the IP Camera MJPEG streaming video, video streaming
Back HTTP Server Push mode IP Camera jpeg image stream

video streaming http://192.168.0.188/videostream.cgi?session=1891048766&stream=2 access IP 

Camera 2 (required the MJPEG encoding format)
Jpeg image stream @ return HTTP Server Push Mode IP Camera

Get IP Camera, audio and video streaming

Av.asf

  • Permissions requirements:
The video access rights / audio access permissions
  • Syntax:
/ Av.asf [? User = & pwd = & session = & id = & video = & audio = & stream =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
the id: request_av.cgi returned a valid id
video: the need for video; 0: No 1:; such as this parameter is not set or set to null, the 

default is; if you choose, you will need a video access rights.
audio: the need for audio; 0: No, 1: Yes; such as this parameter is not set or set to null, 

the default is; if you choose, you will need audio access rights.
stream: the number of video streams, such as not set this parameter is set to null, the 

default for the first video stream.
  • Returns:
ASF format video and audio streams.
  • Example:
Http://192.168.0.188/request_av.cgi?session=1891048766 user requests a video stream 1 

and audio
IP Camera Back:
var result = 0;
var id = 1567918901;
the use the prior request_av.cgi parameters to access the IP Camera video stream in 

http://192.168.0.188/videostream.cgi?id=1567918901 and audio
IP Camera Back ASF format audio and video streaming
http://admin: @ 192.168.0.188/av.asf? video = 1 & audio = 0 & stream = 2 access IP Camera 

video stream
IP Camera Back to ASF format video stream
Copyright:Shenzhen Reecam Tech. Ltd.

ICP:粤ICP备09050685号 Technical support:800069965