Click Here to visit Embedded Automation - mControl
Introduction To GraphEdit - Chris Lanier's Blog

Introduction To GraphEdit

GraphEdit is a simple tool that will give you a visual for building and testing filter graphs. This is part of the DirectX SDK but can be found on may websites (However, it's not exactly legal to redistribute it). A Filter Graph is basically a collection of filters used to either render, compress, or convert media files. If you are interested in troubleshooting DirectShow playback in Windows Media Player, this is the best and coolest thing you will ever find. This is a very simple introduction to view a filter graph being built, GraphEdit is so powerful that I could not start to explain all of what you can do (And I can't even do that much). To really understand this you will want to grab a copy of GraphEdit, either from the DirectX SDK or from the web. I have tried to get Microsoft to post just GraphEdit in the Download Center, but that never got anywhere.

So, here's a basic start to using GraphEdit. We will be looking at the filter graph for a DivX encoded video with MP3 audio. To view the graph just open GraphEdit and drag your AVI into the window. You will see a graph created. If all goes right, mots people will see the audio and video stream being spilt by AVI Splitter. From here you will have the video out of the AVI Splitter go to whatever video decoder you have installed and registered. Mine, for example, connects to ffdshow. That will then goto your default Video Renderer. That's just the video however. Now you have audio to deal with. Since my video just has an MPEG-1 Layer 3 stream (MP3) the audio splits off to default MP3 decoder in Windows then to DirectSound. This is the process used by Windows Media Player, Zoom Player, and just about every other media player in Windows.

Now, the fun part! Say you don't want ffdshow to decode the video stream, you would rather give that to DivX 5 decoders. You can change this in the graph by deleting the ffdshow filter and then inserting the DivX decoder from Graph | Insert Filter | DirectShow Filters. Now connect the AVI Splitter to the DivX decoder and then the DivX decoder to your Video Renderer. Render the file. It will still playback, just using a different video decoder. You can change up the audio too. Maybe you want the Ac3Filter to decode the stream.

This is very basic, you can really get into much more interesting stuff! I will likely write about a few of those things later. You can do things like convert DVR-MS to other formats (DivX, XviD, 3ivX, etc), you can capture streaming video and audio and save it, capture FM radio from a TV Tuner card, capture video, and so on. All of this and more!

DivX AVI Decode Filter Graph

WMV Decode Filter Graph

Published Saturday, November 13, 2004 12:29 AM by chrisl
Filed under:

Comments

# MPEG and QuickTime and DivX, oh my!

The release of TiVoToGo has raised my interest a bit in the processes of video encoding and DVD authoring, and wow is it all complicated! In my searching and learning, these are the apps that have popped to the top...

Saturday, January 22, 2005 6:39 PM by TrackBack

# re: Introduction To GraphEdit

can i convert mkv files to ...., or watch them with Graphedit?

thnx

Tuesday, February 01, 2005 5:15 PM by chrisl

# re: Introduction To GraphEdit

I have DirectX 9. Is GraphEdit part of this or do I need to download it separately?
My Graphics program I have is Intel Graphics Technolgy, will this work just as well so that I can handle m4a files? Thank you

Saturday, March 05, 2005 5:16 PM by chrisl

# re: Introduction To GraphEdit

Can i convert avi to DVD using graphedit. If possible which all codecs should we need to accomplish the task.

Wednesday, March 09, 2005 11:46 AM by chrisl

# re: Introduction To GraphEdit

GraphEdit is not a part of the DirectX redistributable, its only part of the SDK. You can convert just about anything 2 anything, but unless you are interested in seeing how it all works, just use one of the many applications that have been built specifically for converting the type of files in question.

Monday, March 28, 2005 8:47 PM by chrisl

# re: Introduction To GraphEdit

Can I capture "WISIWIG" to an avi? I wanna get a game replay to a avi file (or anyother media file). Is it possible???

Thx
cya

Friday, April 08, 2005 6:48 PM by chrisl

# re: Introduction To GraphEdit

excellent stuff here..thanks so much for taking the time to explain it to us neophytes!

Wednesday, April 20, 2005 10:21 AM by chrisl

# re: Introduction To GraphEdit

Trying to use graphEdit to output mp3 files, but can't seem to make it work.

Input is Audible (.aa), chain is:
* Audible words codec
* LAME MPEG Layer III Audio encoder
* File writer

crashes 100% of the time. When using the MPEG Layer-3 codec (from "audio compressors"
part of the filter tree), it won't let me make the connection.

Please email me directly at davofanmail@comcast.net with suggestions, thx.

Tuesday, April 26, 2005 11:59 PM by chrisl

# re: Introduction To GraphEdit

Graphedit is the tool I'm using to convert REAL BAD AVIs to normal files. There are lots of smarties around using stupid settings for audio/video that give me hard times with VirtualDub or TMPGEnc because of their lazyness.

Saturday, May 14, 2005 11:35 AM by chrisl

# re: Introduction To GraphEdit

Here's a guide I created for processing movie soundtracks for viewing on my palm.

Directions for Encoding Dolby Headphone 5.1 Surround ogg Files
Using Graph Edit and Intervideo WinDVD

1. Select File/Render Media File
2. Load the 5.1 surround ac3 file
3. Load the AC3 Parser Filter and the AC3 Filter listed under Direct Show Filters
4. Connect filters in order above
5. Right click on ac3 filter and select filter properties
6. Change output to 2/0 Stereo and click Apply
7. Load the Intervideo Downmix DMO filter listed under DMO Audio Effects
8. Connect the ac3 Filter to the Intervideo Downmix DMO filter
9. Right click the Intervideo Downmix DMO filter and select properties
10. Select Dolby Headphone from the 1st dropdown menu
11. Select room type: Room 1 is a small room, Room 2 is a family room, Room 3 is a theatre
12. Load the Vorbis Encode Filter and the OGG Mux Filter located under Direct Show Filters
13. Specify a location to save the ogg file and be sure to append name with the .ogg extension
14. Disconnect the ac3 filter from the Intervideo Downmix DMO filter by selecting the connecting arrow and pressing delete
15. Right click again on ac3 filter and select filter properties
16. Change output to 3/2+SW 5.1 channel and click Apply
17. Reconnect the ac3 filter to the Intervideo Downmix DMO filter
18. Press play and wait until the play button turns green again (it encodes in real-time so it will take the length of the movie to encode)

Friday, May 20, 2005 11:23 PM by chrisl

# re: Introduction To GraphEdit

solution found to Audible to mp3 problems posted before...where GraphEdit crashed.

I discovered many interesting things about GraphEdit.

I did make it work, but there are some caveats:
1. only have one copy of graphedit open at a time. it is in no
way able to handle doing multiple things at once.
2. it gets hung up and confused by some of its own actions.
restart graphedit every once in a while.

So, there are a few things I discovered. All I've been trying to do is translate
Audible and wave files to mp3. Because there's no documentation, trial and
error is the only way ;-(

The input file "filter" is almost always the "File Source Async" that's in the
directshow hierarchy. The output -- well, that's where it gets amusing.
If you're trying to output to a wave file, you use the File Writer filter that's
in DirectShow. But if you're trying to output to an MP3, you have to use
the "Dump" filter that's in Directshow.

So, now for the MP3 codec: I found that the LAME one didn't work at all
on my system. I believe the one I used was the MPEG-Layer-3 filter that's
under the Audio Compressors hierarchy.

Finally, don't forget to save your graphs frequently. ALSO, if you are using an input file DO NOT DELETE or rename that input file: if you do, the graph can't be opened again. (at least it is when you're using the File Source (Async) input filter. So, you'll want to use a dummy file called do.not.delete.wav (or whatever format) to preserve your graph files.

Sunday, August 14, 2005 2:34 PM by chrisl

# re: Introduction To GraphEdit

Hi

Can you provide any link/resource that can help in understanding the functions of various filters under the DirectShow that come along with GraphEdit. It would be a great help for novices like me! Thanks...

Expecting a timely reply out of Christmas celebrations....

Sunday, December 18, 2005 12:56 PM by Gursharan

# Introduction To GraphEdit

I need to play a video file and, at the same time, I need to see its audio waveform.
Any suggestions? Thanks.

Thursday, January 26, 2006 6:08 AM by david

# re: Streaming Video

Hi,
Can GraphEdit be used to save streaming video, and at the same time use an encoder to read from the same file, whilst it is being written to by the GraphEdit.
In this way I can then encode ... decode ... and view decoded file of live streaming video (with minimum delay).
Thanks,
Richard
levtov49@yahoo.com

Sunday, April 02, 2006 5:55 AM by Richard Stein

# re: Could someone present the whole process of converting 3ivx to DivX?

I have recently downloaded a version of GraphEdit, so I'm a true beginner with this programme although I work as an expert with VirtualDub. The current version of VirtualDub does not support any container-file that suggests a 3ivx codec. Same problem seem to occur in GSpot. Could you help me with a terse message on converting 3ivx TO DivX using GraphEdit? Someone should notice the incompatibility of 3ivx sound (3ivx Audio Decoder) with popular players such as BSplayer, Media Player..., although when played in QuickTime Player the sound works really fine. Thanks :: edd_on@yahoo.com

Wednesday, July 05, 2006 1:10 AM by edd_on