Hello opencv community,
I struggle with an problem since days. (Ubuntu 18.04.05)
In general I want to grabb a video input (video grabber card sdk, no opencv involved), process the frames and write the frames with the opencv cv::ViedeoWriter in c++. Everything works just fine so far, but the program is used on an old pc with an i5 2400 sandy bridge. So the regular cv::CAP_FFMPEG
or cv::CAP_GSTREAMER
backend are to slow here and I run out of memory.
After a while I found the cv::INTEL_MFX
. But whatever I do, when I build opencv, there is written
Intel Media SDK: NO
I installed the Intel Media SDK with Intel OpenVino and the corresponding instructions, I tried to install the driver and all dependencies, set all the env. variables, but no way. vainfo works just fine:
libva info: VA-API version 1.8.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.8 (libva 2.1.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 20.2.0 (97e2ea9)
somehow, even with “Intel Media SDK: NO” in the build, I could manage to use the media sdk for my dev system. But the compiled code does not work on my old deployment system (much older hardware/driver on deployment).
So tried to do the same on my deployment system, but for the build and when I execute cv::getBuildInformation()
there is no Intel Media SDK. For my dev system cv::getBuildInformation()
shows:
Intel Media SDK: YES (/mnt/nfs/msdk/lin-18.4.1/lib64/libmfx.so)
which is weird, because this path does not exist, but it works.
I assume that the driver I found at github media-driver (see link above) is not working. I mean the mentioned architectures of CPUs do not include the sandy bridge. But sandy bridge already had hw acceleration for video/encoding and vainfo shows:
vainfo: VA-API version: 1.8 (libva 2.1.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Desktop - 2.1.0
My questions, is there an older package I have to install to make my old sandy bridge work with hw encoding/cv::INTEL_MFX? How can I configure my environment, so the Media SDK is detected by opencv for the build?
In addition my build command:
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_TBB=ON
-D WITH_CUBLAS=1
-D WITH_V4L=ON
-D WITH_OPENGL=ON
-D OPENCV_GENERATE_PKGCONFIG=ON
-D OPENCV_ENABLE_NONFREE=ON
-D OPENCV_EXTRA_MODULES_PATH=…/…/opencv_contrib/modules
-D WITH_MFX=ON …
Open for every hint,
BR Michael