Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Stream of following view will be received in reply

HTTP/1.0 200 OK

Connection: close

Server: ITV-Intellect-Webserver/4.9.0.0

Cache-Control: no-store,no-cache,must-revalidate,max-age=0

Pragma: no-cache

Date: Mon, 13 Jan 2013 10:44:27 GMT

Content-Type: multipart/mixed;boundary=videoframe

 

--videoframe

Content-Type: text/xml

Content-Length: 138 

   

<video_in>

  <sessionid>FC126734</sessionid>

  <video_in>CAM:5</video_in>

  <newstate>started</newstate>

  <errcode>100</errcode>

</video_in> 

 --videoframe

Content-Type: image/jpeg

Content-Length: 23978

X-Width: 320

X-Height: 240

X-Time: 2013-03-15T10:51:44.314+04:00

X-Timestamp: 0.000

 

 <jpeg image>

--videoframe

Content-Type: image/jpeg

Content-Length: 23651

X-Width: 320

X-Height: 240

X-Time: 2013-03-15T10:51:44.314+04:00

X-Timestamp: 0.152

 

<jpeg image>

Where:

  • X-Width - image width.
  • X-Height- image height.
  • X-Time - absolute time of frame forming.
  • X-Timestamp - relative frame time in seconds (relatively stream head).

In case of stream end due to the fault of server, the end packet can be received:

--videoframe

Content-Type: text/xml

Content-Length: 106   

<video_in>

  <sessionid>FC126734</sessionid>

  <video_in>CAM:5</video_in>

  <newstate>closed</newstate>

  <errcode>103</errcode>

</video_in>

  • sessionid -  session ID (the same as at start).
  • video_in - camera ID.
  • errcode - error code:
    • 100 – error absence.
    • 101 – too many connected users.
    • 102 – invalid password (theoretically, it's possible to change password at any moment).
    • 103 – unavailable video.
    • 104 – old client version. Update version

The stream consists of frames and messages. All dates are sent in 24 hour format:  dd.MM.yy kk:mm:ss

For instance, 15.05.10 10:51:44 – May 15, 2010 at 10:51:44

Three lines are received just after the http heading:

sessionid=29101F1\n
errmsg=Error text message\n
errcode=100\n

 

Here:

  • sessionid -  session id. This parameter is reserved, not in use.
  • errmsg – message about error in the text format;
  • errcode possesses the following values:
    • 100 – no errors
    • 101 – too many users connected
    • 102 – invalid password (in theory the password can be changed at any moment)
    • 103 – video server is not available
    • 104 – older version of the client. Update the version.

Video frame or message will be received (if errcode=100) after these three lines.

Frame format:

Frame\n
size=23978\n
delay=5243\n
width=320\n
height=240\n
file.name=C:\VIDEO\13-05-10 19\1._01\n
color=1\n
frm.total=500\n
frm.id=100\n
frm.time=15.05.10 10:51:44\n
format=1\n
byte[size-4] jpegdata
byte[4]  jpegdataformat

Here:

  • Last 4 bytes are to consist of the name: either JPEG or JPG1. Other formats are not supported.
  • size – the size of binary data with image.
  • delay – delay (in milliseconds) between frames.
  • width - width in pixels.
  • height – height in pixels.
  • file.name – name of the archive file. It is used to navigate through the archive.
  • color - 0-black and white, 1-color
  • frm.total – total frames in the archive file (this parameter is not essential for live video)
  • frm.id – ordinal number in the archive file (this parameter is not essential for live video)
  • frm.time – time when frame appears
  • format - always 1;
  • jpegdata – buffer with JPEG frame;
  • jpegdataformat – 4 bytes with JPEG or JPG1.

Message format:

Msg=start\n
type=CAM\n
id=1\n
action=DISABLED\n
paramname=paramvalue\n
Msg=end\n

 

Here:

  • Msg=start and Msg=end indicate the beginning and ending of the message.
  • type – type of the object that is the source of the message
  • id – object id
  • action
  • paramname=paramvalue – the set of parameters and their values. There can be several parameters with different names
    • .