Windows Direct Show Control TroubleshootingThis guide will help you resolve any Video Preview issues you may have in TSPE such as no video preview or if the video preview uses the wrong filters and you want to fix this permamently.
- Uninstall / Reinstall Haali Media Splitter and FFDShow
- Download and Install Graphstudio / Graphedit
- Load video into above (Drag / Drop)
- Video should be rendered, if not...
- New graph
- Insert Haali Media Splitter Direct Show Filter
- Select your video TS file when prompted
- Insert FFDShow Video Decoder Filter
- Connect (Drag / Drop) Video Output pin of Haali Media Splitter to FFDShow Video Input pin
- Right click Video Output pin of FFDShow
- Select Render Pin
- If video is displayed, use TSPE's DirectShow Control or use 3rd party filter managers.
Detailed Walkthough:TSPE uses the Direct Show Filters you have installed in Windows.
To ensure video is displayed correctly in the Video Preview Window, you must ensure you have a working Direct Show Filter setup.
If you do not get a video preview when you load a file you should get an error message in the status window as follows:
"Error Enabling Video Preview, Disabling"
The first thing to try is to reinstall Haali Media Splitter and FFDShow. This should usually resolve the issue.
However, in some cases the video preview still won't work. This could be because Windows chooses a different DirectShow filter instead of Haali and FFDShow.
- Windows Vista and XP choose which filters to try by looking at each Filter's "Merit".
- Windows 7 will use it's own "Media Foundation" framework and use Microsoft DTV-DVD Video and Audio decoders in preference to the 3rd party DirectShow filters installed on the system.
- Use TSPE's Direct Show Control to select the video decoder of your choice
- Investigate and change the default filter order to use your preferred filters using 3rd party software.
Manually changing the Direct Show Filter orderIf you want to change the default filter order to use your preferred filters manually you will need to use a 3rd party application.
There are two Freeware 3rd party applications that you can use to diagnose DirectShow filter issues:
Graphedit. Graphedit has been around for many years and there are many tutorials around the Internet on how to use it. However, Graphedit does not allow you to change Filter Merits. GraphStudio works very similar to Graphedit but it does let you change the filter merits.
The second is Codec Guide's Windows 7 Preferred DirectShow Filter Tweak Tool. This tool is for Windows 7 and lets you change the default behaviour of using Microsoft's Media Foundation framework to allow 3rd party DirectShow Filters to be used.
The first thing we need to do is investigate what is going on when we open a video file using GraphStudio.
Using GraphstudioWhen you load Graphstudio you should see the following:
The Main Screen is a canvas where we can insert various DirectShow filters and connect them together.
Creating an Automatic Filter GraphFirst, try to load a video into Graphstudio by dragging and dropping your TS file into the main window. A Graph should appear with various filters connected to each other showing how Windows by default would decode and play back your video. For example, we'll use a h.264 video TS file:
Here we can see 3 filters connected together:
- Pirates of the Carribean bbchd.ts
- Microsoft DTV-DVD Video Decoder
- Video Renderer
You can play back this graph and you should see a video window appear with the video playing. However, there is no audio.
If you were to open this TS file in TSPE, the Microsoft Video Decoder filter will be used by Windows by default which would mean we wouldn't have any audio playback in TSPE. Obviously, this is not what we want.
We want to have FFDShow decoding the Video and the Audio instead of the Microsoft Video Decoder filter.
Creating a Custom Filter GraphLet's start again with a New Graph (Menu File->New, or press the first "page" toolbar button).
- Select Menu Graph -> Insert Filter... A filter selection window will appear.
- Ensure "DirectShow Filters" is selected in the top left dropdown box and scroll down to and select "Haali Media Splitter".
- Press the "Insert" button.
- A popup window will appear, browse to the location of your TS file.
- Now select "FFDShow Video Decoder" from the filter list and click the Insert button.
- Close the Filter Selection window and you should see the following:
- Now click on the FFDShow Video Decoder box and Drag and drop it to the left of the TS file source box.
- Click on the small pin box on the right of the word "Video" on the source file and drag and drop it to the "In" pin box on FFDShow Video Decoder.
- Now right click the "Output" pin of FFDShow Video Decoder and a small menu will appear:
- Select "Render Pin" from the popup menu.
- Now right click the "Audio" pin of your source file and select "Render Pin" from the popup menu. You should now have the following:
- Test the graph, click the green Play button on the main toolbar.
In the background the name of your TS file will appear as a source filter on Graphstudio's workspace.
In the background an FFDShow Video Decoder filter will appear on Graphstudio's workspace.
You should now have the video output of the source TS file connected to the Input of the FFDShow Video Decoder.
You should now have a new filter inserted called "Video Renderer" and conneced from FFDShow Video Decoder's Output pin to the "VMR Input0" pin of the Video Renderer.
You should see a video window appear and the source file playing with audio.
If you do not get Video playback with audio, there could be configuration issues with FFDShow or Haali. There also could be an issue with your TS file. Try testing with a different TS file from a different source to try and narrow down the issue.
Now you have a working filter graph, lets look at the Filter Merits to make FFDShow work automatically.
Changing Filter MeritsLet's look at the Filter Merit of FFDShow. In Graphstudio, select Menu->Graph->Insert Filters... and select FFDShow:
Here we can see the Filter Merit on the right hand side under "Filter Details". The current Filter Merit is "0x00400000". (Note that the merit has been changed previously for the purposes of this example.)
Let's compare to the Microsoft DTV-DVD filter:
Here the Filter Merit for Microsoft DTV-DVD filter is "0x005fffff".
As the Filter Merit of Microsoft's DTV-DVD Video Decoder filter is higher, it should be chosen in preference to FFDShow when automatically creating filter graphs as it has a higher merit. This is the case in Windows XP and Windows Vista, but not necessarily for Windows 7.
We want FFDShow to have a higher merit, so let's change FFDShow's Filter Merit manually:
- Select FFDShow Video Decoder in the list of Filters.
- Click the "Change merit" button on the right hand side.
- From the "New value" drop down list select "0x00800000 (MERIT_PREFERRED)"
- Click OK and you should see an Information message box saying "Merit change succeeded".
- Reboot to ensure Windows applies the change.
- After the system has started, re-run Graphstudio and drag / drop your TS file to test.
- If you are running Windows 7 you may find that Microsoft DTV-DVD Video Decoder is still being inserted instead of FFDShow! What the heck is going on?
Overriding Windows 7 Media Foundation FrameworkWindows 7 by default uses it's new Media Foundation Framework to ensure video playback with popular media formats instead of using the DirectShow Filter Merit system used by Windows XP and Vista.
To override this, we need to use Codec Guide's Windows 7 Preferred DirectShow Filter Tweak Tool
- Download and run this utility:
- Click on the "Preferred decoders" button:
- Click "Use Merit" for H.264 for both 32-bit and 64-bit sides (repeat for any other codecs you want to override).
- Click the "Apply and close" button
SummaryWe have seen that to make TSPE use our preferred video or audio decoder we can select the desired codec in TSPE directly under "Direct Show Control".
Alternatively, we can change our system using the DirectShow merit system and / or override Microsoft's Media Foundation Framework to use our preferred codecs using Graphstudio or the Windows 7 DS Filter Tweaker 3rd party applications.