Closed boxerab closed 5 years ago
Can you check if MSDK is indeed working on your Windows 10 system by running MSDK sample apps?
Thanks. What is the best way of testing this ?
This is running on a KVM VM, by the way. Host is 8th Gen i7
Thanks, Is there a sample h264 file that is supported, that I can test on ?
I get these errors when I try the sample decoder in software mode:
[ERROR], sts=MFX_ERR_MORE_DATA(-10), CDecodingPipeline::InitMfxParams, m_FileReader->ReadNextFrame failed at c:\users\aaron\documents\intel« media sdk 2018 r2 - media samples 8.4.27.378\sample_decode\src\pipeline_decode.cpp:666
[ERROR], sts=MFX_ERR_MORE_DATA(-10), CDecodingPipeline::Init, InitMfxParams failed at c:\users\aaron\documents\intel« media sdk 2018 r2 - media samples 8.4.27.378\sample_decode\src\pipeline_decode.cpp:408
[ERROR], sts=MFX_ERR_MORE_DATA(-10), wmain, Pipeline.Init failed at c:\users\aaron\documents\intel« media sdk 2018 r2 - media samples 8.4.27.378\sample_decode\src\sample_decode.cpp:686
Can you run sample_decode in hardware mode and use a proper H264 elementary stream? In GStreamer you can generate an H264 elementary stream with the following pipeline:
gst-launch-1.0 filesrc location=/path/to/video.mp4 ! qtdemux ! h264parse ! 'video/x-h264, stream-format=byte-stream' ! filesink location=/path/to/video.h264
Thanks. I am getting errors from that pipeline.
(gst-launch-1.0:7036): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
WARNING: erroneous pipeline: syntax error
I had to remove the quotes around video/x-h264 ...
and put it into software mode, and then decode ran without error.
Show me the output.
After running pipeline, I was able to run sample_decode
:
C:\Users\aaron\Documents\Intel® Media SDK 2018 R2 - Media Samples 8.4.27.378\_bin\x64>sample_decode.exe h264 -sw -i c:\temp\video.h264 -o test.yuv
pretending that aspect ratio is 1:1
Decoding Sample Version 8.4.27.378
Input video AVC
Output format NV12
Input:
Resolution 1280x720
Crop X,Y,W,H 0,0,0,0
Output:
Resolution 1280x720
Frame rate 23.98
Memory type system
MediaSDK impl sw
MediaSDK version 1.27
Decoding started
Frame number: 3346, fps: 85.405, fread_fps: 0.000, fwrite_fps: 262.0000
Decoding finished
Run it in hardware mode instead of software mode, i.e. -hw instead of -sw, and show me the output.
This is a VM, btw.
Output is
[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), CDecodingPipeline::Init, m_mfxSession.Init failed at src\pipeline_decode.cpp:309
[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), wmain, Pipeline.Init failed at src\sample_decode.cpp:686
So, hardware decode not supported.
So, it looks like MSDK is installed correctly.
But MFX dependency is not found.
Yes, and the gst-mfx plugins behaved as expected for your case. MSDK doesn't support a virtualized environment.
Wait, so gst-mfx doesn't support software decode ?
And that is why MFX dep is not found ?
Because MSDK did work in software mode on my VM
No, only hardware decode. For SW decode better use gst-libav. For the MFX dependency not being found, that was meant for building the gst-mfx plugins using open source MSDK in Linux with pkgconfig. For Windows it is not supported so that message came up for you but MFX library was found nevertheless.
Thanks. I will test on Skylake, bare metal system. It would be nice to be able to run plugin in software mode, for testing purposes :)
Also, it would be helpful to disable this message of MFX not found
on Windows.
I have a Skylake system with AMD discrete video card. Will I be able to use the iGPU on the CPU for this system ?
You should be able to but let me know what you get.
Unfortunately, I get the same error on my bare metal skylake system, with AMD dGPU
[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), CDecodingPipeline::Init, m_mfxSession.Init failed at src\pipeline_decode.cpp:309
[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), wmain, Pipeline.Init failed at src\sample_decode.cpp:686
Perhaps the h264 profile is not supported by hardware.
A sample h264 that is known to work with Skylake decoder would be very useful.
I ran the mediasdk_analyzer on my system:
Tips:
- HW target does not work: If you expect it should, then make sure to install
latest Intel gfx driver, and that Intel gfx is selected as primary driver.
- If Intel driver is associated with secondary adapter, make sure to
initialize DirectX device used with Media SDK with corresponding adapter.
Your issue is described exactly as is. You may need to fiddle with the BIOS to make Intel GPU primary.
I am using the topic_linux_and_windows branch.
I run a Visual Studio command prompt, and I run
set PKG_CONFIG_PATH=%GSTREAMER_1_0_ROOT_X86_64%lib\pkgconfig
Then, using meson with command
meson gstreamer-media-SDK gstreamer-media-SDK-build --backend=vs2017
I get the following output:
The Meson build system Version: 0.49.0 Source dir: c:\Users\aaron\src\gstreamer-media-SDK Build dir: c:\Users\aaron\src\gstreamer-media-SDK-build Build type: native build Project name: gst_mfx Project version: 2.0.2 Native C compiler: cl (msvc 19.16.27025.1) Native C++ compiler: cl (msvc 19.16.27025.1) Build machine cpu family: x86 Build machine cpu: x86 Found pkg-config: C:\bin\pkg-config\bin\pkg-config.EXE (0.28) Dependency glib-2.0 found: YES 2.54.3 Dependency gobject-2.0 found: YES 2.54.3 Dependency gio-2.0 found: YES 2.54.3 Dependency gmodule-2.0 found: YES 2.54.3 Dependency gstreamer-1.0 found: YES 1.14.4 Dependency gstreamer-base-1.0 found: YES 1.14.4 Dependency gstreamer-video-1.0 found: YES 1.14.4 Dependency gstreamer-allocators-1.0 found: YES 1.14.4 Dependency gstreamer-pbutils-1.0 found: YES 1.14.4 Found CMake: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE (3.12.18081601-MSVC_2) Dependency mfx found: NO (tried pkgconfig and cmake) DEPRECATION: Project targetting '>= 0.36.0' but tried to use feature deprecated since '0.48.0': python3 module Library mfx found: YES Library legacy_stdio_definitions found: YES Library d3d11 found: YES Library gdi32 found: YES Library shcore found: YES Dependency gstreamer-gl-1.0 found: YES 1.14.4 Has header "GL/glext.h" : NO Configuring version.h using configuration Library dxgi found: YES Library dxguid found: YES Build targets in project: 2 WARNING: Deprecated features used: