One of my cameras has a special backdoor URL that returns a jpeg, but is missing the Content-Type: image/jpeg header in the reply.
I can view the jpeg in a browser which figures out it's a jpeg, but zoneminder complains about the empty content-type (and I can't blame it, it is missing). Is there any workaround outside of fixing the camera firmware which I don't have access to?
----------------------------------------------------------------------------
GET /mjpeg/snap.cgi?chn=1 HTTP/1.0
User-Agent: ZoneMinder/1.28.1
Host: 192.168.205.181
Connection: Keep-Alive
Authorization: Digest username="pict", realm="IPCamera Login",
nonce="8dbdb168c6c557a2437bec3daa465eac", uri="/mjpeg/snap.cgi?chn=1", qop=auth, nc=00000001,
cnonce=0a4f113b, response="d0aaaa79d0e9e1a2e4984fcf1f982a22"
HTTP/1.0 200 OK
Cache-Control: public,max-age=0
Content-Length: 13823
Connection: close
Date: Sat, 07 Nov 2015 04:31:22 GMT
Server: lighttpd/1.4.35
......JFIF.............C..............
(B+(%%(Q:=0B`Ued_U][jx..jq.s[].........g.............C....(#(N++N.n]n..................................
......................h...."......................................
.....................}........!1A..Qa."q.2....#B...R..$3br..
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwx
----------------------------------------------------------------------------
I suppose I could wget the jpeg from the command line, dump to a flie, and have zoneminder read that instead, but that seems kind of ugly and there will be no synchronization :-/
The camera does offer RTSP, but I'd rather avoid using that to limit load on my overloaded server.
Can I use a jpeg input missing content-type in the http reply?
-
- Posts: 93
- Joined: Thu Jan 17, 2013 6:13 pm
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Can I use a jpeg input missing content-type in the http reply?
There might be a workaround.
Can you provide the following?
- Make/model of camera
- What is your monitor config?
- Have you tried any URL's other than /mjpeg/snap.cgi?
- What exactly does zoneminder show in the logs when you try to view the snapshot stream? It should tell us exactly where in the code it is stopping.
Can you provide the following?
- Make/model of camera
- What is your monitor config?
- Have you tried any URL's other than /mjpeg/snap.cgi?
- What exactly does zoneminder show in the logs when you try to view the snapshot stream? It should tell us exactly where in the code it is stopping.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
-
- Posts: 93
- Joined: Thu Jan 17, 2013 6:13 pm
Re: Can I use a jpeg input missing content-type in the http reply?
Sorry for the late reply. I was getting something like ERR [Unrecognised content type ''"]
Cam: Wansview NCM625GA I have it working with RTSP:
http://marc.merlins.org/perso/linuxha/p ... l#NCM625GA
I have found no other URLs than snap.cgi to get jpegs.
Cam: Wansview NCM625GA I have it working with RTSP:
http://marc.merlins.org/perso/linuxha/p ... l#NCM625GA
I have found no other URLs than snap.cgi to get jpegs.