1


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?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Yinon Eliraz
  • 317
  • 1
  • 6
  • 22

1 Answers1

1

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.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • How can i apply that in my code? I am used to working with the automatic graphbuilder. – Yinon Eliraz Jul 01 '14 at 10:55
  • Use `IGraphBuilder::AddFilter`, `IGraphBuilder::Connect` instead of `RenderFile` and other high level friends. – Roman R. Jul 01 '14 at 11:04
  • i didnt use the RenderFile. but how can i choose which filter to use? i usually choose the "VideoRendererDefault". which one do i choose now? – Yinon Eliraz Jul 03 '14 at 10:43
  • `VideoRendererDefault` is a standard component you would not ask for embedding. Post specific code, show what is not working exactly etc. – Roman R. Jul 03 '14 at 11:31
  • Thats the problem: everything is working, no errors. the thing is that the playback is not always working good on some machines. probably because of the codec difference. so im asking which renderer to use to solve this. im guessing the default one changes between machines, so is there a specific filter to use? – Yinon Eliraz Jul 03 '14 at 12:28
  • These are unrelated questions: you asked about codec and embedding, and renderer is a different story, then it's standard so you never embed it. – Roman R. Jul 03 '14 at 12:38