0

I have Raspberry Pi 3 and I'm using latest version of Raspbian.

I have Logitech C910 Webcam and I have plugged the webcam into USB hub with external power. (although the webcam seems to work just fine without powered hub)

I'm trying to get the Raspberry Pi to work as a monitoring system for the webcam. So all I need is live video from the webcam in full screen at the attached display on Raspberry's HDMI-out.

I have tried many different solutions for this. I have tried: VLC, Cheese, some others i can't remember anymore and mplayer. Mplayer seems to work best, the frame rate is very good and everything works fine, except the colors are all wrong! There is a lot of bright RED and Blue and some green But all the colors are totally wrong... See the picture below Wrong colors in webcam Now with some other applications I got right colors but then the webcam slowed down to like 5fps.

I also tried to use Windows 10 IoT and the webcam worked well there except that it used almost 100% of CPU power and framerate was ~ 5fps. I think that's because Windows 10 can't use the GPU so the video playback is done all by CPU.

In Linux the GPU works and mplayer is able to show the stream at full speed, but the colors are wrong :(

So any ideas how I could correct the colors?

And I have tested two other Logitech webcams and they all have the same problem :(

  • Welcome to Raspberry Pi! Please take the tour and visit the helpcenter to see how things work here. If you found an answer feel free to post it yourself as an answer and preferably not as an edit to the question. – Ghanima Sep 7 '16 at 7:51
1

Problem solved! I had to use "v4l2-ctl" to adjust brightness, contrast and saturation.

But still mplayer override those adjustments on startup. So what I ended up doing was:

Created file "mplayer.settings" with lines:

run "v4l2-ctl --set-ctrl brightness=52"
run "v4l2-ctl --set-ctrl contrast=16"
run "v4l2-ctl --set-ctrl saturation=29"

and then added this to my mplayer command line:

-input file=mplayer.settings

So what this does is mplayer starts the playback and then runs those three commands to fix the properties and now I got correct colors :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.