BUG: Unknown content type with lumenera cameras
This is a megapixel lumenera camera. When connecting to the mjpeg stream, motion says:
unknown Content-Type
It looks like this to me. I don't know if there is anything weird in here or not!
HTTP/1.0 200 OK
Date: Fri, 06 May 2005 18:07:06 GMT
Server: Boa/0.94.14rc18uC
Accept-Ranges: bytes
Connection: close
Cache-Control: no-cache
Pragma: no-cache
Content-Type: multipart/mixed; boundary="-lumenera"
Test case
Environment
Motion version: |
3.2.1 snap 15 |
ffmpeg version: |
|
Shared libraries: |
xmlrpc, |
Server OS: |
Fedora Core 2 |
--
TWikiGuest - 06 May 2005
Follow up
The raw file is a help but you probably have to either decrease the picture format OR change the 100000 hardcoded number in the sniffer C program so that we can see at least one boundary header between two frames.
The first header is strange.
HTTP/1.0 200 OK
Date: Fri, 06 May 2005 18:07:06 GMT
Server: Boa/0.94.14rc18uC
Accept-Ranges: bytes
Connection: close
Cache-Control: no-cache
Pragma: no-cache
Content-Type: multipart/mixed; boundary="-lumenera"
Normally the content type header looks like this
Content-Type: multipart/x-mixed-replace; boundary=--mp-boundary
or this
Content-Type: multipart/x-mixed-replace; boundary=--BoundaryString
or this
Content-Type: multipart/x-mixed-replace; boundary=--myboundary
Motion expects this (netcam.c)
if (strcmp("multipart/x-mixed-replace", conttype) =
0) {=
So this is where the problem is.
You can try and hack Motion to make it work with your camera.
--
KennethLavrsen - 08 May 2005
Follow up
Indeed, I changed the line in netcam.c to:
if (strcmp("multipart/x-mixed-replace", conttype) == 0 || strcmp("multipart/mixed", conttype) == 0) {
and it grabbed the stream from this camera successfully, and is watching for motion. I don't know how (or if) you'd fix this officially, so I'll step out and let Kit decide what do to.
Thanks!
-- Aaron - 09 May 2005
I propose we implement your easy fix. I see no reason why not.
--
KennethLavrsen - 09 May 2005
Fix record
I have decided to implement the code as suggested. Both in 3.2.1 and 3.1.20
--
KennethLavrsen - 22 May 2005