Videostream 90% broken

Aug 15, 2007 at 12:38 PM
Edited Aug 15, 2007 at 1:57 PM
i have the problem, that 10% of the webcam-video is perfectly fine (on the top), but the rest is flickering and shows strange colors.
i saw that someone else had this problem, but i found no answer for me...
so, please help =)

my hardware:
webcam: logitech quickcam pro 5000 (PID LZ712BN)
CPU: Intel Pentium III Xeon Model B
OS: WinCE 5

i bought this camera extra for this use, but it does not the right job =)
one time i replugged the cam it showed the perfect video - but as i tried to find out what is going on now (and what i did wrong before), now the picture shows crab again...
yes, i know - never touch a running system =)
maybe it was luck, but now i'm totally out of luck and it doesn't work aymore - in none of the 4 usb-ports....
i only see this washed up video.... grrrrrrr....
(ARGH - HULK is getting mad.... )

so, i'm calming down,
but please help...


btw: in the console it tells me: "Decoding failed, hr = 0x80004005"
Aug 15, 2007 at 2:42 PM
Hi Schaffel

I get a flickering screen if i set the frame rate too high and camtest2 reports "Missed Frames". But I guess the "Decoding failed, hr = 0x80004005"-Message might also be a reason. The error means that there was an error decoding a jpeg-frame received from the camera.

I had the same error and changed the function that decodes the Frames read from the camera (functions GetBitMapImage in mjpeg2bmp.cpp).
I use the following Code to decode a frame:

IImage *pImage = NULL;
hr = pImagingFactory->CreateImageFromBuffer(pLocal, dwSize+512, BufferDisposalFlagGlobalFree, &pImage);

Then in DisplayFrame I draw the image to the window:
pImage->Draw(hdc, pRect, NULL);

This solved the "Decoding failed"-Error. Maybe it helps with your flickering-problem.

Aug 16, 2007 at 3:20 PM
thx for trying to help me...
well, let's say it's a little better now =)
better because the failure-message is gone.
but the main problem - the strange video - is still the same...

does anybody know how to get a clear video/picture that is not 90% scrambled.

it's totally freaking me, that one time i started the test-prog it showed me a perfect picture...

really strange...

you should know that i decided to become a programmer because computer only know right or wrong - no mixings =) and now the pc is fooling me. well, maybe it's my natural anti-pc-aura =)

well, cu,
Sep 18, 2007 at 1:10 PM

I'm currently working with a Sonix based webcam that has a similar problem: the bottom 25% part of the image is either pixelated or grey. This is due to the jpeg image data being incomplete. I've tried combinations of settings, such as dwInterval (frame rate), dwTimeout (time out duration when trying to get the next frame) without much effect. Although when I switch the frame size from 640x480 to 320x240 the image corruption disappears. I guess this is a timing issue, when the camera is compressing the raw data to a JPEG, this must be timing out early and so produces an incomplete jpeg image.

I also use to see this problem using the logitech webcam, I solved this by using a lower frame rate.

Further Info

Chinese Sonix Webcam Settings:

1 640 x 480 MJPEG Vid Format ID: 1, FPS: 30 20 15 10 5 1
2 352 x 288 MJPEG Vid Format ID: 1, FPS: 30 20 15 10 5 1
3 320 x 240 MJPEG Vid Format ID: 1, FPS: 30 20 15 10 5 1
4 176 x 144 MJPEG Vid Format ID: 1, FPS: 30 20 15 10 5 1
5 160 x 120 MJPEG Vid Format ID: 1, FPS: 30 20 15 10 5 1
ID Range Value Flags Name
18, 65472-127, 26, Brightness
19, 0-127, 38, Contrast
20, 65496-40, 0, Hue
21, 0-100, 5, Saturation
22, 0-255, 125, Sharpness
23, 1-80, 50, Gamma
26, 0-1, 0, Backlight Compensation
28, 0-2, 1, Power Line Frequency

Actual dwInterval times
333333 500000 666666 1000000 2000000 10000000

The camera only allows dwInterval = -1 or 2000000, dwTimeout has little effect

I'd greatly appreciate any help or info on how I can get my Sonix camera to work corruption free

Mark Bailey