INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: DirectShow playback guide/FAQ  (Read 21691 times)

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
DirectShow playback guide/FAQ
« on: March 15, 2007, 04:55:28 pm »

1. What is DirectShow? What is a DirectShow filter?

Media Center plays many media formats in DirectShow. This includes DVD and many video and audio files. DirectShow is a Microsoft technology for playing audio/video media on Windows computer.

DirectShow uses the concept of “Filter Graph”. A filter graph is built with individual “Filters”. A filter is a software component in DirectShow that will work with other components  to render a media file, each filter processes audio/video data in a specific way to facilitate the playing of the media files.

Filters have “pins” - points of connection between filters. Pins are the means by which media data is passed from one filter to another filter.

Generally speaking, there are three types of filters in terms of functionality: Source filters, transform filters, and renderer filters.

A source filter is a component that loads a media file for playback. The simplest source filter simply loads a file and passes the stream contained in the file to downstream filters for further processing, but some source filter would act as a “splitter”, by parsing the data into separate audio and video streams and then pass them down to other filters. Examples of source filters are “File Source” which reads data from a file, “TV tuner filter” which tunes to a TV channel, and “DVD navigator filter” which reads data from a DVD disk.

A transform filter is a filter that accepts media data from an upstream filter, process the data, and passes the data to a downstream filter. Therefore a transform filter must have both input and output pins (there may be more than one set of input and output pins on a given filter). An input pin connects to the output pin of an upstream filter (such as a source filter, which generally has only output pins). An output pin on a transform filter connects to an input pin of a downstream filter , such as a renderer filter, which has only input pins, or another transform filter. A decoder filter is a typical example of a transform filter.

A renderer filter is a component that renders a media stream, and is thus the last stage in DirectShow filter graph. For example an audio renderer is one that sends audio data to a sound card. A video renderer displays video to your computer screen.


2. What version of DirectX do I need?

In order to play media using DirectShow, you must have Microsoft DirectX installed. We recommend DirectX 9.0c to take advantage of features that are available only in late versions. This version is already installed on Windows XP and later operating systems, and you do not need to do anything in most cases. For earlier versions of Windows operating system, we recommend you download it from Microsoft website and install  it.


3. Why do I need to get DirectShow filters?

In order to play media files in DirectShow, one must have DirectShow filters that can handle the media types to be played. DirectShow comes with some of the filters that are needed, for example video and audio renderers. DirectShow, however, does not include all filters that are needed. You must make sure you have needed filters for the file types you want to play. DirectShow filters come from a variety of sources. We do not, and can not, include all filters that are needed in Media Center‘s installation.  In most cases you will need to install decoder filters from other sources. For example in order to play DVD on your computer you must have DVD capable MPEG-2 video decoder, and audio decoder(s) that are capable of decoding MPEG-2 audio and/or AC3 audio formats.

Some computers do come with certain filters installed by the computer vendor. However, the filters preinstalled may not be top-notch filters. In such case it is to your advantage to find and install better filters..

4. How do I install DirectShow filters?

It depends on the filter. Some filters come with an installation program. You just need to execute the program, and the installation wizard will guide you through the process. Most filter packs are installed this way.

Not all  filters come with an installation wizard. Instead they are just one or more files with file extension .ax or .dll, often contained in an archival file (ZIP or RAR). In such a case, you can first extract the file(s) into a folder (any folder is fine, for example “C:\Program Files\DirectShow Filters\“ would be a good choice). Then register the filter using Windows program Regsvr32.exe. This program exists on every Windows computer. For example, if you downloaded a filter whose file name is NewFilter.ax, and you place the file in “C:\Program Files\DirectShow Filters\“, you can register it by clicking Start button and choose “Run…” command and enter the following line (including quotes):

regsvr32.exe "C:\Program Files\DirectShow Filters\newfilter.ax" 

and click OK. A dialog box should pop up saying "DLLRegisterServer in C:\Program Files\DirectShow Filters\newfilter.ax succeeded", indicating that the filter is now registered with the system.

Some filters may come with two versions of them, a Unicode version and a non-Unicode verion. You should register the Unicode version as Media Center supports Unicode.

You can also unregister a filter, in case you decide you no longer need the filter, by using the command line parameter /U. For example to unregister the filter registered in the above example, you issue this command:

regsvr32.exe /U "C:\Program Files\DirectShow Filters\newfilter.ax" 

You will also get a confirmation saying “DllUnRegisterServer in C:\Program Files\DirectShow Filters\newfilter.ax succeeded.”
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: DirectShow playback guide/FAQ
« Reply #1 on: March 15, 2007, 04:55:44 pm »

5. What filters do I need and where do I get them?

The answer depends on what media format you want to play. In general you will need decoder filters and, in many cases, you will also need splitter filters. You can obtain commercial filters from various vendors. You can also get free, open source, filters. In this guide we will tell you about some free filters.

Before getting to individual media formats, it is a good idea introducing/recommending the following multi-filter pack and multi-format decoders:

CCCP - Combined Community Codec Pack

This is a great multiple-filter pack that provides filters for playback of most media formats, including DVD. CCCP includes FFDShow (see below), which can be used to decode a large number of media formats, MPV video decoder which decodes DVD and other MPEG-2 video, and Haali Media Splitter that can be used for playback of many media types.

Make sure you read instructions before installing CCCP. As a general rule, you should uninstall any previously installed codec packs, as different codec packs often conflict with each other. You should also uninstall previously installed individual filters that CCCP includes, such as FFDShow, Haali Media Splitter. This way you will be sure CCCP install and configure the filters properly.

Additionally, when installing CCCP, make sure you uncheck the option to install FLV Splitter. The version of FLV splitter included with CCCP does not work well. See "FLV" below.

FFDShow

FFDShow is a Multi-Format Decoder filter with major Post Processing capabilities.
It can be used to decode many video and audio formats. CCCP includes FFDShow. If you choose not to install CCCP, you should consider installing FFDShow.

It can be difficult for users to find a good version as there are too many different versions/builds out there.

A fairly stable but older version can be found here (ffdshow-20051129.exe)

People have had good experience with Celtic Druid's builds. You can find new builds here.

Even newer versions can be found at FFDShow tryouts.

Very good FFDshow primer on AVS:  AVS FFDshow Config Primer

DVD

For DVD playback, you need DVD capable MPEG-2 video decoder and MPEG-2 / AC3 audio decoder. These filters may or may not already exist on your computer. Some computers come with filters for DVD; some do not.  Filters may also come with installation of some third-party software.  If you do not already have the needed filters, you may need to install them. Commercial decoders are available from various vendors. Free decoders are available and described below.

CCCP can be used for DVD playback (see above).

Alternatively you can try these filters:

Video decoders:

DScaler 5. This is still in alpha. Therefore expect to have some problems with it. I have had only one problem though. It is related to DVD menus. I experience menu problem only with one of several DVD movies I played.

Gabest Universal Open Source MPEG Video Decoder

Older versions of FFDShow video decoder do not work well with DVD (even though it has user interface to turn on DVD decoding capability). Newer versions maybe able to decode DVD.

Audio decoders:

FFDShow Audio decoder works well with DVD.

DScaler 5 (DScaler 5 includes both an audio decoder and a video decoder).

AC3Filter.

mp4 / m4a / m4v

In order to play these types of files in DirectShow engine, you will need not only decoder filters but also splitter filters.

Splitter:

You can use Haali Splitter, or MP4 splitter.

Decoder:

FFDShow (see above) is a good choice.


3ivx has a filter pack that includes all filters (splitter and decoders) needed for mp4 type. It is however not free.

FLV

FLV, flash video, is a format widely used for streaming. For example Google video and YouTube use this format. This format should play correctly in Media Center without user actions. However, if you do have problem playing them, you need to make sure the following filters are properly installed and configured.

FFDShow (see above).

You need to configure it so it will decode FLV video. Media Center should configure it for you automatically, but here is how you can do it manually:

Start -> All Programs -> FFDShow (or Combined Community Codec Pack) -> FFDShow Video Decoder Configuration.
Choose "Codecs" from the top of the left panel. On the right panel, find FLV1 in the first column ("Format"), and change the value in the second column ("Decoder") from "disabled" to "libavcodec". Click OK.

FLV Splitter

Download and unzip it. Register it.

Note: The latest CCCP also includes a version of FLVsplitter that does not work with Google/YouTube videos. You should use the version linked here (built by Celtic Druid), which, in addition to being able to play FLV1 videos from Google/YouTube when used with FFDShow, also includes an FLV Video Decoder filter which decodes FLV4 format (FFDShow decodes FLV1).

To be completed ...
Logged
Yaobing Deng, JRiver Media Center

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: DirectShow playback guide/FAQ
« Reply #2 on: March 15, 2007, 04:57:34 pm »

The above are my first incomplete draft of a DirectShow guide.

I am still working on it.

Comments/correction/addition are welcome. Please post them in this thread. All previously posted comments and questions have been moved there.

Yaobing
Logged
Yaobing Deng, JRiver Media Center

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: DirectShow playback guide/FAQ
« Reply #3 on: March 19, 2007, 03:37:55 pm »

Nice, I Have Been Wondering, About All the Above....

Recently JimH Said Nero May Have Some Problems In this Area, I Have Had Nero 7.0 On This Computer, It Has Been Uninstalled.

Now I Am Wondering If All Of The Filters Etc... For Nero Have Been Uninstalled. How Do I Know?

The Reason I Say This Is I Do Have Lockups From Time To Time (One yesterday) When MC Was Doing Something (I Could Hear The Drive Head Moving), And Then It Froze (Maybe When It Was Trying To Import) No Clue.

I Also Had Easy Media Creator 9 On This Computer, So I Could have A Duel Problem If Roxio Filters Etc.. Are A Problem.

As I Said I Uninstalled Them But Now I Am Wondering....
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Mike Noe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 792
Re: DirectShow playback guide/FAQ
« Reply #4 on: March 19, 2007, 04:05:45 pm »

For checking, registering, unregistering filters and test rendering, I use the CCCP Insurgent.

There are others, but the Insurgent is just a little easier to follow for a noob like me.  :D
Logged
openSUSE TW/Plasma5 x86_64 | Win10Pro/RX560
S.M.S.L USB-DAC => Transcendent GG Pre (kit) => Transcendent mono OTLs (kit)
(heavily modded) Hammer Dynamics Super-12s (kit)
(optionally) VonSchweikert VR8s

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72441
  • Where did I put my teeth?
Re: DirectShow playback guide/FAQ
« Reply #5 on: March 20, 2007, 09:23:05 am »

A related thread on Dscaler and FFDshow:
http://yabb.jriver.com/interact/index.php?topic=39518.0
Logged

InflatableMouse

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3978
Re: DirectShow playback guide/FAQ
« Reply #6 on: March 21, 2007, 01:47:13 pm »

Great helpful stuff!

Thank you!
Logged

adamsp70

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • Unwired for sound...
Re: DirectShow playback guide/FAQ
« Reply #7 on: March 29, 2007, 04:47:06 am »

This FAQ is fantastic - thank you.

I have a question about hardware acceleration. My Epia EX10000EG board supposedly does MPEG-2/4 and WMV9 acceleration but i'm not sure how you configure MC to use that (or whether it just happens automatically)?

Any clues gratefully received.....
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: DirectShow playback guide/FAQ
« Reply #8 on: March 29, 2007, 08:45:20 am »

This FAQ is fantastic - thank you.

I have a question about hardware acceleration. My Epia EX10000EG board supposedly does MPEG-2/4 and WMV9 acceleration but i'm not sure how you configure MC to use that (or whether it just happens automatically)?

Any clues gratefully received.....


MC does not configure that.  It should happen automatically, or you may configure it with a decoder. MC does have an option however to "Use WMV Acceleration if available".  This applies to WMV files. You should check that option in order to take advantage of WMV acceleration.  If you have trouble playing some wmv files, such as having trouble seeking, you can try un-checking that option.
Logged
Yaobing Deng, JRiver Media Center

adamsp70

  • Regular Member
  • World Citizen
  • ***
  • Posts: 247
  • Unwired for sound...
Re: DirectShow playback guide/FAQ
« Reply #9 on: March 29, 2007, 08:48:11 am »

Thanks for the reply - i'm not having trouble, just it's very hard for someone (like me) to work out whether the hardware i've spent money on is actually being put to good use!

If it's all automatic, i should just trust it i guess ;-)
Logged

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: DirectShow playback guide/FAQ
« Reply #10 on: March 29, 2007, 01:58:44 pm »

Thanks for the reply - i'm not having trouble, just it's very hard for someone (like me) to work out whether the hardware i've spent money on is actually being put to good use!

If it's all automatic, i should just trust it i guess ;-)


What I meant to say, but I don't think I said it clearly, is "Avoid WMV Acceleration" option is on by default currently (I will change that). Therefore, in order to use hardware acceleration for wmv files, you need to make sure to turn off that option first. It is at Tools -> Options -> Playback -> DirectShow Playback Settings...


Logged
Yaobing Deng, JRiver Media Center

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72441
  • Where did I put my teeth?
Re: DirectShow playback guide/FAQ
« Reply #11 on: May 16, 2007, 08:08:48 am »

A bump to bring this back to the top.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #12 on: May 16, 2007, 11:38:32 am »

I just added this to the Wiki, including editing it to add some additional information.  It's still not done, but I made some headway.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Yaobing

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10926
  • Dogs of the world unite!
Re: DirectShow playback guide/FAQ
« Reply #13 on: May 16, 2007, 04:22:30 pm »

A big THANKS to you glynor.
Logged
Yaobing Deng, JRiver Media Center

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #14 on: May 16, 2007, 06:06:55 pm »

A big THANKS to you glynor.

No problem.  I'd been meaning to do it for quite a long time (tired of answering all those questions with "search for CCCP and my name").

I actually just spent a little more time editing the page to add other information on alternative decoders (CoreAVC and the ATI/AMD and Nvidia options) among other things.  Let me know what you think!
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72441
  • Where did I put my teeth?
Re: DirectShow playback guide/FAQ
« Reply #15 on: May 16, 2007, 07:06:33 pm »

No problem.  I'd been meaning to do it for quite a long time (tired of answering all those questions with "search for CCCP and my name").
You could change your signature.

And ditto Yaobing's BIG Thanks.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #16 on: May 16, 2007, 08:59:29 pm »

You could change your signature.

Actually, I just tried and I can't.  The forum's 120 character Signature limit seems to apply even to BBCode entered into the Signature editor field, so I can't paste in the URL or it uses up all my available characters.  Too bad, or I would add a nice little tag to my sig.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72441
  • Where did I put my teeth?
Re: DirectShow playback guide/FAQ
« Reply #17 on: May 16, 2007, 09:05:12 pm »

Actually, I just tried and I can't.  The forum's 120 character Signature limit seems to apply even to BBCode entered into the Signature editor field, so I can't paste in the URL or it uses up all my available characters.  Too bad, or I would add a nice little tag to my sig.
OK.  It's 240 now.  Try again.  And thanks!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #18 on: May 17, 2007, 03:48:43 pm »

I've spent a little more time updating the Wiki version of the FAQ...  I've actually split out some of the more detailed "Alternative Options" into sub-pages from the "Parent" FAQ.  The page was getting too long and was running into some of the MediaWiki size limitations.   :o

One thing I'd love some help with, if anyone has the time (cough...Mastiff...cough) is help on the DScaler section of the FAQ and just the DVD playback stuff in general.  I know DScaler is powerful and can be used with FFDSHOW to really improve DVD playback quality, but I just don't have the time or the chops to really figure it all out.  I know some of you do though, so step up!

As I've mentioned once or twice before, I'm not a DVD user really.  When I get a DVD, the first thing I do is rip it onto the computer, compress it to x264, and then stick the DVD on a shelf somewhere.  I make DVDs for my job, and I know quite a bit about the authoring side of the business, but I'm not a DVD Filter wizard... So, any help there would be greatly appreciated.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

vine-au

  • Junior Woodchuck
  • **
  • Posts: 65
  • negative, I am a meat popsicle...
Re: DirectShow playback guide/FAQ
« Reply #19 on: May 18, 2007, 05:37:50 am »

Nice post, very informative. I might suggest you also put on a link to the K-Lite codec pack. I find it a lot more useful than CCCP.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #20 on: May 23, 2007, 10:03:10 am »

Thought I'd mention, since this is fairly cool.  The DirectShow Playback Guide on the Wiki is now the #2 hit on Google when searching for directshow guide (no quotes), right under Microsoft's guide.

Oh, and...

I might suggest you also put on a link to the K-Lite codec pack.

I did.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72441
  • Where did I put my teeth?
Re: DirectShow playback guide/FAQ
« Reply #21 on: May 23, 2007, 10:12:04 am »

Nice!  Maybe a link should be added here?
http://en.wikipedia.org/wiki/DirectShow
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: DirectShow playback guide/FAQ
« Reply #22 on: May 23, 2007, 10:31:31 am »

Done.   :)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/
Pages: [1]   Go Up