Very dark image from webcam

What is the problem?
I finally managed to get my Eken H9 action camera to work as a webcam on the Pi. However, the image is very dark, nearly impossible to see anything.

What did you already try to solve it?
I tried different configs in octopi.txt with the same results.

Is there a way to adjust the brightness?

you could try this which worked when I needed to adjust my different model webcam
https://discourse.octoprint.org/t/changed-the-video-feed-brightness-contrast-and-settings-for-my-logitech-usb-video/1103

I'm having a deja vu moment with another thread where we just talked about this. Only the Pi-related camera supports all the bells and whistles as seen in config.txt.

I solved the problem by removing the -y in the config. Thanks all

1 Like

Hi, writing here so it gets registered somewhere.

I have an old logitech ZC0305 webcam.

Some of the solutions gave everywhere, doesn't work for 2019 octoprint (I'm in 1.3.11)

Basically, I created a udev rule to configure my camera. I've found that the issue was the "power_line_frequency". It was configured as "0", but when changing to "1" 50htz (220V-50Hz) the webcam started working as expected

This is the process I used:

On one browser tab, I opened http://octopi.local:8080 (use your server name here)
So I see a static and a streaming image.

# Discovered my webcam
$ lsusb
Bus 001 Device 005: ID 0ac8:305b Z-Star Microelectronics Corp. ZC0305 Webcam

# Discovered my device
$ v4l2-ctl --list-devices

# What could I set in my webcam?
$ v4l2-ctl -d /dev/video0 --list-ctrls

# After a lot of testing, this was the one that fixed
v4l2-ctl -d /dev/video0 --set-ctrl=power_line_frequency=1

# Get the filters for udev
# udevadm info --attribute-walk --name=/dev/video0
  looking at device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{dev_debug}=="0"
    ATTR{index}=="0"
    ATTR{name}=="gspca main driver"


  looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0':
    KERNELS=="1-1.5:1.0"
    SUBSYSTEMS=="usb"
    DRIVERS=="gspca_zc3xx"
...

  looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5':
    KERNELS=="1-1.5"
    SUBSYSTEMS=="usb"
    DRIVERS=="usb"
    ...
    ATTRS{idVendor}=="0ac8"
    ATTRS{idProduct}=="305b"

# Then get the rules to identify my webcam on udev from those obtained before
echo 'KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ac8", ATTRS{idProduct}=="305b", RUN="/usr/bin/v4l2-ctl -d $devnode --set-ctrl=power_line_frequency=1"' | sudo tee /etc/udev/rules.d/99-logitech-webcam-50htz.rules


# Testing
udevadm test $(udevadm info --query=path --name=/dev/video0) | less
# Also could reload:
# udevadm control --reload
# udevadm trigger


Finally I rebooted

Most of this came from 
https://wiki.archlinux.org/index.php/Webcam_setup
2 Likes

Hi Erik-Alexandre_Marle,

Sorry to respond to a very old thread. But could you please help in setting up the Eken H9R as camera with octoprint.
I searched in many forums but no luck yet on how to setup the Eken.
It will super helpful for me to get it work.

Thanks in advance
-Ram