HOME

TheInfoList



OR:

DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a
multimedia framework A multimedia framework is a software framework that handles media on a computer and through a network. A good multimedia framework offers an intuitive API and a modular architecture to easily add support for new audio, video and container formats ...
and API produced by
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
for
software developer Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development invo ...
s to perform various operations with media files or streams. It is the replacement for Microsoft's earlier
Video for Windows Video for Windows was a suite of video playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
technology. Based on the
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
Component Object Model (COM) framework, DirectShow provides a common interface for media across various
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
s, and is an extensible,
filter Filter, filtering or filters may refer to: Science and technology Computing * Filter (higher-order function), in functional programming * Filter (software), a computer program to process a data stream * Filter (video), a software component tha ...
-based framework that can render or record media files on demand at the request of the user or developer. The DirectShow development tools and documentation were originally distributed as part of the
DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct" ...
SDK. Currently, they are distributed as part of the
Windows SDK Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
(formerly known as the Platform SDK). Microsoft plans to completely replace DirectShow gradually with
Media Foundation Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11. It is the intended replacement for Microsoft Direc ...
in future Windows versions. One reason cited by Microsoft is to provide "much more robust support for content protection systems" (see
digital rights management Digital rights management (DRM) is the management of legal access to digital content. Various tools or technological protection measures (TPM) such as access control technologies can restrict the use of proprietary hardware and copyrighted work ...
). Microsoft's Becky Weiss confirmed in 2006 that "you'll notice that working with the Media Foundation requires you to work at a slightly lower level than working with DirectShow would have. And there are still DirectShow features that aren't (yet) in Media Foundation". As described in the Media Foundation article,
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was Software release life cycle#Release to manufacturing (RTM), released to manufacturing on July 22, 2009, and became generally available on October 22, ...
applications use Media Foundation instead of DirectShow for several media related tasks.


History

The direct predecessor of DirectShow, ActiveMovie (codenamed Quartz), was designed to provide
MPEG-1 MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, making ...
support for Windows. It was also intended as a future replacement for media processing frameworks like
Video for Windows Video for Windows was a suite of video playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
and the
Media Control Interface The Media Control Interface — MCI for short — is a high-level API developed by Microsoft and IBM for controlling multimedia peripherals connected to a Microsoft Windows or OS/2 computer, such as CD-ROM players and audio controllers. MCI makes ...
, which had never been fully ported to a 32-bit environment and did not utilize COM. The development team used a pre-existing modular digital-media-processor project codenamed "Clockwork" as a basis for DirectShow. Clockwork had previously been used in the Microsoft Interactive Television project. The project was initially named "ActiveMovie", and was released in May 1996, bundled with the beta version of
Internet Explorer 3 Microsoft Internet Explorer 3 (IE3) is a graphical web browser which was announced in March 1996, and was released on August 13, 1996 by Microsoft for Microsoft Windows and on January 8, 1997 for Apple Mac OS (see IE for Mac). It began serio ...
.0. In March 1997, Microsoft announced that ActiveMovie would become part of the
DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct" ...
5 suite of technologies, and around July started referring to it as DirectShow, reflecting Microsoft's efforts at the time to consolidate technologies that worked directly with hardware under a common naming scheme. DirectShow became a standard component of all Windows operating systems starting with
Windows 98 Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
; however it is available on
Windows 95 Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturi ...
by installing the latest available DirectX redistributable. In DirectX version 8.0, DirectShow became part of the core DirectX SDK along with other DirectX APIs. In October 2004, DirectShow was removed from the main DirectX distribution and relocated to the DirectX Extras download. In April 2005, DirectShow was removed entirely from DirectX and moved to the Windows SDK starting with the Windows Server 2003 SP1 version of the SDK. The DirectX SDK was, however, still required to build some of the DirectShow samples. Since November 2007, DirectShow APIs are part of the
Windows SDK Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
. It includes several new enhancements, codecs and filter updates such as the
Enhanced Video Renderer Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11. It is the intended replacement for Microsoft Direc ...
(EVR) and DXVA 2.0 (
DirectX Video Acceleration DirectX Video Acceleration (DXVA) is a Microsoft API specification for the Microsoft Windows and Xbox 360 platforms that allows video decoding to be hardware-accelerated. The pipeline allows certain CPU-intensive operations such as iDCT, motion ...
).


Architecture

DirectShow divides a complex multimedia task (e.g. video playback) into a sequence of fundamental processing steps known as
filters Filter, filtering or filters may refer to: Science and technology Computing * Filter (higher-order function), in functional programming * Filter (software), a computer program to process a data stream * Filter (video), a software component that ...
. Each filterwhich represents one stage in the processing of the datahas input and/or output ''pins'' that may be used to connect the filter to other filters. The generic nature of this connection mechanism enables filters to be connected in various ways so as to implement different complex functions. To implement a specific complex task, a developer must first build a
filter graph A filter graph is used in multimedia processing - for example, to capture video from a webcam. Filters take input, process it (or change the input), and then output the processed data. For example: a video codec takes raw uncompressed video and ...
by creating instances of the required filters, and then connecting the filters together. There are three main types of filters: ;Source filters: These provide the source streams of data. For example, reading raw bytes from any media file. ;Transform filters: These transform data that is provided from other filter's output. For example, doing a transform such as adding text on top of video or uncompressing an MPEG frame. ;Renderer filters: These render the data. For example, sending audio to the sound card, drawing video on the screen or writing data to a file. During the rendering process, the filter graph searches the
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and ...
for registered filters and builds its graph of filters based on the locations provided. After this, it connects the filters together, and, at the developer's request, executes (i.e., plays, pauses, etc.) the created graph. DirectShow filter graphs are widely used in video playback (in which the filters implement functions such as file parsing, video and audio demultiplexing, decompressing and rendering) as well as for video and audio recording, editing, encoding, transcoding or network transmission of media. Interactive tasks such as DVD navigation may also be controlled by DirectShow. In the above example, from left to right, the graph contains a ''source filter'' to read an MP3 file,
stream A stream is a continuous body of surface water flowing within the bed and banks of a channel. Depending on its location or certain characteristics, a stream may be referred to by a variety of local or regional names. Long large streams ...
splitter and decoder filters to parse and decode the audio, and a ''rendering filter'' to play the raw audio samples. Each filter has one or more pins that can be used to connect that filter to other filters. Every pin functions either as an output or input source for data to flow from one filter to another. Depending on the filter, data is either "pulled" from an input pin or "pushed" to an output pin in order to transfer data between filters. Each pin can only connect to one other pin and they have to agree on what kind of data they are sending. Most filters are built using a set of C++ classes provided in the DirectShow SDK, called the DirectShow Base Classes. These handle much of the creation, registration and connection logic for the filter. For the filter graph to use filters automatically, they need to be registered in a separate DirectShow registry entry as well as being registered with COM. This registration can be managed by the DirectShow Base Classes. However, if the application adds the filters manually, they do not need to be registered at all. Unfortunately, it is difficult to modify a graph that is already running. It is usually easier to stop the graph and create a new graph from scratch. Starting with DirectShow 8.0, dynamic graph building, dynamic reconnection, and filter chains were introduced to help alter the graph while it was running. However, many filter vendors ignore this feature, making graph modification problematic after a graph has begun processing. Although DirectShow is capable of dynamically building a graph to render a given media type, in certain instances it is difficult for developers to rely on this functionality and they need to resort to manually building filter graphs if the resulting filter graph is variable. It is possible for filter graphs to change over time as new filters are installed on the computer.


Features

By default, DirectShow includes a number of filters for decoding some common media file formats such as
MPEG-1 MPEG-1 is a standard for lossy compression of video and audio. It is designed to compress VHS-quality raw digital video and CD audio down to about 1.5 Mbit/s (26:1 and 6:1 compression ratios respectively) without excessive quality loss, making ...
,
MP3 MP3 (formally MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio developed largely by the Fraunhofer Society in Germany, with support from other digital scientists in the United States and elsewhere. Origin ...
,
Windows Media Audio Windows Media Audio (WMA) is a series of audio codecs and their corresponding audio coding formats developed by Microsoft. It is a proprietary technology that forms part of the Windows Media framework. WMA consists of four distinct codecs. The ...
,
Windows Media Video Windows Media Video (WMV) is a series of video codecs and their corresponding video coding formats developed by Microsoft. It is part of the Windows Media framework. WMV consists of three distinct codecs: The original video compression technol ...
,
MIDI MIDI (; Musical Instrument Digital Interface) is a technical standard that describes a communications protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and ...
, media containers such as
AVI Avi is a given name, usually masculine, often a diminutive of Avram, Avraham, etc. It is sometimes feminine and a diminutive of the Hebrew spelling of Abigail. People with the given name include: * Avi (born 1937), Newbery award-winning Americ ...
, ASF, WAV, some splitters/demultiplexers, multiplexers, source and
sink A sink is a bowl-shaped plumbing fixture for washing hands, dishwashing, and other purposes. Sinks have a tap (faucet) that supply hot and cold water and may include a spray feature to be used for faster rinsing. They also include a drain t ...
filters, some static image filters, and minimal
digital rights management Digital rights management (DRM) is the management of legal access to digital content. Various tools or technological protection measures (TPM) such as access control technologies can restrict the use of proprietary hardware and copyrighted work ...
(DRM) support. DirectShow's standard format repertoire can be easily expanded by means of a variety of filters, enabling DirectShow to support virtually any container format and any audio or video codec. For example, filters have been developed for
Ogg Vorbis Vorbis is a free and open-source software project headed by the Xiph.Org Foundation. The project produces an audio coding format and software reference encoder/decoder (codec) for lossy audio compression. Vorbis is most commonly used in conjun ...
,
Musepack Musepack or MPC is an open source lossy audio codec, specifically optimized for transparent compression of stereo audio at bitrates of 160–180 (manual set allows bitrates up to 320) kbit/s. It was formerly known as MPEGplus, MPEG+ or MP+ ...
, and AC3, and some codecs such as MPEG-4 Advanced Simple Profile, AAC,
H.264 Advanced Video Coding (AVC), also referred to as H.264 or MPEG-4 Part 10, is a video compression standard based on block-oriented, motion-compensated coding. It is by far the most commonly used format for the recording, compression, and distr ...
,
Vorbis Vorbis is a free and open-source software project headed by the Xiph.Org Foundation. The project produces an audio coding format and software reference encoder/decoder ( codec) for lossy audio compression. Vorbis is most commonly used in con ...
and containers MOV, MP4 are available from 3rd parties like
ffdshow ffdshow is an open-source unmaintained codec library that is mainly used for decoding of video in the MPEG-4 ASP (e.g. encoded with DivX or Xvid) and H.264/MPEG-4 AVC video formats, but it supports numerous other video and audio formats as we ...
,
K-Lite The K-Lite Codec Pack is a collection of audio and video codecs for Microsoft Windows DirectShow that enables an operating system and its software to play various audio and video formats generally not supported by the operating system itself. Th ...
, and CCCP. Incorporating support for additional codecs such as these can involve paying the licensing fees to the involved codec technology developer or patent holder. Finally, there are "bridge" filters that simultaneously support multiple formats, as well as functions like stream multiplexing, by exposing the functionality of underlying multimedia APIs such as VLC. The amount of work required to implement a filter graph depends on several factors. In the simplest case, DirectShow can create a filter graph automatically from a source such as a file or URL. If this is not possible, the developer may be able to manually create a filter graph from a source file, possibly with the addition of a custom filter, and then let DirectShow complete the filter graph by connecting the filters together. At the next level, the developer must build the filter graph from scratch by manually adding and connecting each desired filter. Finally, in cases where an essential filter is unavailable, the developer must create a custom filter before a filter graph can be built. Unlike the main C API of QuickTime where it is necessary to call MoviesTask in a loop to load a media file, DirectShow handles all of this in a transparent way. It creates several background threads that smoothly play the requested file or URL without much work required from the programmer. Also in contrast to QuickTime, nothing special is required for loading a URL instead of a local file on diskDirectShow's filter graph abstracts these details from the programmer, although recent developments in QuickTime (including an
ActiveX control ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide Web. ...
) have reduced this disparity.


DirectShow Editing Services

''DirectShow Editing Services'' (DES), introduced in DirectX 8.0/
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
is an API targeted at video editing tasks and built on top of the core DirectShow architecture. ''DirectShow Editing Services'' was introduced for Microsoft's
Windows Movie Maker Windows Movie Maker (known as Windows Live Movie Maker for the 2009 and 2011 releases) is a discontinued video editing software program by Microsoft. It was first included in Windows Me on September 14, 2000 and in Windows XP on October 25, 2001 ...
. It includes APIs for timeline and switching services, resizing, cropping, video and audio effects, as well as transitions, keying, automatic
frame rate Frame rate (expressed in or FPS) is the frequency (rate) at which consecutive images ( frames) are captured or displayed. The term applies equally to film and video cameras, computer graphics, and motion capture systems. Frame rate may also be ...
and
sample rate conversion Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the sampling rate or sampling frequency of a discrete signal to obtain a new discrete representation of the underlying continuous signal. Application ...
and such other features which are used in non-linear video editing allowing creation of composite media out of a number of source audio and video streams. DirectShow Editing Services allow higher-level run-time compositing, seeking support, and graph management, while still allowing applications to access lower-level DirectShow functions. While the original API is in C++, DirectShow Editing Services is accessible in any Microsoft .NET compatible language including Microsoft Visual C# and Microsoft
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to: * Visual Basic .NET (now simply referred to as "Visual Basic"), the current version of Visual Basic launched in 2002 which runs on .NET * Visual Basic ( ...
by using a third-party code library called "DirectShowNet Library". Alternatively, the entire DirectShow API, including DirectShow Editing Services, can be accessed from
Borland Delphi Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, ...
5, 6 and 7,
C++ Builder C++Builder is a rapid application development (RAD) environment, originally developed by Borland and owned by Embarcadero Technologies (a subsidiary of Idera), for writing programs in the C++ programming language currently targeting Windows ( ...
6, and from later versions with a few minor modifications, using a third party software library called "DSPack". As of March, 2012 (and, apparently as early as 2009), Microsoft has stated that the DirectShow Editing Services "API is not supported and may be altered or unavailable in the future."


Video rendering filters

Originally, in
Windows 9x Windows 9x is a generic term referring to a series of Microsoft Windows computer operating systems produced from 1995 to 2000, which were based on the Windows 95 kernel and its underlying foundation of MS-DOS, both of which were updated in sub ...
, DirectShow used the ''Video Renderer'' filter. This drew the images using
DirectDraw DirectDraw (ddraw.dll) is an API that used to be a part of Microsoft's DirectX API. DirectDraw is used to accelerate rendering of 2D graphics in applications. DirectDraw also allows applications to run fullscreen or embedded in a window such as m ...
3, but could also fall back to
GDI GDI may refer to: Science and technology * Gasoline direct injection, a type of fuel injection * Graphics Device Interface, a component of Microsoft Windows * Guanosine nucleotide dissociation inhibitor, a protein Organisations * Gabriel Dumont I ...
or
overlay Overlay may refer to: Computers *Overlay network, a computer network which is built on top of another network *Hardware overlay, one type of video overlay that uses memory dedicated to the application *Another term for exec, replacing one process ...
drawing modes in some circumstances (depending upon the visibility of the video window and the video card's capabilities). It had limited access to the video window.
Video for Windows Video for Windows was a suite of video playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
had been plagued with
deadlock In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a loc ...
s caused by applications' incorrect handling of the video windows, so in early DirectShow releases, the handle to the playback window was hidden from applications. There was also no reliable way to draw caption text or graphics on top of the video. DirectShow 6.0, released as part of
DirectX Media DirectX Media is a set of multimedia-related APIs for Microsoft Windows complementing DirectX. Retained Mode was used by a variety of applications and can still be implemented on systems newer than XP by copying the ''d3drm.dll'' file from an ol ...
introduced the ''Overlay Mixer'' renderer designed for DVD playback and
broadcast Broadcasting is the distribution of audio or video content to a dispersed audience via any electronic mass communications medium, but typically one using the electromagnetic spectrum (radio waves), in a one-to-many model. Broadcasting began wi ...
video streams with
closed captioning Closed captioning (CC) and subtitling are both processes of displaying text on a television, video screen, or other visual display to provide additional or interpretive information. Both are typically used as a transcription of the audio po ...
and
subtitles Subtitles and captions are lines of dialogue or other text displayed at the bottom of the screen in films, television programs, video games or other visual media. They can be transcriptions of the screenplay, translations of it, or informa ...
. The ''Overlay Mixer'' uses DirectDraw 5 for rendering. Downstream connection with the ''Video Renderer'' is required for window management. ''Overlay Mixer'' also supports Video Port Extensions (VPE), enabling it to work with analog TV tuners with overlay capability (sending video directly to a video card via an analog link rather than via the
PCI bus PCI may refer to: Business and economics * Payment card industry, businesses associated with debit, credit, and other payment cards ** Payment Card Industry Data Security Standard, a set of security requirements for credit card processors * Prov ...
). ''Overlay Mixer'' also supports
DXVA DirectX Video Acceleration (DXVA) is a Microsoft API specification for the Microsoft Windows and Xbox 360 platforms that allows video decoding to be hardware-accelerated. The pipeline allows certain CPU-intensive operations such as iDCT, mo ...
connections. Because it always renders in
overlay Overlay may refer to: Computers *Overlay network, a computer network which is built on top of another network *Hardware overlay, one type of video overlay that uses memory dedicated to the application *Another term for exec, replacing one process ...
, full-screen video to
TV-out The term TV-out is commonly used to label the connector of equipment providing an analog video signal acceptable for a television AV input. TV-out is different from AV-out in that it only provides video, no audio. Types of signals and their re ...
is always activated. Starting with
Windows XP Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
, a new filter called the ''Video Mixing Renderer 7'' (''VMR-7'' or sometimes just referred to as ''VMR'') was introduced. The number 7 was because VMR-7 only used
DirectDraw DirectDraw (ddraw.dll) is an API that used to be a part of Microsoft's DirectX API. DirectDraw is used to accelerate rendering of 2D graphics in applications. DirectDraw also allows applications to run fullscreen or embedded in a window such as m ...
version 7 to render the video and did not have the option to use GDI drawing. The main new feature of VMR-7 was the ability to mix multiple streams and graphics with alpha blending, allowing applications to draw text and graphics over the video and support custom effects. It also featured a "windowless mode" (access to the composited image before it is rendered) which fixed the problems with access to the window handle. DirectX 9 introduced ''VMR-9'', which is included in Windows XP SP2 and newer. This version uses
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
9 instead of DirectDraw, allowing developers to transform video images using the Direct3D pixel shaders. It is available for all Windows platforms as part of the DirectX 9 redistributable. As ''VMR-7'' it provides a Windowless Mode. However, unlike ''Overlay mixer'' or ''VMR-7'' it does not support video ports. Using the /3GB boot option may cause VMR-9 to fail.
Windows Vista Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
and
Windows 7 Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was Software release life cycle#Release to manufacturing (RTM), released to manufacturing on July 22, 2009, and became generally available on October 22, ...
ship with a new renderer, available as both a
Media Foundation Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11. It is the intended replacement for Microsoft Direc ...
component and a DirectShow filter, called the ''Enhanced Video Renderer'' (''EVR''). EVR is designed to work with
Desktop Window Manager Desktop Window Manager (DWM, previously Desktop Compositing Engine or DCE) is the compositing window manager in Microsoft Windows since Windows Vista that enables the use of hardware acceleration to render the graphical user interface of Windows ...
and supports DXVA 2.0, which is available on Windows Vista and Windows 7. It offers better performance and better quality according to Microsoft.


Reception


Awards

On January 8, 2007. Microsoft received the Emmy award for Streaming Media Architectures and Components at the 58th Annual Technology & Engineering Emmy Awards.


Simplicity

Commanding DirectShow to play a file is a relatively simple task. However, while programming more advanced customizations, such as commanding DirectShow to display certain windows messages from the video window or creating custom filters, many developers complain of difficulties. It is regarded as one of Microsoft's most complex development libraries/APIs. Developers rarely create DirectShow filters from scratch. Rather, they employ DirectShow Base Classes. The Base Classes can often simplify development, allowing the programmer to bypass certain tasks. However, the process may remain relatively complex; the code found in the Base Classes is nearly half the size of the entire MFC library. As a result, even with the Base Classes, the number of COM objects that DirectShow contains often overwhelms developers. In some cases, DirectShow's API deviates from traditional COM rules, particularly with regard to the parameters used for
methods Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
. To overcome their difficulties with DirectShow's unique COM rules, developers often turn to a higher level API that uses DirectShow, notably, ''Windows Media Player SDK'', an API provides the developer with an ActiveX Control that has fewer COM interfaces to deal with. Although DirectShow is capable of dynamically building a graph to render a given media type, in certain instances it is difficult for developers to rely on this functionality and they need to resort to manually building filter graphs if the resulting filter graph is variable. It is possible for filter graphs to change over time as new filters are installed on the computer.


Codec hell

Codec hell (a term derived from
DLL hell In computing, DLL Hell is a term for the complications that arise when one works with dynamic-link libraries (DLLs) used with Microsoft Windows operating systems, particularly legacy 16-bit editions, which all run in a single memory space. DLL Hel ...
) is when multiple DirectShow filters conflict for performing the same task. A large number of companies now develop codecs in the form of DirectShow filters, resulting in the presence of several filters that can decode the same media type. This issue is further exacerbated by DirectShow's merit system, where filter implementations end up competing with one another by registering themselves with increasingly elevated priority. Microsoft's Ted Youmans explained that "DirectShow was based on the merit system, with the idea being that, using a combination of the filter’s merit and how specific the media type/sub type is, one could reasonably pick the right codec every time. It wasn't really designed for a competing merit nuclear arms race." A tool to help in the troubleshooting of "codec hell" issues usually referenced is the GSpot Codec Information Appliance, which can be useful in determining what codec is used to render video files in
AVI Avi is a given name, usually masculine, often a diminutive of Avram, Avraham, etc. It is sometimes feminine and a diminutive of the Hebrew spelling of Abigail. People with the given name include: * Avi (born 1937), Newbery award-winning Americ ...
and other containers.
GraphEdit GraphEdit is a utility which is part of the Microsoft DirectShow SDK. It is a visual tool for building and testing filter graphs for DirectShow. Filters are displayed as boxes, with a text caption showing the name of the filter. Pins appear as sm ...
can also help understanding the sequence of filters that DirectShow is using to render the media file. Codec hell can be resolved by manually building filter graphs, using a media player that supports ignoring or overriding filter merits, or by using a filter manager that changes filter merits in the
Windows Registry The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and ...
.


End-user tools

DirectShow, being a developer-centric framework and API, does not directly offer end-user control over encoding content, nor does it incorporate a user interface for encoding using installed codecs or to different formats; instead, it relies on developers to develop software using the API. In contrast, other multimedia frameworks such as
QuickTime QuickTime is an extensible multimedia framework developed by Apple Inc., capable of handling various formats of digital video, picture, sound, panoramic images, and interactivity. Created in 1991, the latest Mac version, QuickTime X, is a ...
or
Video for Windows Video for Windows was a suite of video playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
allow end-users to perform basic video-related tasks such as re-encoding using a different codec and editing files and streams. The convenience offered by an end-user GUI is apparent since the
AVI Avi is a given name, usually masculine, often a diminutive of Avram, Avraham, etc. It is sometimes feminine and a diminutive of the Hebrew spelling of Abigail. People with the given name include: * Avi (born 1937), Newbery award-winning Americ ...
format and codecs used by
Video for Windows Video for Windows was a suite of video playing and editing software introduced by Microsoft in 1992. A runtime version for viewing videos only was made available as a free add-on to Windows 3.1, which then became an integral component of Windows ...
still remain in use, for example VirtualDub.


See also

*
DirectX Media Objects Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direc ...
*
DirectX plugin In computer music and professional audio creation, a DirectX plugin is a software processing component that can be loaded as a plugin into ''host applications'' to allow real-time processing, audio effects, mixing audio or act as virtual synthesize ...
s *
DirectX Video Acceleration DirectX Video Acceleration (DXVA) is a Microsoft API specification for the Microsoft Windows and Xbox 360 platforms that allows video decoding to be hardware-accelerated. The pipeline allows certain CPU-intensive operations such as iDCT, motion ...
* DSPlayer *
ffdshow ffdshow is an open-source unmaintained codec library that is mainly used for decoding of video in the MPEG-4 ASP (e.g. encoded with DivX or Xvid) and H.264/MPEG-4 AVC video formats, but it supports numerous other video and audio formats as we ...


References

*


External links


DirectShow on MSDN
fficial documentation
JRiver DirectShow Playback Guide
tutorial on DirectShow with general-purpose information

video processing library with DirectShow support (free for non commercial purposes)
AC3 Directshow Filter
C3 audio filters with DirectShow support
Using the DirectShow Video Mixing Renderer 9 filter
n article on using DirectShow VMR9 by Sameer Ahmed {{DEFAULTSORT:Directshow Microsoft application programming interfaces Multimedia frameworks Show DirectShow