Motion - Bug Report 2005x 05x 06x 174416

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

BugReportForm edit

TopicTitle Unknown content type with lumenera cameras
BugStatus Released
AssignedBugTo ChristopherPrice
SubmittedBy aaron
Topic attachments
I Attachment Action Size Date Who Comment
lumenera.rawraw lumenera.raw manage 98 K 06 May 2005 - 17:54 UnknownUser raw output from mjpegsnif. File is only 100K, but I bet the first frame is at least 150K! Is that OK?
Topic revision: r7 - 27 May 2005, KennethLavrsen
Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.