- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to configure default encoding settings based on the supported features of the current system, but I am having a hard time determining how to accomplish this.
For e.g.; IVB doesn't support look ahead so if the rate control setting is configured to use this feature (a good default on HSW+) the encoder will fail to initialize. Querying the SDK version on this system gives me 1.11 so I can't use that.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Babgvant,
Sorry for the confusion, in regard to query in opaque memory scenario, when zeroing out mfxVideoParam structure; it leads to 0 extended buffer value and as a result encoder returned unsupported error message, because input has at least 1 extended buffer for opaque memory allocation, but output has none. So, to fix the issue copy extended buffer content from input to output.
Thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
We have a mediasdk analyzer tool available at path (installed folder/mediasdk/tools/mediasdk_analyzer.exe). You can run this tool to get the first level understanding into the features supported on your platform. Second and the one you already know are the query functions in MediaSDK API, here is article which provides more explanation on the Query functions: https://software.intel.com/en-us/articles/query-functionality-in-media-sdk using them you can get information, if the requested features are supported by the platform. Now, for the runtime, feature support varies by the installed operating system on the system, system hardware, SKU version and the driver version. Hope this information helps.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To explore the capabilities of your platform (Windows and Android) you may also want to try out the new Intel Visual Coding Framework (VCF)product, https://software.intel.com/en-us/visual-coding-framework. VCF is also advertised in the sticky post section of this blog. VCF provides an easy way to explore and benchmark both simple and advanced Media SDK workloads, and also create workloads which can be integrated with applications.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Harsh Jain (Intel) wrote:
Hi there,
We have a mediasdk analyzer tool available at path (installed folder/mediasdk/tools/mediasdk_analyzer.exe). You can run this tool to get the first level understanding into the features supported on your platform. Second and the one you already know are the query functions in MediaSDK API, here is article which provides more explanation on the Query functions: https://software.intel.com/en-us/articles/query-functionality-in-media-sdk using them you can get information, if the requested features are supported by the platform. Now, for the runtime, feature support varies by the installed operating system on the system, system hardware, SKU version and the driver version. Hope this information helps.
Thanks,
MFXVideoENCODE_Query is exactly what I was looking for, but unfortunately I'm having some trouble with the implementation (borrowed from one of the sample apps).
When I call MFXVideoENCODE_Query it always returns MFX_ERR_UNSUPPORTED even when the parameters(m_mfxEncParams) are valid and I can successfully Init (sts = m_pmfxENC->Init(&m_mfxEncParams)) the encoder and encode video.
mfxVideoParam outParam;
MSDK_ZERO_MEMORY(outParam);
outParam.mfx.CodecId = m_mfxEncParams.mfx.CodecId;
sts = m_pmfxENC->Query(&m_mfxEncParams, &outParam);
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please share the log from mediasdk analyzer tool located at (Installed folder/mediasdk/tools/mediasdk_analyzer). The log can provide required details on your system environment. Also, can you please use sample_encode (https://software.intel.com/sites/default/files/MediaSamples_Windows_6.0.0.68.msi) and with the same case scenario (encoder parameters set call MFXVideoENCODE_Query). Do you happen to see same issue? Let me know your results.
Also, as Petter mentioned in previous post you can also try new Visual Coding Framework(VCF) product (https://software.intel.com/en-us/visual-coding-framework), to explore capabilities of your platform (Windows or Android).
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Output from sys analyzer:
Intel Media SDK System Analyzer (32 bit)
The following versions of Media SDK API are supported by platform/driver:Version Target Supported Dec Enc
1.0 HW Yes X X
1.0 SW Yes X X
1.1 HW Yes X X
1.1 SW Yes X X
1.3 HW Yes X X
1.3 SW Yes X X
1.4 HW Yes X X
1.4 SW Yes X X
1.5 HW Yes X X
1.5 SW Yes X X
1.6 HW Yes X X
1.6 SW Yes X X
1.7 HW Yes X X
1.7 SW Yes X X
1.8 HW Yes X X
1.8 SW Yes X XGraphics Devices:
Name Version State
Intel(R) HD Graphics 4600 10.18.15.4256 ActiveSystem info:
CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
OS: Microsoft Windows 10 Pro
Arch: 64-bitInstalled Media SDK packages (be patient...processing takes some time):
MFXVideoENCODE_Query works in sample_encode project, but it does not in sample_transcode (the sample my app is based on) also included in the download. sample_transcode also returns MFX_ERR_UNSUPPORTED.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi babgvant,
Thank you for sharing the log. Looks like analyzer tool was stopped before it could capture all the required information. Please re run the analyzer tool and wait till all the system information is logged by the tool. Please share the complete log after following quick below steps.
- Please update to latest driver version (15.40.7.64.4279) from here: https://downloadcenter.intel.com/product/81496/Intel-HD-Graphics-4600-for-4th-Generation-Intel-Core-Processors
- Also, verify and confirm if you are using latest mediasdk version (6.0.0.388).
- and you are using latest samples version (6.0.0.38): https://software.intel.com/sites/default/files/MediaSamples_Windows_6.0.0.68.msi.
Also, package "included in the download" was not attached to your previous post. Please re-attach package after above updates and let me know your findings.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Harsh Jain (Intel) wrote:
Thank you for sharing the log. Looks like analyzer tool was stopped before it could capture all the required information. Please re run the analyzer tool and wait till all the system information is logged by the tool. Please share the complete log after following quick below steps.
That's all I get because the app crashes.
Intel Media SDK System Analyzer (32 bit)
The following versions of Media SDK API are supported by platform/driver:Version Target Supported Dec Enc
1.0 HW Yes X X
1.0 SW Yes X X
1.1 HW Yes X X
1.1 SW Yes X X
1.3 HW Yes X X
1.3 SW Yes X X
1.4 HW Yes X X
1.4 SW Yes X X
1.5 HW Yes X X
1.5 SW Yes X X
1.6 HW Yes X X
1.6 SW Yes X X
1.7 HW Yes X X
1.7 SW Yes X X
1.8 HW Yes X X
1.8 SW Yes X XGraphics Devices:
Name Version State
Intel(R) HD Graphics 4600 10.18.15.4279 ActiveSystem info:
CPU: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
OS: Microsoft Windows 10 Pro
Arch: 64-bitInstalled Media SDK packages (be patient...processing takes some time):
Harsh Jain (Intel) wrote:
- Also, verify and confirm if you are using latest mediasdk version (6.0.0.388).
- and you are using latest samples version (6.0.0.38): https://software.intel.com/sites/default/files/MediaSamples_Windows_6.0.....
Confirmed.
Harsh Jain (Intel) wrote:
Also, package "included in the download" was not attached to your previous post. Please re-attach package after above updates and let me know your findings.
I don't understand. Sample_multi_transcode is another sample project included in the sample projects you linked to earlier (and what I based my app off of many years ago). The fresh sample exhibits the same behavior as my application (Query fails even though Init does not).
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Babgvant,
Can you please share the reproducer code, so I can verify the encode parameters you are initializing before the query function is called. As,its weird that query function works for encode parameters with sample_encode (vs) query function return error when same parameters are set in sample_multi_transcode. This definitely needs investigation, please share the code.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only change I made to sample_multi_transcode was to add
mfxVideoParam outParam;
MSDK_ZERO_MEMORY(outParam);
outParam.mfx.CodecId = m_mfxEncParams.mfx.CodecId;sts = m_pmfxENC->Query(&m_mfxEncParams, &outParam);
on line 2173 of pipeline_transcode.cpp (right after // Init encode if (m_pmfxENC.get()) {).
cmd line (taken pretty much straight out of the sample's pdf):
-i::h264 "D:\Intel\INDE\INDE Media SDK for Windows 6.0.0.388\samples\ocl_media_sdk_interop\MediaSDKInterop\MediaSDKInterop_video.h264" -async 10 -o::h264 output.h264 -n 100 -w 320 -h 240 -f 30 -b 2000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Babgvant,
I tried the query function at same location "on line 2173 of pipeline_transcode.cpp (right after // Init encode if (m_pmfxENC.get()) {)." and do not see query function return any errors and was able to successfully run the sample_multi_transcode with cmd line. "-i::h264 "C:\Intel\INDE\INDE Media SDK for Windows 6.0.0.388\samples\ocl_media_sdk_interop\MediaSDKInterop\MediaSDKInterop_video.h264" -async 10 -o::h264 output.h264 -n 100 -w 320 -h 240 -f 30 -b 2000"
MFX HARDWARE Session 0 API ver 1.16 parameters:
Input video: AVC
Output video: AVC
MFX dll: C:\Program Files\Intel\Media SDK\libmfxhw32.dll
Transcoding started
.
Transcoding finished
Common transcoding time is 0.59 sec
MFX session 0 transcoding PASSED:
Processing time: 0.59 sec
Number of processed frames: 100
The test PASSED
I suspect issue could be due version of Visual studio (VS) and not sure version of VS you are using. But, I tried with VS2013 and it worked, suggest updating and trying with VS 2013.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using VS2015, but the result is the same when changing from the VS2015 runtime to VS2013.
TBC, the sample application works. It's just that Query is returning a result which is not consistent with that. According to the documentation MFX_ERR_UNSUPPORTED indicates that encoding with the current config will not work, but since it does the results from Query are misleading and counterproductive. For the function to be useful it either has to correct the params or indicate correctly that encoding will not work (where it obviously does carry on just fine).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Taking a deeper look at the differences b/w sample_encode and sample_multi_transcode I discovered that the use of opaque memory seems to be related to Query not working correctly. If I force sample_multi_transcode to not use opaque memory, Query returns MFX_ERR_NONE (what I expect in this case).
Why does opaque memory cause Query to not work correctly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
babgvant wrote:
Taking a deeper look at the differences b/w sample_encode and sample_multi_transcode I discovered that the use of opaque memory seems to be related to Query not working correctly. If I force sample_multi_transcode to not use opaque memory, Query returns MFX_ERR_NONE (what I expect in this case).
Why does opaque memory cause Query to not work correctly?
Hmm... maybe opaque memory is a red herring. Disabling support in my real application did not have the same effect (Query still unreliable).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
Opaque memory was enabled for transcode pipeline to simplify surface memory management, where session manages the memory types and handoffs automatically. To resolve query issue follow quick pointers below:
- The "Query" function is not correct usage for opaque memory scenario, change and use "QueryIOSurf" function instead in sample_multi_transcode to resolve the issue. Please refer to mediasdk-manual page no 47 for more details.
- we have tutorial "simple_5_transcode_opaque" showing how to use "QueryIOSurf" function during transcode opaque memory scenario. In your real application make similar changes as showcased in the tutorial to resolve query issue. Let me know your results.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Harsh Jain (Intel) wrote:
Hi there,
Opaque memory was enabled for transcode pipeline to simplify surface memory management, where session manages the memory types and handoffs automatically. To resolve query issue follow quick pointers below:
- The "Query" function is not correct usage for opaque memory scenario, change and use "QueryIOSurf" function instead in sample_multi_transcode to resolve the issue. Please refer to mediasdk-manual page no 47 for more details.
- we have tutorial "simple_5_transcode_opaque" showing how to use "QueryIOSurf" function during transcode opaque memory scenario. In your real application make similar changes as showcased in the tutorial to resolve query issue. Let me know your results.
Thanks,
According to the documentation MFXVideoENCODE_QueryIOSurf does not perform the same purpose as MFXVideoENCODE_Query. QueryIOSurf is used to assist with surface allocation and not validate parameters (what Query is supposed to do).
My application (and the sample application it was based on) both use QueryIOSurf where it is intended, but that doesn't address how to make Query work properly to validate encode parameters against the actual hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Babgvant,
Sorry for the confusion, in regard to query in opaque memory scenario, when zeroing out mfxVideoParam structure; it leads to 0 extended buffer value and as a result encoder returned unsupported error message, because input has at least 1 extended buffer for opaque memory allocation, but output has none. So, to fix the issue copy extended buffer content from input to output.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Harsh Jain (Intel) wrote:
Hi Babgvant,
Sorry for the confusion, in regard to query in opaque memory scenario, when zeroing out mfxVideoParam structure; it leads to 0 extended buffer value and as a result encoder returned unsupported error message, because input has at least 1 extended buffer for opaque memory allocation, but output has none. So, to fix the issue copy extended buffer content from input to output.
Thanks,
That was it. Thank you! Would it be possible to get this added to the SDK API Reference Manual (would have saved us both a lot of time :)).
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are welcome. Glad, issue was resolved. Yes, will include this in reference manual. So we can close this thread here.
Thanks,
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page