directshow.net


Use specific codec or ffdshow folder with DirectShowLib?


I am using DirectShowLib in a C# application to allow video playback. Unfortunately, not all systems provide a decent video codec so I opted to install FFDShow as part of my installation. Unfortunately this doesn't seem to work for certain users since they either already have several video codec packs installed or are using old versions. Or, for example, Windows 7 does no longer require it.
When I played with libvlc some time ago they allowed me to specify the plugin path with all the supported video codecs, but unfortunately I cannot seem to find something similar with DirectShowLib.
Is there a way to either pack the required codec libraries as part of my application and point to that folder, or install FFDShow into a specific folder and reference that one?
One possible approach you could take is to use registration free COM. You would sepcify in your manifest file that you are using a particular group of subcomponents (such as a subdirectory containing FFDShow components). You would also need to create a manifest for the DLL's in that subdirectory. The main gotcha is you have to instantiate your objects from C# similar to this:
DsGuid MicrosoftDemux = new DsGuid("{AFB6C280-2C41-11D3-8A60-0000F81E0E4A}");
var demux = (IBaseFilter)Activator.CreateInstance(Type.GetTypeFromCLSID(MicrosoftDemux));
Once you have the filter, you can then add it to your graph, cast to other interfaces, or whatever else you want to do.
To help create the manifest file for FFDShow components, you can use regsvr42 (described in this answer: Generate Manifest Files for Registration Free COM
I have successfully used this to use DirectShow filters without registering them. One thing to keep in mind is the COM files must be in the same directory as your application or a subdirectory. Having them in a neighboring directory will not work.

Related Links

text overlay issue?
Chaining Shader Effects
MP4 Fast Forward/Rewind
Can I get timecode from directshow video?
Use specific codec or ffdshow folder with DirectShowLib?
File writer filter creating a bigger AVI file then original

Categories

HOME
adfs3.0
dafny
slider
yql
biztalk-2010
moodle-api
material-components
drag-and-drop
openfoam
u-boot
angular2-template
stack-overflow
spring-security-oauth2
locationmanager
business-intelligence
live-streaming
supervisord
fosuserbundle
tfsbuild
home
spring-shell
mod-wsgi
onchange
react-bootstrap-table
npoi
copy-protection
publishing
nsmutablearray
counting
testlink
love2d
macports
linq.js
assert
assemblies
slideshow
nomad
code-push
jenkins-slave
realstudio
maven-jaxb2-plugin
nslayoutconstraint
email-forwarding
http4s
prefetch
controllers
livecycle
msbuild-4.0
maven-release-plugin
bbc-micro
i2b2
m4
html.actionlink
nette
bjam
dynamics-ax-2012-r2
mobilefirst-server
algebraixlib
org-babel
scala-swing
ssmtp
maven-shade-plugin
dc
ildasm
cout
producer
otl
distributed-r
thruway
property-injection
lync-2010
typesafe-stack
cloo
smips
iirf
coalesce
chefspec
contextswitchdeadlock
telerik-ajax
server-name
kaazing
pageheap
image-scanner
uipangesturerecognizer
prototypal-inheritance
multidrop-bus
zend-server-ce
qtextbrowser
server-variables
data-dump
airprint
aptitude
uninstaller
sscli
asdoc
.net-services
yahoo-maps

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App