Solving codec problems

About codec problems

This guide will show you how to solve codec problems in Windows media player. This guide can also be used to solve codec issues in other programs that use the same video playback system as Windows media player, for example the Fast video indexer video frame capture program.

DirectShow codecs

Windows media player uses something called DirectShow to play video and audio files. DirectShow is a Microsoft system that connects a number of different components called filters into a system that can for example playback video and audio streams. A typical DirectShow application that plays video uses one filter for reading data, another filter for rendering the video on screen. Depending on the video source it also need one filter for decoding the video/audio stream and perhaps one filter to separate the audio stream from the video stream. The component in DirectShow that decodes video/audio data streams is called a codec.

Possible Codecs Problems

Missing codecs

Your computer probably has more than 100 different codec filters installed. Despite this you can be sure that you don't have the required codecs installed for all available video formats. New codecs are developed daily and video formats evolve at a rapid speed. Successful video compression formats evolve over time and an old codec might not be able to decode a recent video file. Missing a codecs is one of the possible codec problems in Windows media player causing a video file not to play correctly.

Faulty Codecs

Just like in any other programs there can be bugs in the codecs. These bugs can be anything from, simple errors that causes certain files not to play to, errors the causes the program that uses the codec to crash. Just installing the latest codec is not guaranteed to solve issue as codecs are continuously developed and sometimes new issues are introduced in the latest version of a popular codec.

Finding the codec problem

GSpot

Gspot is a really useful free program that is used to detect and solve codec problems. Download the latest version from here. GSpot does not need to be installed, simply download it to a folder and run the program from the installation folder.

Get video information

In GSpot select file open and open the video file you have problems with. GSpot will load the file and list a alot of useful information about it.

gspot shown with an mp4 file loaded
An MP4 video loaded in GSpot

Video container format

In the container area you can learn about the container format i.e. the file format used by the video file. Sometimes when a video does not play it is not the codec that is missing but rather that your computer does not have installed support for the container format. You then need to search for a splitter filter that supports the container format. The most common file formats causing this problem are Quicktime, Realmedia and mpeg.

Audio codec

The audio area gives information about the audio format used in the video file. Just like there are different codecs for video there are different codecs for audio. If you have a video file you can watch but the sound is missing it is most likely due to a missing or faulty audio codec.

Video compression used

When a video is loaded in GSpot the “video” information area will display information about the video stream in the video file. The upper left text area shows the videos fourcc code in the field labeled codec. The fourcc code is a way to identify the compression used on the video file. If you have the fourcc code it is quite easy to search for a codec on the internet. A few programs like Fast video indexer uses the fourcc code to automatically suggest a codec you can try. Often this solves the issue but not always as you surely understand if you are reading this.

fast video indexer suggesting a codec
Fast video indexer suggest a codec to download

Resolving the codec problem

Auto solution to codec issues

At the bottom of the GSpot window you have an area for auto solutions for codec issues titled “Proposed codec solutions and tests”. This is what you first test to diagnose your codec issues. Gspot has two different diagnostics systems.
When your video file has loaded into GSpot start by clicking the “1” button below the “GSpot” text to get suggested codecs, if this works go on to press the button two below and last press the button “3” to verify it really works.
The other solution is to try to use DirectShow to connect the video decoder. Click the “1” button below “MS” to try this. If it works you will see a message to the right about which filters were used to play the file.

Installed codecs

If you select “list codecs and other filers” from the system menu in GSpot you will see a window showing all DirectShow filters installed on your computer. This lists not only show video decoders but all components that can be used by DirectShow applications. For each filter you can see the actual file where the filter is implemented. If GSpot has detected a problem with a specific component it will be marked in red. Typically this happens if the file has been removed but the filter is still registered on your computer.

Missing a file
A registered codec is missing a required file

Media types

If you select “list media types” from the system menu you will get a list of all media types supported on your computer.
Designation is what the specific media type is called, often its fourcc code.
Major type is the registered major media type, most common is MEDIATYPE_video and MEDIATYPE_audio.
Minor media type is more specific what type of video/audio the media is, i.e. the compression format. When a DirectShow program search for a codec it often gives a hint of the major media type and then let the system select a minor media type matching the source format.
Right click a row in the “media type” list and select “List all filters accepting this format” from the popup menu. You will get a new dialog with all filters supporting that media type marked in green. It is quite possible to have more than once filter component supporting a media type. DirectShow application will then perhaps not use the codec you think even though you just downloaded and installed it.

How codecs are selected

Since more than one codec can support the same media file applications need a way to select which codec to use. Codec vendors assign a numeric value to their codec called a merit value and applications first tries the codec with the highest merit value that support the given media type. If for some reason your media does not work with a given codec there is no guarantee that an application tries the next codec in line, it might not even be possible for the application to detect that the codec is not working.

How to disable a codec

From the system menu select “List codecs and other filters”. Find the codec you want to disable and right click it, from the popup menu select “un-register filter”. The filer will be removed from the windows registry and not used by applications. You can add the filter again from GSpot by selecting “re-register filter” from the same popup menu.

Context menu
Context menu to change the use of a specific codec

If you have several codecs installed and want one codec to be used before another you can adjust the merit values of the codec directly. From the same popup menu simply select “Set filter merit”. Even if a filter merit is set to do-not use it is possible for some applications to be programmed to prefer a specific codec. This is not very common but typically happens when an application comes delivered with custom filters. For example Fast video indexer come with a custom filter for capturing video frames. If another filter was selected the program would simply not be able to capture video frames.

Conclusion

Many windows applications use DirectShow to render video. If you have codec issues GSpot is a really helpful tool to resolve the issues and often a much better solution than installing more codec packs. With the right codecs installed and configured on your computer you can view any video format in any programs that use DirectShow, like in Windows media player and Fast Video Indexer.

Resources

Download GSpot to work out codec issues
Download FastVideoIndexer to capture video frames