I have created a video player using directshowlib.
Since each user uses a different set of codecs, sometimes there are hiccups (green bar at the bottom, no audio).
Is there a way to embed the best suitable codec and use only it?
DirectShow API, and DirectShow.NET wrapper too, offer both: automatic graph building using installed codecs and taking codec using its applicability and registration priority (media types, merits etc), and also manual graph building where you fully control the process of adding filters, and you can use the codec of your interest instead of supplied by Intelligent Connect.
You are interested in the latter, so that you use the filters/decoders you have trust in. There is no special embedding, more important is how the graph itself is built and that you avoid API calls that cause automatic filter insertion.