Hello, I'm trying to use OpenCV with Intel Media SDK backend to write a programm which can write video by intel gpu with H264 very fast.
I used code from OpenCV tutorial for Intel Media SDK backend.
int fourcc = VideoWriter::fourcc('H', '2', '6', '4'); VideoWriter writer(filename, CAP_INTEL_MFX, fourcc, fps, frameSize, isColor=true);
However, the video files that have been written are very large. For about 1 minute the file is already 300 MB large.
In gstreamer I can set parameters for H.264, and with ffmpeg in terminal I can also set parameters for H.264. But how can I set parameters in OpenCV? Or is there any other reason that the files are so large?
If someone here has experience with Media SDK in OpenCV, please tell me how you have worked with it. Thanks!
You have answered one of my questions in your other post, I am still not clear your process to build the MediaSDK backend enabled OpenCV application.
Before you build the application, you should rebuild OpenCV library in order to add Media SDK to OpenCV:
OpenCV should be rebuilt for this:
My understanding is, you have to build your application after you did this.