Specify ffmpeg encoder in VideoCapture [closed]
I'm using an Orange Pi with a built in CSI webcam. On the command line with ffmpeg I can get 30+ frames a second no problem using the hardware-accelerated cedrus encoder.
From OpenCV, using the v4l2 bindings is much slower - I get about 10 frames per second in the best case. And it's no better if I specify CAP_FFMPEG because it isn't using the hardware-accelerated encoder.
Is there a way to either (a) specify an encoder in OpenCV VideoCapture (API suggests no) (b) a straightforward way to pipe output from an ffmpeg process to OpenCV VideoCApture (c) is there a third method I'm missing?
thanks philip
" is there a third method I'm missing?" -- use libffmpeg directly, to aqcuire images, convert them to cv::Mat
(in other words, - sidestep opencv's VideoCapture class, which is a nice commodity, but for sure not optimal in all cases)
berak - thanks. I can't find good documentation on this. Is there an example you could point me to?
sorry, no i can't.