Opened 6 years ago
Last modified 6 years ago
#2305 new enhancement
v4l2 user control configuration mechanism
Reported by: | elkq | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avdevice |
Version: | git-master | Keywords: | v4l2 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
avdevice/v4l2.c does not provide a v4l2 user control ( V4L2_CID_* ) listing and configuration mechanism, see http://linuxtv.org/downloads/v4l-dvb-apis/control.html#control-id
something similar to the capabilities offered by v4l2-ctl --set-ctrl=<ctrl>=<val>[,<ctrl>=<val>] is needed
Change History (4)
comment:1 follow-up: ↓ 3 Changed 6 years ago by cehoyos
- Priority changed from normal to wish
- Version changed from unspecified to git-master
comment:2 Changed 6 years ago by elkq
I apologize if I am not using the correct format to report this issue.
Please correct me so I might learn the appropriate approach.
In https://lists.ffmpeg.org/pipermail/ffmpeg-user/2012-May/006601.html Geotz Dapp asks for an option to ioctl V4L2_CID_AUTO_WHITE_BALANCE false, and an option to ioctl
(from /usr/include/linux/videodev2.h) V4L2_CID_FOCUS_AUTO to V4L2_FOCUS_MANUAL (0).
In addition would very much like to have options to ioctl V4L2_CID_EXPOSURE to zero, V4L2_CID_AUTOGAIN to false, V4L2_CID_CHROMA_AGC to false, V4L2_CID_HUE_AUTO to false, V4L2_CID_AUTOBRIGHTNESS to false.
comment:3 in reply to: ↑ 1 Changed 6 years ago by elkq
Replying to cehoyos:
As-is, this is an invalid ticket.
Please describe in more detail which v4l2 feature FFmpeg is missing.
Does the comment above provide sufficient detail to make this a valid ticket?
comment:4 Changed 6 years ago by dronus
I think using v4l2-ctl before ffmpeg would be ok if it would work.
Currently ffmpeg does a mess on the settings made by v4l2-ctl. The pixel format is not honored, but must be set by -pixel_format. Doing so it seems tend to reset other parameters, eg. exposure settings or something on some cameras. As those cannot be controlled by ffmpeg, they must be reapplied by v4l2-ctl after starting the capture, a need which renders the first seconds of the capture useless.
So ffmpeg should either provide the full range of controls like cehoyos suggested (much work to do) or just keep whats set up and honor it. As v4l2.c matches up libav and v4l2 pixel formats it may be tricky to keep the already set v4l2 format and honor it, however ffmpeg could fail if no support is possible and suggest a compatible format to be set with v4l2-ctl.
As-is, this is an invalid ticket.
Please describe in more detail which v4l2 feature FFmpeg is missing.