1

I'm referring to the modes listed here.

When capturing video with raspivid, the -md option allows overriding the default mode selection heuristic.

I need to find out how to achieve the same when using the V4L2 driver, since that's what the streaming solution I have set up uses. Poring over the hundreds of options of v4l2-ctl yielded no enlightenment...

2 Answers 2

1

Official word is that sensor mode selection is not possible through V4L2, because the API does not offer the appropriate control. See this Raspberry PI forum answer.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Jan 3, 2020 at 22:20
1

I ran into this same problem and it was relatively simple to add support for it to the V4L2 API, so I did.

v4l2-ctl --set-ctrl=sensor_mode=2

I submitted my patch but it was rejected because it might mean a minute or two of extra maintenance work for the kernel developers once every few months, which is only required as they haven't yet gotten their code merged into the mainline Linux kernel.

If you really want the functionality you will have to build the kernel yourself, and if you can do that, you can apply the patch from that link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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