I’m looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine.
I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like
Available Decoders DiVX Version 6.0 XVID Motion JPEG CompanyX's MPEG-2 Decoder Windows Media Video **Available Encoders** DiVX Version 6.0 Windows Media Video
The problem that I am running into is that there is no reliable way to to capture all of the decoders available to the system. For instance:
- You can enumerate all the decompressors using DirectShow, but this tells you nothing about the compressors (encoders).
- You can enumerate all the Video For Windows components, but you get no indication if these are encoders or decoders.
- There are DirectShow filters that may do the job for you perfectly well (Motion JPEG filter for example), but there is no indication that a particular DirectShow filter is a ‘video decoder’.
Has anyone found a generalizes solution for this problem using any of the Windows APIs? Does the Windows Vista Media Foundation API solve any of these issues?
This is best handled by DirectShow.
DirectShow is currently a part of the platform SDK.
The following call enumerates all video compressors to the console :
The MSDN page Filter Categories lists all other ‘official’ categories.
I hope that is a good starting point for you.