Click here to Skip to main content
15,396,613 members
Articles / Multimedia / DirectX
Posted 6 Oct 2005


128 bookmarked

Programming DirectShow applications in C#: A set of tutorials

Rate me:
Please Sign up or sign in to vote.
4.79/5 (46 votes)
6 Oct 20052 min read
A collection of tutorials for programming DirectShow in C#.

Sample Image


Besides the Microsoft SDK documentation, the information needed to program DirectShow applications is limited. This web site supplies many of the most useful references for programming these applications in C#. In order to continue this tradition, I have created a help file (.chm) that contains ten tutorials that illustrate how DirectShow applications can be written in C#.


In general, the resources for programming DirectShow applications are scarce. In the past few months, I have written many tutorials that illustrate how to perform many common tasks in DirectShow with C#. I have put all these tutorials in one .chm file and provided access to all the source code samples from it. Moreover, the CodeProject web site has a nice messaging system to support the users of the code provided on this site, which should make these tutorials even more useful.

Using the code

I have provided a Visual Studio project file for each tutorial, and I have also included a .cmd file to compile it from the command line. Sometimes, these .cmd files contain references that need to be changed to reflect your local settings. I have mentioned these in the tutorial "readme.txt" file. Some tutorials will only run on 32-bit machines.

Points of Interest

The tutorials show how a simple multimedia player, a simple capture, a jukebox, and an append utility application can be written. Moreover, we have implemented versions of the Picture-In-a-Picture, custom allocator/presenter, custom image compositor samples from the DirectShow SDK in C#. And we have implemented the functionality of the EzRbg24 filter in C#.

Limitations and known issues

As mentioned previously, some samples will only work correctly on 32-bit machines. Moreover, I don't claim that these are optimal solutions. Many years ago, when I was teaching a VC++/MFC class, one student asked me where I was taking the code that I was using during the lectures. I replied that I had two directories with more than eighty samples in each of them, that I had written over a while. I was just picking some of these and brushed them up a little before presenting them and asking the students to modify or extend them (during the lectures or for assignments). I give these samples in the same spirit; but I'm still a long way from having more than hundred and sixty samples to chose from ;-)


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

United States United States
You can read my blog entries at:

Comments and Discussions

GeneralMy vote of 2 Pin
seyyed hamed monem21-Oct-13 7:45
professionalseyyed hamed monem21-Oct-13 7:45 
BugFrame 0 is not being displayed Pin
Squall8315-Feb-12 2:23
MemberSquall8315-Feb-12 2:23 
GeneralGreat tutorial! Pin
Beri30-May-11 11:24
MemberBeri30-May-11 11:24 
GeneralMy vote of 5 Pin
kingsk19-Oct-10 9:56
Memberkingsk19-Oct-10 9:56 
Generalmaking DirectShow filters compile in 64-bit Windows Pin
Marc Perrone16-Aug-10 4:40
MemberMarc Perrone16-Aug-10 4:40 
GeneralRe: making DirectShow filters compile in 64-bit Windows Pin
Marc Perrone16-Aug-10 4:42
MemberMarc Perrone16-Aug-10 4:42 
GeneralI cannot open the file Pin
Jan Kluson2-Aug-10 6:54
MemberJan Kluson2-Aug-10 6:54 
SuggestionRe: I cannot open the file Pin
colinmeier11-Apr-12 9:30
professionalcolinmeier11-Apr-12 9:30 
GeneralMy vote of 1 Pin
qjaybee1-Jun-10 23:59
Memberqjaybee1-Jun-10 23:59 
GeneralResource file missing Pin
york z30-May-10 22:23
Memberyork z30-May-10 22:23 
GeneralAnti-flicker problem Pin
QuyLV19-Feb-09 21:37
MemberQuyLV19-Feb-09 21:37 
GeneralSave PIP as wmv file Pin
rama srinu23-Jan-09 5:09
Memberrama srinu23-Jan-09 5:09 
GeneralMultiple Sample Grabber Objects Pin
kazim bhai11-Jun-08 5:42
Memberkazim bhai11-Jun-08 5:42 
GeneralRe: Multiple Sample Grabber Objects Pin
daniel04912-Jun-08 11:18
Memberdaniel04912-Jun-08 11:18 
Generalcannot display this HTML help file Pin
HooNose_JJP11-Jun-08 2:18
MemberHooNose_JJP11-Jun-08 2:18 
GeneralRe: cannot display this HTML help file Pin
HooNose_JJP11-Jun-08 2:30
MemberHooNose_JJP11-Jun-08 2:30 
GeneralRe: cannot display this HTML help file Pin
daniel04911-Jun-08 2:59
Memberdaniel04911-Jun-08 2:59 
GeneralGreately in need of help Pin
babu743-Jun-08 1:49
Memberbabu743-Jun-08 1:49 Compact Framework Pin
s4souhail3-Aug-07 8:43
Members4souhail3-Aug-07 8:43 
GeneralRe: .net Compact Framework Pin
daniel0494-Aug-07 7:30
Memberdaniel0494-Aug-07 7:30 
GeneralJukebox: Step Forward works, but Step Backward has problems Pin
stringtheory_x5-Jul-07 19:22
Memberstringtheory_x5-Jul-07 19:22 
GeneralRe: Jukebox: Step Forward works, but Step Backward has problems Pin
daniel0499-Jul-07 6:19
Memberdaniel0499-Jul-07 6:19 
QuestionHow to capture single frame Pin
Ali Habib22-Jun-07 4:35
MemberAli Habib22-Jun-07 4:35 
QuestionAccess to Running Object Table? Pin
stringtheory_x30-May-07 23:35
Memberstringtheory_x30-May-07 23:35 
AnswerRe: Access to Running Object Table? Pin
daniel04931-May-07 2:57
Memberdaniel04931-May-07 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.