Skip to content

Fix mjpeg source for Foscam G2 camera #1258

@gambalaya

Description

@gambalaya

I have a Foscam G2 camera configured to supply an mjpeg secondary stream from url http://x.x.x.x/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx , which works directly in Chrome browser and VLC. When attempting to use as a go2rtc source there is continuous logging of malformed MIME header: missing colon messages (and no output). The camera is indeed producing a malformed MIME header as seen with curl -i response:

HTTP/1.1 200 OK
Content-type:multipart/x-mixed-replace;boundary=ThisString

--ThisString
--ThisString
Content-type:image/jpeg
Content-Length:32514

Since other apps like Chrome and VLC can handle the camera stream, any chance go2rtc can ignore malformed lines? I can see the error is coming from "mustHaveFieldNameColon" function in golang source - https://github.com/golang/go/blob/master/src/net/textproto/reader.go per RFC 7230.
Thanks.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions