Jump to: navigation, search

DirectShow Basic Overview

DirectShow was created by Microsoft. DirectShow performs many different types of operations on media files or media streams such as an mp4 or mkv video. DirectShow is a filter based framework that can render or record media files based on what the user, or developer wants to do. Microsoft has mentioned that DirectShow is going to be replaced by the Media Foundation in future Windows releases, or at least that's what Wikipedia said. DirectShow can be used by madVR to render video.

DirectShow was the Windows standard for video playback starting with Windows 98 up until like now which is 2015. DirectShow is still around today and has been included in the SDK for Windows, and also has some enhancements like DXVA2

DirectShow splits up the video playback processes into a sequence of processing steps, with each step performing another operation on the media file. Each step is considered a "filter", which can be connected to other filters in different orders, allowing for a ton of configuration options in terms of what filters to use and in what order.

Window's looks up the list of available filters in it's registry and uses what ones are available and asked for. Many codec pack provide many of these filters, but depending on what you are doing, you may not need tons of these.

The 3 general media filter types are:

  • Source Filter -- The source filter deals with the raw media file, it handles IO, so reading data from the file, or writing data to a file. This is the filter at then "beginning" or "end" of the processing chain. Source filters read data from a file, such as .mp4 or .mkv, decide what to do with the streams based on the file's metadata and ultimately pass the raw streams to the next filter, which is know as the "Transform Filter".
  • Transform Filter -- The transform filter modifies the data that came from the last filter's output. Essentially the transform filter gets data from the source filter, after that you start piping data between various amounts of filters which might be resizing the video resolution, or adding subtitles to the video. Media Stream splitter (parser) and decoder filters are examples of filters in the Transform group. You can have lots of transform filters that all work together to perform various tasks to the audio and video streams which get split up once it hits the transform group. If you are familiar with Linux and the concept of "Pipes" then you should understand what's going on here, essentially each transform filter runs an operation / command and then pipes it's output to be used as the next command / operation's input.
  • Renderer Filter-- The renderer filter sends the audio from the media file from the last transform filter to the soundcard to be heard by you. This filter can also write data to a file. The rendering filter plays the raw media samples . This is where the streams from the transform filters get ready for primetime, so to speak.

Interesting madVR Links

MadVR Main Page PotPlayer Main Page PotPlayer DSR PotPlayer Decoder Comparison GTX 970 wiki madVR Chroma Upscaling Benchmarks
madVR 720p Chroma Upscaling Screens madVR 1080p Chroma Upscaling Screens madVR 720p Image Doubling with NNEDI3 madVR 720p Image Upscaling MadVR Processing Options NNEDI3 Main Page