Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I am not sure why are you setting these parameters after opening the video :

capture.set(cv::CAP_PROP_FOURCC, cv::VideoWriter::fourcc('M', 'J', 'P', 'G'));
capture.set(cv::CAP_PROP_FPS, 30);
capture.set(cv::CAP_PROP_FRAME_WIDTH, 3840);
capture.set(cv::CAP_PROP_FRAME_HEIGHT, 2160);

But anyway, a better alternative is using Gstreamer c++