Page 1 of 1

Panasonic WV-Nxxx Series

Posted: Fri Nov 17, 2006 4:59 pm
by memone
Hi everybody, I've looked across the board but I can't find a way to get a couple of Panasonic cam (to be precise a WV-NS320 and a WV-NW470) working with ZM

I'm running ZM 1.22.2 on a gentoo system and with my configuration zm is fully functional with:

Local analog cam on a BT878 board
Axis 214PTZ (network cam)
Panasonic BB-HCM381, BB-HCM331 and BL-C10 (same cgi protocol, all IP cam)

What I've tried:
- wget is working

Code: Select all

wget --save-headers -S "http://user:pass@IP/cgi-bin/push?CH=1&UID=661&MODE=START&FRAMERATE=10"
with it I receive a "stream" like:

Code: Select all

HTTP/1.0 200
Content-type: multipart/x-mixed-replace;boundary =--myboundary

--myboundary
Content-type: image/jpeg
Content-length: 6606
..
..
..
--myboundary
Content-type: image/jpeg
Content-length: 6581
..
..
- switching the ZM_NETCAM_REGEXPS on and off
- switching the ZM_HTTP_VERSION on and off
- increasing the ZM_HTTP_TIMEOUT parameter up to 5 secs (with wget the cams are quite responsive)

In every case running zmc results in a log like

Code: Select all

11/17/06 17:36:16.028264 zmc_m18[9833].INF-zm_debug.c/305 [New Debug Level = 9, New Debug Log = /tmp/zmlog]
11/17/06 17:36:16.028829 zmc_m18[9833].DB1-zm_monitor.cpp/1871 [Got 1 monitors]
11/17/06 17:36:16.048511 zmc_m18[9833].DB2-zm_remote_camera.cpp/124 [Request: GET /cgi-bin/push?CH=1&UID=166&MODE=START&FRAMERATE=2 HTTP/1.0
User-Agent: ZoneMinder/1.22.2
Host: xxxxxxxxxxx
Connection: Keep-Alive
Authorization: Basic xxxxxxxxxxxxxxxxxxxxx

]
11/17/06 17:36:16.049131 zmc_m18[9833].DB1-zm_monitor.cpp/235 [monitor purpose=1]
11/17/06 17:36:16.049150 zmc_m18[9833].DB1-zm_monitor.cpp/242 [shm.size=12365764]
.
.
.
.
.
11/17/06 17:36:16.350076 zmc_m18[9833].DB1-zm_monitor.cpp/2008 [Loaded monitor 18(Pana), 1 zones]
11/17/06 17:36:16.350093 zmc_m18[9833].INF-zmc.cpp/183 [Starting Capture]
11/17/06 17:36:16.362924 zmc_m18[9833].DB3-zm_remote_camera.cpp/159 [Connected to host, socket = 6]
11/17/06 17:36:16.362963 zmc_m18[9833].DB3-zm_remote_camera.cpp/180 [Request sent GET /cgi-bin/push?CH=1&UID=166&MODE=START&FRAMERATE=2 HTTP/1.0
User-Agent: ZoneMinder/1.22.2
Host: xxxxxxxxxxxxxx
Connection: Keep-Alive
Authorization: Basic xxxxxxxxxxxxxxxxxxx

]
11/17/06 17:36:21.362896 zmc_m18[9833].ERR-zm_remote_camera.cpp/195 [Select timed out]

Any suggestion? I'm running out of ideas.. I hope I've provided enough information..

Thanks in advance
Vincenzo

ps (for jameswilson): I've seen a thread with similar problems you had with an IQEye cam (or something like that): did you succedeed to make it work?

Posted: Mon Nov 20, 2006 10:34 pm
by zoneminder
This may be an issue with ZM not always sending the correct line endings. I have fixed this in 1.22.3, which will be out Thursday at the latest. This thread, http://www.zoneminder.com/forums/viewto ... =http+line, explains further and describes a fix.

Posted: Tue Nov 21, 2006 9:52 am
by memone
This may be an issue with ZM not always sending the correct line endings. I have fixed this in 1.22.3, which will be out Thursday at the latest.
Thanks a lot, yesterday I got to the same fix (looking at wget's requests that were working) and now I read your reply just before posting it! :)

Meanwhile I discovered another issue with these Panasonic cams: when in multipart-jpeg mode, they send an header like this (i used * for relevant " " chars):

Code: Select all

HTTP/1.0 200 <-- "OK" missing
Content-Type:*multipart/x-mixed-replace;boundary*=--myboundary

--myboundary
Content-Type:*image/jpeg
Content-Length:*12345
JPEG DATA
ZM doesn't like this kind of header:
when ZM_NETCAM_REGEXPS is disabled I got the error "No content boundary found in header", I think because of the " " char between boundary and "=".

when using the ZM_NETCAM_REGEXPS mode it complained about the missing HTTP status in the header. To get around this issue, I modified the regexp for retrieving the status from

Code: Select all

status_expr = new RegExpr( "^HTTP/(1\\.[01]) +([0-9]+) +(.+?)\r?\n",PCRE_CASELESS );
to

Code: Select all

status_expr = new RegExpr( "^HTTP/(1\\.[01]) +([0-9]+) *(.*?)\r?\n",PCRE_CASELESS )
but can't find a way to make the regexp

Code: Select all

snprintf( subheader_pattern, sizeof(subheader_pattern),"^((?:\r?\n){0,2}?(?:--)?%s\r?\n.+?\r?\n\r?\n)",content_boundary);
match the rest of the header, I think because of a missing blank line between the Content-Length line and JPEG data..

I will keep on trying to make zm working with these cams, but if you have an advice you are really welcome! :)

Vincenzo

Posted: Mon Aug 27, 2007 5:21 am
by henke
Hi,

Did you get them working?

Posted: Tue Nov 20, 2007 10:54 pm
by hrabe
Any Idea for this Panasonic cams works?
Thanks