Camera control settings

edited July 1 in Feature Requests
It would be interesting to be able to change the various settings of the cams such as contrast, brightness and everything that is possible to do, from the Server menu, with the possibility of course to be able to automatically load the settings at boot of Repetier Server.
I think it is very easy to implement this using "v4l2-ctl".
Example, from shell without sudo this is the output of "v4l2-ctl --all" of my cam:

pi@Raspberry1:~ $ v4l2-ctl --all

Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : UVC Camera (046d:0825)
Bus info : usb-3f980000.usb-1.4
Driver version: 4.19.66
Capabilities : 0x84A00001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 1280/960
Pixel Format : 'MJPG'
Field : None
Bytes per Line : 0
Size Image : 1632000
Colorspace : sRGB
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Default
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 1280, Height 960
Default : Left 0, Top 0, Width 1280, Height 960
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 1280, Height 960
Selection: crop_bounds, Left 0, Top 0, Width 1280, Height 960
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 15.000 (15/1)
Read buffers : 0
brightness (int) : min=0 max=255 step=1 default=128 value=128
contrast (int) : min=0 max=255 step=1 default=32 value=32
saturation (int) : min=0 max=255 step=1 default=32 value=32
white_balance_temperature_auto (bool) : default=1 value=1
gain (int) : min=0 max=255 step=1 default=64 value=192
power_line_frequency (menu) : min=0 max=2 default=2 value=2
white_balance_temperature (int) : min=0 max=10000 step=10 default=4000 value=8000 flags=inactive
sharpness (int) : min=0 max=255 step=1 default=24 value=24
backlight_compensation (int) : min=0 max=1 step=1 default=0 value=0
exposure_auto (menu) : min=0 max=3 default=3 value=3
exposure_absolute (int) : min=1 max=10000 step=1 default=166 value=417 flags=inactive
exposure_auto_priority (bool) : default=0 value=1

With the command "v4l2-ctl --list-ctrls-menus" only the list of possible editable controls appears.
If I want to change the contrast, for example, I just need to ask this: v4l2-ctl --set-ctrl brightness=10
It would therefore be interesting if from the interface, perhaps with sliders, I could change everything that is possible, without going through mjpg-streamer.



Comments

  • Yes, would be nice. Would be part of a later planned webcam upgrade. Should also work on mac and windows so this is just a tiny item in the puzzle.
  • Repetier said:
    Yes, would be nice. Would be part of a later planned webcam upgrade. Should also work on mac and windows so this is just a tiny item in the puzzle.

    Really nice, thanks!
  • At the moment I do it manually by launching a simple script in the cron to reboot, changing the values I need, but I hope for integration in the interface:

    #!/bin/bash
    v4l2-ctl --set-ctrl=power_line_frequency=2
    v4l2-ctl --set-ctrl=exposure_auto=1
    v4l2-ctl --set-ctrl=exposure_absolute=80



  • You can also put it into /usr/local/Repetier-Setup/bin/mjpgStart which is what starts mjpg-streamer. Last line start usb webcam, line 25 starts raspicam. That it is directly effective.
Sign In or Register to comment.