- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
openvino_2019.1.133
Can cv::VideoCapture run video decoding with hardware acceleration (va api)?
Have a try with 'CAP_INTEL_MFX' like below,but "cap.open(fname, cv::CAP_INTEL_MFX)" return false
diff --git a/demos/smart_classroom_demo/src/image_grabber.cpp b/demos/smart_classroom_demo/src/image_grabber.cpp
index 56448f2..4f68a1b 100644
--- a/demos/smart_classroom_demo/src/image_grabber.cpp
+++ b/demos/smart_classroom_demo/src/image_grabber.cpp
@@ -12,7 +12,9 @@ ImageGrabber::ImageGrabber(const std::string& fname) {
if (fname == "cam") {
is_opened = cap.open(0);
} else {
- is_opened = cap.open(fname);
+ printf("use intel mfx video decoder\n");
+ is_opened = cap.open(fname, cv::CAP_INTEL_MFX);
Check VA which looks good:
hema@hema:~/qiuxing.zl/open_model_zoo/demos/build$ vainfo
vainfo: VA-API version: 1.4 (libva 2.1.0)
vainfo: Driver version: Intel iHD driver - 18.4.git_1d28de_2019-02-11
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
Best Regards,
Li
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OpenCV in OpenVINO 2019R1 do not have MediaSDK backend built-in. Try to use GStreamer backend with custom pipeline:
VideoCapture cap("filesrc location=file.mp4 ! qtdemux ! vaapidecodebin ! videoconvert ! appsink sync=false", CAP_GSTREAMER);
You will need to install gstreamer1.0-vaapi package (Ubuntu) and choose correct demux element for your container (qtdemux, matroskademux, etc.).

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page