Comments (3)
Here is the documentation for extended video control - Video controls
from uvc-gadget.
@peterbay
I followed your instruction, but some settings weren't exposed (i.e. sharpness, power_line_frequency).
My PR: showmewebcam/showmewebcam#65
USB host output:
$ v4l2-ctl -d /dev/video0 --list-ctrls
brightness 0x00980900 (int) : min=0 max=100 step=1 default=50 value=50
contrast 0x00980901 (int) : min=0 max=200 step=1 default=100 value=98
saturation 0x00980902 (int) : min=0 max=200 step=1 default=100 value=105
RPi output:
# cat /sys/kernel/config/usb_gadget/piwebcam/functions/uvc.usb0/control/processing/default/bmControls
255
6
# v4l2-ctl -d /dev/video0 --list-ctrls
User Controls
brightness 0x00980900 (int) : min=0 max=100 step=1 default=50 value=50 flags=slider
contrast 0x00980901 (int) : min=-100 max=100 step=1 default=0 value=-2 flags=slider
saturation 0x00980902 (int) : min=-100 max=100 step=1 default=0 value=5 flags=slider
red_balance 0x0098090e (int) : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
blue_balance 0x0098090f (int) : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=3 default=1 value=1
sharpness 0x0098091b (int) : min=-100 max=100 step=1 default=0 value=20 flags=slider
color_effects 0x0098091f (menu) : min=0 max=15 default=0 value=0
rotate 0x00980922 (int) : min=0 max=360 step=90 default=0 value=0 flags=modify-layout
color_effects_cbcr 0x0098092a (int) : min=0 max=65535 step=1 default=32896 value=32896
Codec Controls
video_bitrate_mode 0x009909ce (menu) : min=0 max=1 default=0 value=0 flags=update
video_bitrate 0x009909cf (int) : min=25000 max=25000000 step=25000 default=10000000 value=25000000
repeat_sequence_header 0x009909e2 (bool) : default=0 value=0
h264_i_frame_period 0x00990a66 (int) : min=0 max=2147483647 step=1 default=60 value=60
h264_level 0x00990a67 (menu) : min=0 max=11 default=11 value=11
h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=3 default=0 value=0
exposure_time_absolute 0x009a0902 (int) : min=1 max=10000 step=1 default=1000 value=1000
exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=0
auto_exposure_bias 0x009a0913 (intmenu): min=0 max=24 default=12 value=12
white_balance_auto_preset 0x009a0914 (menu) : min=0 max=10 default=1 value=1
image_stabilization 0x009a0916 (bool) : default=0 value=0
iso_sensitivity 0x009a0917 (intmenu): min=0 max=4 default=0 value=0
iso_sensitivity_auto 0x009a0918 (menu) : min=0 max=1 default=1 value=1
exposure_metering_mode 0x009a0919 (menu) : min=0 max=2 default=0 value=0
scene_mode 0x009a091a (menu) : min=0 max=13 default=0 value=0
JPEG Compression Controls
compression_quality 0x009d0903 (int) : min=1 max=100 step=1 default=30 value=30
#
Do you have any idea?
from uvc-gadget.
UVC camera controls initialization has several steps.
-
UVC gadget has defined available controls in f_uvc.c and host computer read these settings after gadget initialization.
-
uvc-gadget obtains available and enabled controls from v4l2 device and store info about these settings.
V4L2: Supported control Brightness (V4L2_CID_BRIGHTNESS = UVC_PU_BRIGHTNESS_CONTROL)
V4L2: V4L2: min: 0, max: 100, step: 1, default: 50, value: 62
V4L2: UVC: min: 0, max: 100, step: 1, default: 50, value: 62
V4L2: Supported control Contrast (V4L2_CID_CONTRAST = UVC_PU_CONTRAST_CONTROL)
V4L2: V4L2: min: -100, max: 100, step: 1, default: 0, value: 20
V4L2: UVC: min: 0, max: 200, step: 1, default: 100, value: 120
- Host computer asked available controls. If control is disabled or not available, then uvc-gadget returns an error code to a host computer.
UVC: PROCESSING_UNIT - GET_INFO - UVC_PU_BRIGHTNESS_CONTROL
UVC: PROCESSING_UNIT - GET_MIN - UVC_PU_BRIGHTNESS_CONTROL
UVC: PROCESSING_UNIT - GET_MAX - UVC_PU_BRIGHTNESS_CONTROL
UVC: PROCESSING_UNIT - GET_RES - UVC_PU_BRIGHTNESS_CONTROL
UVC: PROCESSING_UNIT - GET_DEF - UVC_PU_BRIGHTNESS_CONTROL
UVC: INPUT_TERMINAL - GET_INFO - UVC_CT_IRIS_ABSOLUTE_CONTROL - DISABLED
You must check output messages from uvc-gadget and log from a host computer. If the host computer asked for all available settings and all are's enabled.
from uvc-gadget.
Related Issues (20)
- Show when uvc-gadget is ready, if led is on HOT 1
- brightness setting in camera.txt is being ignored HOT 4
- What is the effect of capping the frame buffer to 30fps?
- How to use frambuffer devices? HOT 1
- How to disable auto exposure and set manual exposure time?
- Don't include system's Linux tree when compiling uvc-gadget HOT 1
- VS request completed with status -18. HOT 1
- UVC: Possible USB shutdown requested from Host, seen during VIDIOC_DQBUF HOT 6
- Request: Support higher resolution than 1920 x 1080 even if we have to lower frame rate
- v4l2-ctl list-devices crashes pi zero
- Support new AWB greyworld algorithm?
- only 24fps achived when stream static vga image HOT 3
- Mac OS 12.0.1 Monterey fails to detect the device
- High CPU usage after capture on RPi Zero running showmewebcam HOT 1
- separate handling of red and blue color balance
- support unicam / libcamera frame sources HOT 1
- uvc-gatget don't work on raspberry pi 4 R1.4 HOT 3
- fails with 6.1.21+ on Raspberry Pi Zero W rev 1.1
- [IDEA][PI] Screen capture through UVC device HOT 3
- Stream flickers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uvc-gadget.