Trendnet has a bunch of new, inexpensive cameras that don't work with
ZoneMinder, but I'm halfway towards getting one of them to work---can
someone perhaps furnish a patch if I tell you what's involved?
Specifically: ZM 1.25 running under Ubuntu 12.04, with Trendnet
TV-IP751WC and probably all the rest of ther current crop. The
TV-IP751WC is only $40, so it would be really nice if such a cheap
camera can be made to work with ZM; they could be used all over.
[I've searched the forum and can't find "ip751" anywhere in it.]
Two issues:
(a) This camera requires digest auth, not basic auth. This means that
you'll get "401 Authorization Required" in your logs and captures will
fail.
(b) Even if you turn off access control completely, you get a log full of
WAR [Corrupt JPEG data: premature end of data segment]
ERR [Invalid JPEG file structure: two SOI markers]
ERR [Unable to decode jpeg]
because the camera is returning something slightly unexpected,
and you get no captures.
[Note: I've broken the URLs below so they don't look spammy to
the forum software.]
For (a), I imagine that this requires simply using Perl's Digest::Auth
module instead of whatever it's using to do basic auth? Demo:
"curl -v -u admin:XX http ://tv-ip751WC/MJPEG.CGI" barfs out an
"authorization required" and then has to reconnect to the camera
using basic auth before receiving a stream of jpegs, but
"curl -v --digest -u admin:XX http ://tv-ip751WC/MJPEG.CGI"
succeeds without renegotiation and you get the stream on the
first connection.
For (b), I have a working TV-IP400W to compare to.
"curl -v -u admin:XX http ://tv-ip400w/MJPEG.CGI" gives:
* About to connect() to TV-IP400W port 80 (#0)
[ . . . ]
< Content-Type: multipart/x-mixed-replace;boundary=--video boundary--
<
--video boundary--Content-length: 10704
Date: 2013-06-12 04:16:43 IO_00000000_PT_157_046
Content-type: image/jpeg
[ . . . lots of jpeg data . . . ]
But for the TV-IP751WC (with user access control turned off)
"curl -v -u admin:XX http ://tv-ip751WC/MJPEG.CGI" gives:
* About to connect() to tv-ip751WC port 80 (#0)
[ . . . ]
< Content-Type: multipart/x-mixed-replace;boundary=--video boundary--
<
Content-length: 9435
Date: 06-11-2013 11:57:08 PM IO_00000000_PT_005_000
Content-type: image/jpeg
[ . . . lots of jpeg data . . . ]
Note that there's no second "--video boundary--" before the
"Content-length:" field; I assume this is what's causing ZM
to complain that the jpeg is corrupt.
Is there anyone here who can use this info to create patches that will
enable jpegs (for sure) and digest auth (I hope) to work? If so,
pretty much every modern Trendnet IP camera will probably instantly
work, unless there's yet a third issue here, and that would enable
a whole lot of very cheap but pretty good modern Trendnets to be
ZM-compatible.
Thanks very much!