Directshow H.264 Encoder Release of Software

Directshow H.264 Encoder Release of Software

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?

Cheers.

~Marty
12 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi Martin,

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.

Regards,Petter

Hi Petter,

I have just uninstalled the Media SDK 2012 from one of the machines and the software is not able to encode using that filter. I am using hardware encoding and the graphics drivers are installed.

~Marty

So you're having issues with HW encode, not SW?

If so, could you please run the tool mediasdk_sys_analyzer on the machine and provide the log to us?

Regards,Petter

I had to reinstall the sdk to get access to the tool and then decided to run with it installed and without.

With installed everything is good:

After uninstalling the sdk i ran it again and it failed:

But it does say SF and not HW... but when I encode even with the sdk installed the HW is being used because the CPU is still at a minimal percentage. Thoughts?

~Marty

Hi Martin,

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.

Regards,Petter

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?

~Marty

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?

~Marty

Hi Martin,

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.

Regards,Petter

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.

Cheers.

~Marty

You have to copy and regsvr32 the .dll that holds the H.264 Encoder filter and have accessible(in the same folder or via PATH system variable) all additional depending .dlls if they exist.

Hi Martin,
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.
Regards,Nina

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi