jacksonliam / mjpg-streamer

Fork of http://sourceforge.net/projects/mjpg-streamer/
3.03k stars 1.23k forks source link

Video stream has corrupt frames every few seconds #371

Open Itox001 opened 1 year ago

Itox001 commented 1 year ago

Hello, first, thanks a lot for your work on this project. I have stumbled upon an issue: I have noticed that there is a corrupt frame in my video stream every now and then. I can see it on the /webcam/?action=stream endpoint every few seconds, but sometimes it takes longer or shorter. It looks like this: image

Next frame for comparison: image

I noticed it because I am taking timelapses of my 3D prints with the script getting captures form the /webcam/?action=snapshot endpoint, and sometimes the artifacts show in the resulting video. I thought it was a problem with the timelapse rendering first, but then I noticed that even without the printer involved, I can see the same artifacts on the stream directly on the endpoint.

I tried compiling the executable in debug mode, but saw nothing unusual in the logs. Any idea?

Setup: Raspberry Pi 3B Debian GNU/Linux 11 (bullseye) Kernel: Linux 5.15.76-v8+

Camera Logitech C920 1920x1080, 7.5 fps

username7291 commented 1 year ago

Which Browser? Try pass the stream to ffmpeg it gives your more Details about the errors. I had little errors in the Picture with Logitech webcam, with a 2m thick good shilded Cable, adding 100µF near the Cam almost fixed it. 2m is well into spec and my Raspberry delivers over 5.00V. Logitech has build in a Resistor on VCC and use more power than other Webcams that may make problems.