-
Notifications
You must be signed in to change notification settings - Fork 95
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
jpeg: read: camera: invalid JPEG format: uninitialized Huffman table #20
Comments
It looks like it is valid for MJPEG frames to omit the Huffman table and expect some default to be used. Browsers do that, they will load such an image even if not valid, probably by adding some default table. I am guessing you are on Linux and don't use provided binaries but you compiled with native image/jpeg support and with native V4L, right? It will probably work with OpenCV build, with libjpegturbo it will probably be a different error. Problem is, it is not correct to just add tables as in your link, will need to detect first if that is the issue, my cam, for example, returns valid JPEG with Huffman tables from MJPEG. One way is to match if the error string contains |
Ubuntu 18.04, using the latest Docker HUB release. Camera works as expected in |
Yes, docker image is built without CGO, and uses native image/jpeg and native V4L. Can you try with binaries from releases, and paste error messages, this one https://github.com/gen2brain/cam2ip/releases/download/1.5/cam2ip-1.5-64bit.tar.gz uses libjpegturbo and V4L, and this one https://github.com/gen2brain/cam2ip/releases/download/1.5/cam2ip-1.5-64bit-cv2.tar.gz libjpegturbo and OpenCV. |
Is there any reason not to include the solution to this issue in the docker image release? |
@carlos-sarmiento the solution should not be included unconditionally, it should probably check error string for Huffman table, a little ugly, but if nothing else possible I agree. I don't have the webcam that behaves like that or time to work on this now. PRs are welcome. |
I have a RPI3 with a Logitech C310, and docker-image gave me I used cam2ip-1.6-RPi3.tar.gz and console is spammed with the following during a stream:
I can't really help any more than that, but errormessages aside, the camera does stream. |
Same issue on amd64 with a Logitech C510. Doesn't work with Docker, works just fine with the relevant release - I created davralin/cam2ip witch contains the amd64-build for now, as I have to use this in a container (deployed on k8s). |
@davralin so you use OpenCV or native build? |
Native build I'd guess? Source is here: https://github.com/davralin/cam2ip-docker/blob/main/run.sh |
Hi, same issue with https://github.com/gen2brain/cam2ip/releases/download/1.6/cam2ip-1.6-RPi.tar.gz When I access to http://localhost:56000/html, I got this : When I access to http://localhost:56000/jpeg, I got this : And when I access to http://localhost:56000/mjpeg, I got this big one :
|
Okay, the "edit button" of Github doesn't work for me so I post again... I forgot to specify : I'm using ArchlinuxARM on a Raspberry 1B. Also, I miswrote : I was using cam2ip-1.6-RPi-nocgo.tar.gz |
How to use it now? |
To use what, something that is not implemented? I guess you would have to implement it first. Look for alternative approach above and send PR if you can. |
Using a Logitech webcam I'm getting:
I'm guessing this is a similar problem to this fix:
blackjack/webcam#7 (comment)
The text was updated successfully, but these errors were encountered: