Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mjpeg source for Foscam G2 camera #1258

Closed
gambalaya opened this issue Jul 15, 2024 · 5 comments
Closed

Fix mjpeg source for Foscam G2 camera #1258

gambalaya opened this issue Jul 15, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gambalaya
Copy link

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.

@AlexxIT AlexxIT added the enhancement New feature or request label Jul 16, 2024
@AlexxIT AlexxIT self-assigned this Jul 16, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Jul 16, 2024

I don't know if it's difficult to give me access to the stream. It would make it a lot easier to fix.

@gambalaya
Copy link
Author

Thanks, I have made the stream available, will DM the url to you via discord.

@AlexxIT AlexxIT changed the title Foscam mjpeg source floods log with malformed MIME header: missing colon messages (and no output) Fix mjpeg source for Foscam G2 camera Jul 18, 2024
@AlexxIT AlexxIT added this to the v1.9.5 milestone Jul 18, 2024
@gambalaya
Copy link
Author

I rebuilt from the latest master and can confirm the camera fix works from my end - thanks for such an amazing quick response! Closing the issue as fixed in v1.9.5.

@AlexxIT
Copy link
Owner

AlexxIT commented Jul 19, 2024

You don't needs to rebuild anything manually
https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#go2rtc-dev-version

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 28, 2024

@AlexxIT AlexxIT closed this as completed Oct 28, 2024
dagleaves pushed a commit to EscapeOracle/go2rtc that referenced this issue Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants