MJPEG stream capture fails with Axis 211
Posted: Tue Nov 15, 2005 7:32 am
I'm running ZoneMinder 1.21.3, downloaded as a Debian package from www.spic.net. So far, I can only successfully get my Axis 211 camera to work with ZM if I use the JPEG method (source /axis-cgi/jpg/image.cgi) - which at best captures around 7fps, but with up to 20 seconds lag.
If I try to use the MJPEG stream provided by the camera (source /axis-cgi/mjpg/video.cgi), ZM stream no longer works (although strangely, still images do).
My zmdc.log shows the following:
''zmc -m 3' started at 05/11/15 20:21:47
'zmc -m 3' starting at 05/11/15 20:21:47, pid = 5506
'zmc -m 3' stopping at 05/11/15 20:21:57
'zmc -m 3' died at 05/11/15 20:21:57
'zmc -m 3' started at 05/11/15 20:21:57
'zmc -m 3' starting at 05/11/15 20:21:57, pid = 5511
'zmc -m 3' stopping at 05/11/15 20:22:07
'zmc -m 3' died at 05/11/15 20:22:07
'zmc -m 3' started at 05/11/15 20:22:07
'zmc -m 3' starting at 05/11/15 20:22:07, pid = 5518
'zmc -m 3' stopping at 05/11/15 20:22:17
'zmc -m 3' died at 05/11/15 20:22:17
...and so on.
I set ZM_DEBUG_LEVEL_zmc=4 and also echoed 134217728 to shmall and shmmax.
My /var/log/syslog is filling up very fast with messages like the following:
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Unable to extract subheader from stream, retrying]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 1448 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 1448 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Unable to extract subheader from stream, retrying]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 2896 bytes]
Yet if I connect directly to the camera, and view the MJPEG stream (with Firefox), it works perfectly.
If I try a 'wget -S http://10.10.10.165/axis-cgi/mjpg/video.cgi' from Linux, the headers look correct:
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Connection: close
Content-Type: multipart/x-mixed-replace; boundary=--myboundary
and I confirmed that the returned stream is simply just repeated JPEG's separated by '--myboundary'.
Is this a known problem? I see there are a lot of posts of a similar nature, but it's difficult to make out whether anybody actually has this successfully working. If it is a bug, is it fixed in 1.21.4? It appears that the capture daemon is just having difficulty recognising the MJPEG stream coming from the camera, although I thought this was added as a feature several versions ago...?
The camera firmware is 4.30 (latest as of writing this).
Streaming video of 7fps and 20s lag is not really going to cut it (when I know the camera to stream direct to a browser at 25fps and zero lag).
If I try to use the MJPEG stream provided by the camera (source /axis-cgi/mjpg/video.cgi), ZM stream no longer works (although strangely, still images do).
My zmdc.log shows the following:
''zmc -m 3' started at 05/11/15 20:21:47
'zmc -m 3' starting at 05/11/15 20:21:47, pid = 5506
'zmc -m 3' stopping at 05/11/15 20:21:57
'zmc -m 3' died at 05/11/15 20:21:57
'zmc -m 3' started at 05/11/15 20:21:57
'zmc -m 3' starting at 05/11/15 20:21:57, pid = 5511
'zmc -m 3' stopping at 05/11/15 20:22:07
'zmc -m 3' died at 05/11/15 20:22:07
'zmc -m 3' started at 05/11/15 20:22:07
'zmc -m 3' starting at 05/11/15 20:22:07, pid = 5518
'zmc -m 3' stopping at 05/11/15 20:22:17
'zmc -m 3' died at 05/11/15 20:22:17
...and so on.
I set ZM_DEBUG_LEVEL_zmc=4 and also echoed 134217728 to shmall and shmmax.
My /var/log/syslog is filling up very fast with messages like the following:
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Unable to extract subheader from stream, retrying]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 1448 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 1448 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Unable to extract subheader from stream, retrying]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Expecting 2896 bytes]
Nov 15 20:14:35 bigbrother zmc_m3[5309]: DB3 [Read 2896 bytes]
Yet if I connect directly to the camera, and view the MJPEG stream (with Firefox), it works perfectly.
If I try a 'wget -S http://10.10.10.165/axis-cgi/mjpg/video.cgi' from Linux, the headers look correct:
HTTP/1.0 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Connection: close
Content-Type: multipart/x-mixed-replace; boundary=--myboundary
and I confirmed that the returned stream is simply just repeated JPEG's separated by '--myboundary'.
Is this a known problem? I see there are a lot of posts of a similar nature, but it's difficult to make out whether anybody actually has this successfully working. If it is a bug, is it fixed in 1.21.4? It appears that the capture daemon is just having difficulty recognising the MJPEG stream coming from the camera, although I thought this was added as a feature several versions ago...?
The camera firmware is 4.30 (latest as of writing this).
Streaming video of 7fps and 20s lag is not really going to cut it (when I know the camera to stream direct to a browser at 25fps and zero lag).