Prusa-Link
Prusa-Link copied to clipboard
PrusaLink produces invalid JPEG images from cameras on MacOS
JPEG Images encoded from the blob:http://...
URLs used by PrusaLink are invalid and will not open in Safari on MacOS (Ventura 13.0.1) or iOS (16.2). The image files produced cannot even open in Photoshop, which complains: "invalid SOS JPEG marker (Ss, Se, Ah, or Al)" and refuses to open them.
Interestingly, Chrome, Brave, or Firefox browsers on the same machine can open them.
The issue is mentioned here (https://gitlab.com/libtiff/libtiff/-/issues/266).
I wonder if using a newer version of the libjpeg library in the PrusaLink image is the solution?
It seems this is bug is predominantly affecting Logitech cameras. Firefox is doing the best job at correcting the corrupt data, but that's far from ideal, obviously.
I have noticed this but I don't know the solution, is there any magic corruption detection and correction in libjpeg-turbo I could try? One of our cameras seemed like it sometimes forgot to send the last byte of the image. Very annoying
My Logitech camera also shows the image in the web browser but downloaded snapshots are not working normally. Neither Windows Image Viewer, Windows Paint or Paint.NET can open this file. Browsers still can open it though.
Editor shows that the file has a "!AVI1" in the first line. Most commonly used tag seems to be "!JFIF".
GIMP can open it and shows exif data 8 8 8 Bits, 1080x1920px, top left, inch, 300 300 resolution and sRGB.
Does this help you? Quite old but seems to be related!
https://github.com/libjpeg-turbo/libjpeg-turbo/issues/157
So far, we've seen just one camera behave weird. It was also a Logitech and its frames seemed to be missing a single byte at the end. Please share your camera models. Plonk some frames on here if you can, so I have something to play with. Thank you
It seems that Logitech C-Models are effected (mine is C615) and that they utilize a proprietary extension to the Motion-JPEG format, in which H.264 data is attached to the various JPEG key and delta frames in the APP0 field as shown when inspecting the data of any frame "AVI1". They also occasionally fill the buffer with two SOI markers, which could cause problems.
The picture frame in the linked issue hat the "AVI1" tag, I don't think its related to a missing byte here.
Logitech C270
Although I can get the images to show up in PrusaLink in Vivaldi (Chrome engine), PrusaConnect in the same browser shows the "Snapshot is not available" image.
I am seeing this issue with a Logitech HD Webcam C525