I want to zoom the camera while video recording. Rpi Camera module V2 is 8 megapixel that means 3280 x 2464 pixel resolution. I am recording a video in 720P resolution that I am using almost 2 megapixels so I can further zoom the camera upto 8 megapixels.
My question is How to implement zooming features while recording video? Suppose I want to control digital zoom using some potentiometer which is connected with GPIOs of Rpi, by varying the pot resistance I want to zoom in and zoom out or I want to control using the keyboard input.
Whatever the way of control(hardware or software) the main mechanism is the same means I have to give some value by hardware or software input, according to this value I have to generate the resolution or zooming area and apply to this resolution to camera module so that it can focus on that resolution or zooming area while recording video.
How to implement this total procedure? Please give some idea to implement this thing. Thank you.