DirectShow Encoding Problems

DirectShow Encoding Problems

we would like to evaluate the DirectShow Encoder Versions of the Media SDK
to see if it makes sense to support them by our live video encoder.
However, they seem to be very unstable and not documented.
What is the best way to test H264 encoding with GraphEdit?
Using that, the property page always loses focus. Which are the simples settings to test?
Trying this fromapplication code lets the filter crash, due to null pointer at IPin references.
Default settings always stop the graph after a short time.
Regards, Oliver

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Oliver,Thank you for your interest in Media SDK.Are you using Media SDK 2.0 Gold package? May I ask you to explain more about "Default settings always stop the graph after a short time"? Are you able to get any stream encoded?Have you used the .msi installer to deploy the package? DirectShow filters included with Media SDK product are samples which use the MSDK library. Therefore you need to have libmfxsw32(64).dll accessible in standard system search paths to run the filters. MSDK installer handles this. If you moved DS filters to another system you need to take care of libmfxsw32(64).dll too.To test H264 encoding with GraphEdit we normally use a chain like "FileReader->AVI Splitter->Color Converter (to NV12)->Intel H.264 Encoder->Muxer->FileWriter".For basic encoder settings to test you should see the document MediaSDK Filters Specifications.pdfunder \doc, specifically the section "Registry Support". On the first run of encoder filter the registry structure with default settings is built and you can edit those values for further runs. Property pages do have limited functionality (resize, presets) and work only after whole chain is assembled which may be not very convenient.Please let me know if you have more questions, I will be glad to help.Best regards,Nina

Hi Nina,

the default settings of the encoder do not seem to work.
When we try to call the encoder options like this:

IConfigureH264Encoder::H264Params h264params;


hr = m_EncoderOptIntel->SetParams(&h264params);

it crashes then at your filter in

pPin = m_pOutput->GetConnected();

because m_pOutput == 0

- Oliver

Hi Oliver,If you use the IConfigure interface, you first need to connect the Encoder filter with other filters. This is how are filters are designed. Crash is a bug, a simple check is missing. We will add one in future versions - thanks for finding this. But since DS filters are provided in source code you are free to modify the code according to your needs.Yet, my suggestion would be to figure out what is wrong with the default settings. They should work. Seems that you have some installation/configuration problem if you cannot encode a stream in GraphEdit using Media SDK DirectShow sample filters. If you provide more details I can try to help.Regards,Nina

Hi Nina,

we have some rare conditions where we can get some encoded results. This seems a bit unreliable.
Anywhere there is no chance to run your MediaChecker assessment application with the encoder then.
The filter simply does not connect when the checker is running.
This is reproducable on other machines, and it is the same behavior with simply the graphedit application.
Regards, Oliver

Best Reply

Hi Oliver,I need more data to investigate the issue you are reporting.Could you please provide the full details of your test case of not working DirectShow encoding? Which DS filters apart from Intel H.264 Encoder filter are involved in the problem graph?An input stream (can be uploaded to and steps to reproduce the issue would be helpful.Meanwhile we will check why MediaChecker tool doesn't work with our DS encoder.Thank you,Nina

Thanks Nina!

I was trying to use IConfigureH264Encoder/IAudioEncoderProperty and was getting "acess violation".
I didn't know WHY!!!
In the past, when I had Default DirectShow Filters, like MPEG2 encoder, I needed to config Filter's Output Pin before connection. So, now, I was trying to do the same for Intel's Filters... and always got the same error...
I made some search here and I found this post... Thanks, It helped me a lot!

Maybe, for next SDK update, could be a good idea that Intel add this information in the SDK Manual when explain about Iconfig* interfaces. If it exists already, pardon, but I couldn't find.. ;)

Glad to hear that this post helped you. And thanks a lot for the feedback - I think this information will fit well under Known Limitations section of the DirectShow samples readme. I will make sure to add this info in future releases of Media SDK.

Leave a Comment

Please sign in to add a comment. Not a member? Join today