Introduction
Overview
Download
Purchase
Contact
Help

SecuritySpy

Web Server HTTP Specification

This document describes the HTTP interface of SecuritySpy's built-in web server. This is an advanced document and basic knowledge of HTTP is assumed. Parameters in square brackets [] are optional.

HTML page containing live video or still images

Request format
++viewlive?cameraNum=<camera1>[&cameraNum=<camera2>][&imageSize=<size>][&viewMethod=<method>]

Parameters
<camera1>
, <camera2> etc are the numbers of the cameras to display
<size> is the size of the images, either in format "640x480" or "scale2" (double size) or "scale0.5" (half size)
<method> the viewing method of images on the page, one of the following numbers:

0
Auto - SecuritySpy will try to detect the browser's capabilities and will choose a viewing method to suit
1
Java applet with JPEG compression
2
Java applet with MPEG-4 compression
3
JavaScript
4
Server-push JPEG stream
5
Still JPEG images

Example
++image?cameraNum=1&cameraNum=2&cameraNum=3&imageSize=640x480&method=0

Returned data
A HTML page containing live images from the cameras you specify.


Still JPEG image

Request format
++image?cameraNum=<camera>[&width=<width>][&height=<height>][&quality=<quality>]

Parameters
<camera>
is the number of the camera, as displayed in the Device Map window
<width> is the width of the image in pixels
<height> is the height of the image in pixels
<quality> is the compression quality in the range 0 to 100

Example
++image?cameraNum=1&width=640&height=480&quality=50

Returned data
A single JPEG image for the specified camera.


Multipart JPEG "server push" video stream

Request format
++video?cameraNum=<camera>[&width=<width>][&height=<height>][&quality=<quality>][&req_fps=<fps>]

Parameters
<camera>
is the number of the camera, as displayed in the Device Map window
<width> is the width of the image in pixels
<height> is the height of the image in pixels
<quality> is the compression quality in the range 0 to 100
<fps> is the FPS of video that SecuritySpy will attempt to send

Example
++video?cameraNum=1&width=640&height=480&quality=50&req_fps=10

Returned data
A multipart-mixed-replace JPEG stream, as follows:

HTTP/1.1 200 OK\r\n
Server: BBVS\r\n
Content-Type: multipart/x-mixed-replace;boundary=ssBoundary8345\r\n
\r\n
--ssBoundary8345\r\n
Content-Type: image/jpeg\r\n
Content-Length: 21325\r\n
\r\n
<JPEG image data>\r\n
--ssBoundary8345\r\n
Content-Type: image/jpeg\r\n
Content-Length: 22128\r\n
\r\n
<JPEG image data>\r\n
........


Multipart MPEG-4 "server push" video stream

Request format
++video?codec=mp4v&cameraNum=<camera>[&width=<width>][&height=<height>][&quality=<quality>][&req_fps=<fps>]

Parameters
<camera>
is the number of the camera, as displayed in the Device Map window
<width> is the width of the image in pixels
<height> is the height of the image in pixels
<quality> is the compression quality in the range 0 to 100
<fps> is the FPS of video that SecuritySpy will attempt to send

Example
++video?codec=mp4v&cameraNum=1&width=640&height=480&quality=50&req_fps=10

Returned data
A multipart-mixed-replace MPEG-4 stream, as follows:

HTTP/1.1 200 OK\r\n
Server: BBVS\r\n
SS-Codec: mp4v
SS-Width: 640
SS-Height: 480
SS-Depth: 24
Content-Type: multipart/x-mixed-replace;boundary=ssBoundary8345\r\n
\r\n
--ssBoundary8345\r\n
Content-Length: 21325\r\n
\r\n
<MPEG-4 image data>\r\n
--ssBoundary8345\r\n
Content-Length: 22128\r\n
\r\n
<MPEG-4 image data>\r\n
........


PTZ controls HTML page

Request format
++ptz/controls?cameraNum=<camera>

Parameters
<camera>
is the number of the camera, as displayed in the Device Map window

Example
++ptz/controls?cameraNum=1

Returned data
An HTML page with buttons to control the PTZ of the specified camera.


PTZ command

Request format
++ptz/command?cameraNum=<camera>&command=<command>

Parameters
<camera>
is the number of the camera, as displayed in the Device Map window
<command> is the command to excecute, which is a number as follows:

1
Left   12 Preset 1   112 Save preset 1
2
Right   13 Preset 2   113 Save preset 2
3
Up   14 Preset 3   114 Save preset 3
4
Down   15 Preset 4   115 Save preset 4
5
Zoom in   16 Preset 5   116 Save preset 5
6
Zoom out   17 Preset 6   117 Save preset 6
7
Home   18 Preset 7   118 Save preset 7
8
Up-left   19 Preset 8   119 Save preset 8
9
Up-right            
10
Down-left            
11
Down-right   99 Stop movement      

Example
++ptz/command?cameraNum=1&command=7

Returned data
"OK" as text if the command was accepted by SecuritySpy.

Note
Command 99 to stop movement is only applicable to certain cameras (eg. the Foscam FI8908W) that support continuous-motion PTZ and require this additional command to stop the movement after it is started. For other cameras that support movement in individual steps, this command does nothing.


Active/Passive mode control

Request format
++ssControlActiveMode?cameraNum=<camera>
++ssControlPassiveMode?cameraNum=<camera>

Parameters
<camera>
is the number of the camera

Example
++ssControlActiveMode?cameraNum=1
++ssControlPassiveMode?cameraNum=1

Returned data
HTTP 303 redirect to the referer page, or if no referer page, the text "The control message was received OK".


HTML page containing links to captured video footage

Request format
++download?cameraNum=<camera1>[&cameraNum=<camera2>][&fileTypeMenu=<type>][&ageText=<age>]
[&date1Text=<date1>][&date2Text=<date2>][&format=<format>]

Parameters
<camera1>
, <camera2> etc are the numbers of the cameras to be included in the list of footage
<type> a one-character indicator of what kinds of files to list:

m
Movie files only
i
Image files only
b
Both movie files and image files

<age> The maximum age of files to list, in days
<date1>, <date2> A date range for files to list, in the format "DD/MM/YY"
<format> The format of the returned data: "html" or "xml"

Example
++download?cameraNum=1&cameraNum=2&fileTypeMenu=b&ageText=5

Returned data
An HTML or XML page containing a list of files that match the search criteria, with download links to the the files themselves.


Camera status

Request format
++camerastatus?cameraNum=<camera>

Parameters
<camera>
is the number of the camera

Example
++camerastatus?cameraNum=1

Returned data
One of the following results in plain text:

2 PASSIVE The camera is in passive mode
3 ACTIVE The camera is in active mode

HTML page containing list of sounds

Request format
++sounds

Returned data
An HTML page with a list of sounds installed in the SecuritySpy server with links. Clicking on a link will play the sound on the server computer.


HTML page containing list of scripts

Request format
++scripts

Returned data
An HTML page with a list of scripts installed in the SecuritySpy server with links. Clicking on a link will run the script on the server computer.


Introduction | | Overview | | Download | | Purchase | | Contact | | Help