Hi, when releasing the software with the H.264 Encoder directshow filter, I find that in order for it to work the Media SDK needs to be installed. Is this a caveat or am I completely missing something? I'm assuming it's referencing maybe a library in the SDK?
Intel Media SDK does not have to be installed to utilize the SW or HW implementations.
SW implementation is realized via the libmfxswXX.dll. You just need to make sure it's accessible in current execution folder or via system path. The recommended approach is for the application to install thelibmfxswXX.dll in appropriate location as part of the application install process. In other words, thelibmfxswXX.dll should be part of the application install package, if not already.
HW implementaiton is realized via thelibmfxhwXX.dll, delivered aspart of the Intel Graphics driver.
from the provided logs I do not see any issues with the HW accelerated path. As expected it is available regardlessif the SDK is installed or not. And from your comment HW acceleration seems to be working, since your CPU utilization is low, right?
For the SW codec case, as discussed earlier, the application (including the analyzer tool you just used) must have access to libmfxswXX.dll to be able to use Media SDK SW codecs. This is achieved by installing the SDK, but in a real life scenario the DLL should installed together with the application.
From what I understand, in order to use the hardware encoding, like I am, without the sdk installed... I still need the software library in the appropriate folder or the same folder as the executable I'm launching to encode?
I just tried this and it works... checked registry to confirm HW was set to 1 and it is. When encoding the cpu goes from 0 to about 20 percent, which isn't bad... but a little misleading... but I'm coming from the understanding that if the registry value says 1, then encoding is done through hardware. Correct?
To answer yourfirst question. You do not need SW DLL to be able to use HW DLL.
A more definite way of confirming that HW acceleration is used is either to use Intel Graphics Performance Analyzer (GPA) via the GPA Monitor/Media Performance feature. Alternatively you can just fetch a log of the Media SDK API calls using the mediasdk_tracer tool. It will tell you if the API was initialized for HW or SW.
Right, the default DShow sample filter should write if SW or HW is selected to the registry.
Well, very strange, but I'm definatelly using HW encoding... and it will not work without the library in the applications folder... but not to worry... as long as it works with the library. Very strange though. Thanks for your help.
Let me clear out the confusion, additionally to Andrey's correct suggestion. You include an H.264 encoder filter which is based on MSDK sample filter as part of your product. I assume that your product installer carries that customized filter dll and registers it with regsvr32.exe during installation.
The problem that you bumped into is the matching GUIDs of MSDK sample filter and your product filter. When Media SDK is installed it registers its H.264 encoder filter by GUID. Then assume you install/run your application and it registers/uses its own filter. But when Media SDK is uninstalled it unregisters an H.264 encoder filter using GUID and the filter with this GUID is you application's filter. It gets unregistered and therefore your application stops working.
In order to overcome this you should generate a new GUID for your application's filter.