GetCameraStream Method
GetCameraStream returns a video stream for a given camera.
Syntax
GetCameraStream2(int intCameraID, string strStreamCoding, string strStreamContainer, int intDesiredWidth, int intDesiredHeight, int intOptions, string strPassword)
Parameters
Name | Type | Description |
---|---|---|
intCameraID | int | Unique camera identifier, as returned by other API methods such as GetCamerasInBox. |
strStreamCoding | string | The desired video coding format (codec), e.g. “H264”, as returned in the field StreamCoding, StreamCoding2, or StreamCoding3 for the camera. |
strStreamContainer | string | The desired video container format, e.g. “MP4”, as returned in the field StreamContainer, StreamContainer2, or StreamContainer3 for the camera.
Note: The coding and container should correspond. For example, if StreamCoding2 is used, StreamContainer2 must be used. |
intDesiredWidth | int | The desired width of the returned video stream, in pixels, as returned in the field Width for the camera. |
intDesiredHeight | int | The desired height of the returned video stream, in pixels, as returned in the field Height for the camera. |
intOptions | int | A set of bitwise flags OR’ed together. No options are currently supported. |
strPassword | string | Unique id/password supplied to you previously. |
Return Value
Type: A video stream that can be played in a suitable media player (such as VLC)
The target media player should support the specified video coding and container formats, as well as 302 redirects. If the target media player does not support redirects, contact support@vizzion.com for further information.
Example
Request |
---|
http://www.vizzion.com/TrafficCamsService/TrafficCams.ashx?strRequest=GetCameraStream2&intCameraID=58782&strStreamCoding=H264&strStreamContainer=FLV&intDesiredWidth=640&intDesiredHeight=480&intOptions=0&strPassword=<password> |
Response |
---|
For details, see Return Value above. |