Limited preview of the requested document.
To view the whole document, you must be registered as a VIP.
An advanced user's tool: GRAPH EDIT
Today's Windows' multimedia architecture is based on DirectShow, which works basically as a collections of filters with input(s) and/or output(s) for data. Every multimedia component is represented by a DirectShow filter. This includes audio/video compressors/de-compressors, but also the input/output of your soundcard, along with many others. By connecting filters together, you create data paths for multimedia data, eventually resulting in an action (for example a video compression conversion).
Microsoft's DirectShow SDK (Software Development Kit) comes with a great application called Graph Edit, which allows you to graphically build filter graphs, thus manipulate directly every multimedia component of your system!
- Using GraphEdit
- Filter manipulation
- Full graph-creation example
- Possibilities of GraphEdit
- Description of some DirectShow filters
- The Dolby Digital downmixing
1. Using GraphEdit
When you open GraphEdit, you find yourself in front of an
empty workspace. You should start by adding the filters you
wish to use, using the Graph -> Insert Filters menu.
This opens a filter-selection dialog, where you can choose filters from. Filters are separated into many categories.
The following tables describes the most commonly used categories :
When expand one category and double-click on a filter, it creates a box in the workspace, which represents the selected filter.
2. Filter manipulation
To create a data path, you have to interconnect filters.
This is done by linking an output pin to an input pin with
the mouse. Note that you can only interconnect pins of the
same type (you will get an error message otherwise). Sometime,
GraphEdit will automatically add intermediate filters when
you try to connect pins of incompatible types. That is, it
will search for possible intermediate filters that will make
the pins compatible. If you do not want this behaviour, you
can de-activate it in the Graph -> Connect Intelligent
menu.
Filter can be delete by selecting them (normal single-click) and pressing the delete key. Some filters/pins have properties that can be modified. This can be done by right-clicking on the filer/pin and choosing 'properties'.
Also, part of the graph can be generated automatically downstream, by right-clicking an output pin and choosing 'render'. This will place all necessary filters to completely render the pin according to default behaviour (which is usually "playback"). When the graph is done, it can be run by pressing the "play" button in the application's button bar.
3. Full graph-creation example
In this example, we will crate a filtergraph to make an AVI
conversion. First, we decide what exactly we want the graph
to do:
- Import an MPEG-1 audio/video stream
- Convert the video to Divx format
- Multiplex Divx video and unaltered MPG audio into AVI and save to disk
- Decode MPG audio and save to disk as PCM wave
- Monitor video-only progress
Start by placing a DirectShow Filters -> File Source
(Async.) and select the input MPEG file (Loto-quebec
MPEG.mpg). Parse the stream using a DirectShow Filters
-> MPEG-I Stream Splitter.
Then place a DirectShow Filters -> MPEG Video Decoder
in the video data path.
Next, bring two DirectShow Filters -> Infinite Pin
Tee Filter. Connect one of them with the audio output
of the stream splitter and the other with the output of the
video decoder. These are used to duplicate the data. Place
also a Video Compressors -> Divx ;-) MPEG-4 Low-Motion
in the video data path.
Then, use a DirectShow Filters -> AVI Mux
to connect the Divx output and MPG audio data. Connect the
AVI Mux's output to a DirectShow Filters -> File
Writer. Provide with a filename when prompted to (Loto-quebec
DivX.avi).
To decode the MPG audio and save it to disk, start by connecting
the output 2 of the audio path's tee filter to a DirectShow
Filters -> MPEG Audio Decoder. Finish the path with
a DirectShow -> WAV Dest followed by a DirectShow
Filters -> File Writer. Enter the wave file's name
when prompted (loto-quebec Audio.wav).
Note: If you do not have the "WAV Dest" filter, you can find it in the download section.
Finally, to monitor the video-only progress (watch video
in real-time as it gets converted), connect the video path's
tee filter to a DirectShow -> Video Renderer.
Now that the graph is completed, all you have to do is to press the PLAY button to start the process.
You can download the sample materials:
4. Possibilities of GraphEdit
This example should have given you an good idea of all what you can do with GraphEdit. Possibilities are only limited by your imagination It filtergraphs interest you, I encourage you to "play around" with them to familiarise yourself.
(...)


