EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[X3] A tool to fix your directshow codecs (sound problems and performance)
Post new topic Reply to topic Goto page 1, 2, 3 ... 33, 34, 35  Next
View previous topic :: View next topic
Author Message
MadBoris





Joined: 26 Aug 2004
Posts: 644 on topic
Location: Los Angeles,CA USA
Thank you for registering your game
modified
PostPosted: Thu, 22. Dec 05, 01:29    Post subject: [X3] A tool to fix your directshow codecs (sound problems and performance) Reply with quote Print

3-16-06
Alas, the tool has done what it set out to do, fix peoples codec issues and bring to the forefront what was going on with the codecs.
The X3 1.4 patch now automatically properly sets the prefferred codecs.

The only point in using the tool from here on out is to test your directshow install, where the tool will just confirm if a bad directshow configuration is really a culprit, or also if you want to see what other files are still attaching to X3 (you never should be seeing other codecs anymore, if you do there is a problem).

All good things must come to an end. Smile

Glad it helped some of you along the way.


Major Revision: 1-5-06

This information may seem like a lot to read, but it is all here to help you get the big picture, which is required to eliminate confusion in this area. The part that is not really required is at the bottom and is noted with the blue line.

What is this and why do I need it? :
X3 is tempermental with many different codec’s. Certain codec’s combined together can lead to problems ranging from overall performance issues (cutting it in half or more) to stability issues in this game. The problem is magnified because there is also no way in Windows to see which codec’s are actually used by X3 and there is no way to adjust them (this is not referencing the audio codec encoders which can be adjusted with a Windows GUI). So to rule out this common problem that X3 has with the multitude of different codec’s, the DShow Viewer tool was made to see what codec’s X3 is using and how to straighten these problems out. This tool helps you to make sure that X3 uses the default Microsoft DirectShow codec’s and filters. These default codec’s are on everyone’s computer, and is what X3 uses on a new Windows install before additional codec’s are installed by various means. It is a good idea to rule out codec’s for crashes, sound looping, garbled sound and general performance.

Background:
A lot of applications install codec’s that you do not ever know about, more than you think. Furthermore the codec’s are set to be used in the priority that the developer of the codec thinks they should be set with. In essence, if they think they have the best codec for the job, they will set it with the highest priority to override those previously installed on your computer. This priority is called merit. A higher merit indicates a higher priority. So when an application initializes a sound or video file, the codec that handles that media type, that has the highest merit, will be used. Since X3 does not work well with many 3rd party codec’s this presents a real problem, but now there is a workaround. Prior to this tool people installed codec packs as a brute force method hoping it would install codec’s at higher priority and fix their problems and not make them worse. Sometimes it helped, sometimes it made things worse, but one thing for sure, you never knew what was really going to happen and their was no way to tell what else it would effect. If Russian roulette is your game, and this is too much work, then a codec pack may be for you. If it doesn’t work you will be back and will have more to undo. If you take a bit of time to work through this, it will produce an expected result and may pay off in the long run.

Game issues that some have experienced prior to rearranging their codec’s:
Some experienced crashes or other freezes and startup errors. (Codec’s are not the only cause of these, but a big part)
Music, speech and sound playback issues including skipping speech, garbled sound which is many times due to these codec’s and filters and can be rectified by changing their merit.
Many have seen large performance increase, myself included.

How X3 Handles Audio:
The audio in X3 is made up of 4 major aspects: Music, speech, movies and sound effects. Each of these have an underlying set of filters that plays that individual aspect. That is why a gamer can have a problem with just that one audio aspect. Furthermore, they may have a problem with performance with no audible or visible indication that they actually have a codec problem until they run this tool. The codec’s are loaded into memory and are used throughout the game and sometimes almost constantly, so they have quite an effect on the game. Performance boosts can be expected when using the proper splitters and codec’s which may be anywhere from negligible to doubling performance which has been witnessed in busy sectors depending on the codec’s being used.

Here is how it works: :
The "DShow Filter Viewer" connects directly to your game files and programmatically initiates a DirectShow graph. This way you can see exactly which filters are configured on your PC to be used by DirectShow.

You press the “Load the Graph” button and it connects to each of the necessary music, sound, speech, movie files and:



On the right side is an actual "live" graph just made from your X3 installation and it highlights all the "not preferred" or potentially troublesome filters in red.
The “InterVideo Audio Decoder” shows up in the graph (in red) because it has a higher merit setting than the "Mpeg Layer-3 Decoder" that should be here.
On the left side is the entire list of direct show filters on your computer which I color coded, and the preferred Microsoft filters that are not being used, that should be, are highlighted in green. In the graph on the right side, you also see the descriptions column which shows the different functions that you hear or see in the game and the associated filters used for that category to the right of it. This can help you recognize that if the “background music” isn’t sounding right then it’s most likely due to the “InterVideo Audio Decoder” highlighted in red. This descriptions column information is very helpful if you have a lot of red codec’s from installed codec packs and don’t want to change them all back to the default Microsoft filters, but only want to change the section you are having trouble with. In the above picture there is a link that says "Show me what I should be seeing here". It is a cheat sheet to show you what preferred filters and codec’s you should be seeing in the graph.

Example of how to fix this issue highlighted in red:
Currently the tool is only a viewer and you can’t make changes with it. You need to get another companion tool called Direct Show Filter Manager (linked below).
So to fix the above problem with the “InterVideo Audio Decoder” that was highlighted in red, I open up Direct Show Filter Manager (DSFMgr for short). Remember the two filters were highlighted in the DShow Viewer Red=bad, Green = good. So now we find them in the DSFMgr either by actual codec name or filename.
In the picture below you will see the bad one at the top, and the good one at the bottom.



This is where we adjust the merit of the filters. In this picture from DSFMgr at the top you see the “InterVideo Audio Decoder”, and its merit is set real high.
It is set much higher than the “MPEG Layer- 3 Decoder” at the bottom. Remember that a codec installer decides what priority they are installed with. So just by lowering that merit of the “InterVideo Audio Decoder” down below the "MPEG Layer-3 Decoder" on the bottom - It fixes our problem.
It is changed by double clicking on the codec, and a new window appears with a slider to set the merit, so it is easy to change you don’t have to type numbers.
A log out or reboot is necessary for windows to accept merit changes, do not forget that, because your changes won’t really take effect until you reboot.
After a reboot I restart the DShow Viewer, press the "Load the Graph" button, which then reinitializes the DirectShow graph from the game files again, and the red filter is gone and the MPEG Layer-3 Decoder has taken its rightful place because now there are no other codecs that have a higher merit for playing back MP3 than the "MPEG Layer-3 Decoder".

We need to attach to X3, we are almost done:
There is a button called "Attach to X3" that is a required to use in order to get the most out of this tool. Because for reasons unknown to me, X3 doesn't always follow the default DirectShow graph. Meaning your graph can be all ok with no red but there are most likely still problems to resolve. We have to double check if X3 is using other filters, which most times it is even though your default DirectShow graph is ok. There is no known way to anticipate which codec’s X3 will actually use for sure, without attaching to it. After clicking the "Attach to X3" button there is some short directions to start X3 in windowed mode and then you finally click the "Get Files" button:



Two codecs are found that are unexpected (comdlg32.dll is a file opened by one of the codec’s and will disappear when we remedy the problem). You can right click on the files listed here and get properties on them to better find out what they are.
The first picture of DShow Viewer showed that in our graph the “MPEG I Stream Splitter” is what it is supposed to be being used for all our media. Instead, when we attach to X3 we see it is actually using a “RealMedia Splitter”.
Now we go back into DSFMgr to check priorities and see if we can figure out why this is happening and how to fix it. Remember it's usually just a matter of higher or lower merit, unless something else is wrong, which is rare and someone in this thread can help you with that if it comes up.
Here we see what I found in Directshow Manager



In DSFMgr we see that the two splitters, the one X3 is using and the "MPEG I Stream Splitter" are the same merit, why X3 is choosing to use the other one, when the graph is using the correct one? I don't really know. But we just raise or correct splitter to fix our issue. Just double click the “MPEG I Stream Splitter” and change the slider to ‘preferred’ and after a reboot that fixes our problem with this wrong splitter being used by X3. In a future version of the application it is planned to take a snapshot so you can undue your changes but for now it is wise that you write down the changes that you make incase you make a mistake. The other “Wave Parser” that showed up in red when Attaching to X3, is fixed the same way. I then rebooted and started the DShow Viewer again, attached to X3, and everything is clean as a whistle, no red anymore. No codec problems!

Does red really mean bad?
Sometimes other files, other than codec’s, will show up as red when attaching to X3. Not everything that is highlighted in red in the 'Attach to X3' screen is bad, it's just unexpected. It shows files that are unexpected compared to a base windows system install. The effect of certain files like security software hooks and such are still unknown as to whether they impact stability. Eventually an exclusion list will color code files differently that are known not to be codec’s.

Checking your Files:
There is one last thing for now. In the tools menu there is a file checker. It double checks your system files against a database of original version of XP SP2, MP10 and DX9C files. Because what good is adjusting DirectShow filters and codec’s if their are issues with your core Media Player files or your DX9C files. Anyway, this part is in its infancy and has a lot more room to grow, but it will show you any outdated files, and then you can try re-installing the proper Module.

Summary of Instructions:
Use the Load the Graph button. Any filters in red can be replaced by the green highlighted in the list on the left. Use the cheat sheet for help.
Use DSFMgr to adjust merit, just double click the filter. Higher merit is higher priority. Just raise the merit of the green ones unless the red ones are really high like our example above, then the red should be lowered below the green.
Make sure that when you double click a filter in DSFMgr that it actually brings up the codec you clicked, sometimes it brings up a different one shown at the top of it's window.
Reboot your computer for changes to take effect.
If your graph is fine which it is for many then we now take the next required step of Attaching to X3.
Minimize the program then start X3 in windowed mode as an Aspiring Explorer, fire the weapons to initialize the WAVE sound system.
Alt/Tab to the DShow Viewer.
Press the Attach to X3 button and see what X3 is using.
Goto DFSMgr to lower the merits on those filters.
Remember about the little blue links on every page to help you along the way.

When you need help just use http://imageshack.us/ to post screen shots of what you are seeing on your screens and individual setups. I am really interested to see all the different issues and I will help walk some folks through some of the issues here, especially the stickier ones.

Basic Pre-Requisites(Be sure these are handled before proceeding):
It is imperative that you rule out all other possible issues before proceeding to assume codec’s to be your only issue.
Use Driver Cleaner and get latest drivers for your video card and sound card.
Reinstall DirectX9c from the game CD/DVD and Media Player 10 from Microsoft.
Download latest motherboard drivers this can be very crucial especially with onboard sound cards.
If you have built-in onboard sound, just know that latency issues may affect performance at the very least.

Requirements for the program:
-Windows XP
-Windows 2000 (untested) but may work for codec’s, but will not with the file checker tool.
-For File Checker tool to show valid results, requires: XP SP2, Media Player 10, DX9c
-Support and feedback will be handled in this thread.

Requires XP
Download Here: DShow View .9 (12-22-05)
{link modified by CBJ}

Here is the DirectShow Filter Manager to actually adjust the merits:
http://www.softella.com/dsfm/index.en.htm


Below is additional background and features because some folks may want to know more.
_________________________________________________________________________________

If you are concerned that changing priority here may have a bad effect, here is something to think about. Just realize the bad effect is already present because every time you install a program that has new DirectShow codec’s (creative sound software, burning software, DVD players, list goes on and on, even programs you wouldn't expect) they add new priorities that may supersede the ones before that are handling a certain function, everybody wants to be on top, I guess.

What are these Splitters?
Splitters and Parsers sit between the file and the codec. They are always used. In the case of MP3 playback, which is always in use, a poor splitter that is handling MPEG3 will definitely hurt overall performance or worse.

Testing Performance of your Codecs (This feature is planned to grow)
There is a way to check the performance of your current filters. You can initialize the the actual music, sound effects, movies with the exact filters you see in your graph like to view this:



Here you see the cpu useage for the actual movie, sound, etc. based on the exact filters you see in the graph that are currently loaded on your PC. When a file is playing you can right click on individual filters and see errors they have (Some may report alot of errors and dropped frames) and also you can look at video decoder details liked dropped frames and other goodies depending on your current direct show filter configuration.

* Some asked how I got the preferred list of filters? It's simple, those are the default Microsoft Directshow filters that should be handling those sound and audio tasks. Every PC properly configured has them, infact it's mostly one file as you can see called Quartz.dll (Installed with DX9C), the other, wmspdmod.dll is part of Media Player. That is the jist of it.
All of this comes from well over 100 hours of research and testing, not including tool development.
* When looking at the WMSpeech Decoder (wmspdmod.dll for speech) in dfsmgr you will see unknown module if you have Media Player 10, like this:



This is normal, the application doesn't know how to interpret the latest media player data. No current tool can raise it's merit, nor should it need to be. If you don't see it in the list at all, well that does point to a problem.
* I mentioned it , but is worth repeating, you have to log out or reboot for the merit adjustments to actually take effect.
* Their is another tool that can help you diagnose any errors with your filters if they are not registered properly, etc, which definitely causes issues and can come up at times. It also does merit/priority adjustments. Infact, sometimes you will see entries in this tool that you do not see in DSFMgr and vice versa. For most people though, just keep it simple with two tools, you probably won't need this unless you are getting a lot of red show up, or you want to be more thorough.
Filmerit - http://www.free-codecs.com/download/Filmerit.htm
* Make sure you use the attach to X3 function, many times the real problems show up there.

Features not mentioned or explained:
* You can double a click on a cell to copy contents to the clipboard for pasting.
* In the grid on the right, right clicking in column 1 allows you to play the actual media, with a loop function as well. It 100% uses the exact codec’s listed right next to it whether they are preferred or not preferred. While the media is actually playing you can right click in column 2 and view the actual properties of the filters in realtime (only the names of the ones in use will provide a "view properties"). Here you can see dropped frames and such. Default Windows codec’s perform excellently here. If you have onboard sound you may see an impact to your fps.
* In the filename column on both the grid page and the attach to X3 page, you can right click on the filename to see file properties quickly.
* Something that isn't currently featured in the application is the ability to see the current Default DirectSound Device in the live graph. Certain codecs can and do override the "Default DirectSound Device". Just as an example ReClock may be a great codec for video playback but it's effect in this game wasn't beneficial as it becomes the Default DirectSound Device. This would impact every aspect of sound and video in the game and overall performance as well. As a work around to identify them, these codecs still will show up in red when using the attach to X3 function, although their function as the Default DirectSound Device won't be obviously recognized. Other codecs like DivXG400 and FFDshow, as well as others, have this ability to become the Default DirectSound Device (I haven't tested either of those two). One individual has mentioned the DivxG400 caused him issues in the game until he removed it, which is understandable because it' impact is global.

* Just for future reference, these are the default "unchanged" merits for the Microsoft codecs that pertain to X3, you can always change them back to these originals:
Code:
MPEG Layer-3 Decoder.......00810000 - l3codecx.ax
MPEG-I Stream Splitter.....00600000 - Quartz.dll
Video Renderer.............00800001 - Quartz.dll
MPEG Audio Decoder.........03680001 - Quartz.dll
MPEG Video Decoder.........40000001 - Quartz.dll
WMSpeech Decoder DMO.......no change - wmspdmod.dll
Wave Parser................00400000 - Quartz.dll

Disclaimer: All the DirectShow filter mentioned here are not implied as to be bad in anyway, just that they don’t work well with this game.



Last edited by MadBoris on Mon, 21. Aug 06, 21:16; edited 31 times in total
Back to top
View user's profile Send private message
bates777





Joined: 12 Nov 2005
Posts: 49 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 03:06    Post subject: Reply with quote Print

I think I like you.
-Bates


_________________
AMD Athlon64 3500
ATI X1900XT
Asus a8r-mvp
PC-3200 1G
SB Live!
Sytek X-45
Back to top
View user's profile Send private message
lucidazn





Joined: 12 Dec 2005
Posts: 28 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 03:21    Post subject: Reply with quote Print

+1

Back to top
View user's profile Send private message
Harabec Weathers





Joined: 02 Dec 2005
Posts: 46 on topic
Location: St. Louis
Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 03:53    Post subject: Reply with quote Print

Holy crap, this is an amazing tool.

Can it hook into other directshow apps too? All of my video players stutter when playing divx vids, and I can't figure out why.

Also, will this hook into any directshow graph? I've got a few programs I've written, and it would be amazing if I could debug them with your tool!

Back to top
View user's profile Send private message AIM Address
Jokey77





Joined: 12 Dec 2005
Posts: 19 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 03:59    Post subject: Reply with quote Print

just awesome!

thank you very much for your time and effort!
It really is appreciated very much!

Back to top
View user's profile Send private message
MadBoris





Joined: 26 Aug 2004
Posts: 644 on topic
Location: Los Angeles,CA USA
Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 04:41    Post subject: Reply with quote Print

Harabec Weathers wrote:
Holy crap, this is an amazing tool.

Can it hook into other directshow apps too? All of my video players stutter when playing divx vids, and I can't figure out why.

Also, will this hook into any directshow graph? I've got a few programs I've written, and it would be amazing if I could debug them with your tool!


Well, I could make it more open ended, I have thought of it, as in opening any media files, hooking to other processes, etc. My plan currently is more profile based. I've got a list of things I still want to finish up. Maybe I will add something more freeform if there is demand and will keep it in my mind as I'm working on layout and functions later. One thing on my list to add eventually, is other game profiles as needs arise. There will simply be scripts built for different game profiles. It still needs some definite polishing, I'm just getting it out for the holidays to help people overcome some hurdles hopefully.

You guys actually read all of that? Wink

Back to top
View user's profile Send private message
bates777





Joined: 12 Nov 2005
Posts: 49 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 04:52    Post subject: Reply with quote Print

All of what?
-Bates


_________________
AMD Athlon64 3500
ATI X1900XT
Asus a8r-mvp
PC-3200 1G
SB Live!
Sytek X-45
Back to top
View user's profile Send private message
Harabec Weathers





Joined: 02 Dec 2005
Posts: 46 on topic
Location: St. Louis
Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 05:52    Post subject: Reply with quote Print

MadBoris wrote:
Well, I could make it more open ended, I have thought of it, as in opening any media files, hooking to other processes, etc. My plan currently is more profile based. I've got a list of things I still want to finish up. Maybe I will add something more freeform if there is demand and will keep it in my mind as I'm working on layout and functions later. One thing on my list to add eventually, is other game profiles as needs arise. There will simply be scripts built for different game profiles. It still needs some definite polishing, I'm just getting it out for the holidays to help people overcome some hurdles hopefully.

Not only is this a fantastic tool (from what I've read in your description), it's also quite user friendly in terms of showing you good/bad/conflicting filters. If you were able to get the program to hook into, say, VLC Player or WMP, I promise you that this program will be invaluable to the digital video community. In fact, if you do get that functionality running, I'd suggest adding a "donate" option to the "About" box... you'd have many, many fans wanting to thank you.
MadBoris wrote:
You guys actually read all of that? Wink

'Course. I just wrote a program using DirectShow about a month ago. Too bad the DirectX SDK's don't have the DirectShow libraries since, what, the April release?

EDIT: P.S. If you need a beta tester, lemme know. As long as I get an exe with the accompanying symbol library, I'm dangerous with Visual Studio's debugger Cool

Back to top
View user's profile Send private message AIM Address
BaronDeKalb





Joined: 26 Oct 2005
Posts: 208 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 06:27    Post subject: Reply with quote Print

this looks great oh-mad-one Wink

A wee bit more info on setting the correct hex value would be appreciated
(for dummies like me) Smile

Also is there a chance by changing values that some other game or app
will start using the x3 filters instead of the one it was using ? (i just had
to ask that one...)

thx, for the Huge effort....Will be waiting for this, (looks like you may beat
the patch also) Laughing

Back to top
View user's profile Send private message
cooldoud





Joined: 09 Dec 2005
Posts: 50 on topic
Location: Graz, Austria
Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 12:46    Post subject: Reply with quote Print

Tremendous effort here ! Thanks a lot ! I'm eagerly awaiting your godsent tool Wink


_________________
You can't catch them using strength,
eels are like women, if you hold them down forcibly, they'll just run away
Back to top
View user's profile Send private message
hansie





Joined: 17 Dec 2005
Posts: 36 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 17:57    Post subject: Reply with quote Print

Awesome Thumb up

I hammered the merits so much already, it'll probably all turn up red Wink

Back to top
View user's profile Send private message
MadBoris





Joined: 26 Aug 2004
Posts: 644 on topic
Location: Los Angeles,CA USA
Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 19:26    Post subject: Reply with quote Print

The first version of the app has been released.
Update in main topic.

If you have problems adjusting your merits ask away.

Enjoy!

Back to top
View user's profile Send private message
hansie





Joined: 17 Dec 2005
Posts: 36 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 20:17    Post subject: Reply with quote Print

Aha,

Where you (cheat sheet) show 'MPEG Layer-3 Decoder' I have 'ACM Wrapper' (quartz.dll).

Last time I checked to see if I had 'l3codecx.ax' in the system32 directory and I had, but I now see it is the MPEG Layer-3 Decoder, which is not in DirectShow Filter Manager List. I think it isn't hooked into windows and never used?

I see it's part of DirectX and the File Checker lists a few inconsistencies with DirectX (3 errors relating to it). Installing DX9 from the CD doesn't seem to fix m. I'm going to see to those three files.

I doubt by correcting those 3 files I will see the codec in the list. Any way to get that one back?

edit: btw. the errors in the file list are not shows as 'important for x3'. Those are all exact match or newer.

EDIT: Think before thy shal post Headbang I fixed it with the Filter Manager tool. Forgot it had a button to add codecs. No more reds. Now for the real testing..

NOTHER_EDIT: Mind if I wait before kissing your feet? I can't get it to CTD now and it's even a lot smoother than before. Need to see if it lasts a bit longer than my previous attempts Razz

Back to top
View user's profile Send private message
bendyspex





Joined: 13 Apr 2004
Posts: 708 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 22:55    Post subject: Reply with quote Print

Sorry if this has been mentioned, but how do you change something back to the default Microsoft filter. I am having the sound loop bug, and have done the live graph thing, and have quite a few red codecs.

Back to top
View user's profile Send private message
hansie





Joined: 17 Dec 2005
Posts: 36 on topic

Thank you for registering your game
PostPosted: Thu, 22. Dec 05, 23:06    Post subject: Reply with quote Print

bendyspex wrote:
Sorry if this has been mentioned, but how do you change something back to the default Microsoft filter. I am having the sound loop bug, and have done the live graph thing, and have quite a few red codecs.


You use the Directshow Filter Manager (DFM)that Mad describes. It shows all your filters together with the merit (=priority).

If it's possible: find the filter that is desired (the one on the cheat sheet) and raise the merit of that one higher than the filter you are currently using (the red one in mad's tool). It's shown in the DFM as well and probably has a higher merit than the desired one.

If it's confusing, ask MadBoris for pointers to where you are stuck Smile He can probably explain it better.

Mad: I just had another CTD Sad I did play a few hours though, so if I stays this way then I'm sure I can enjoy X3. The performance boost alone is well worth checking out your tool! Cool

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3 ... 33, 34, 35  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Wed, 24. Jan 18, 03:40

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.57016 seconds, sql queries = 29