Log in

View Full Version : autodetect codec help


fragilerus
18th July 2006, 00:19
I am trying to make a simple autorun file on a cd that should detect weather the necessary codec is installed. i figured that since there are several different codecs that can read a certain codec type (for example, divx 5 can be read with divx codec or xvid codec, either of them would suffice), it would not be optimal for me to check if the directory path exists, not to mention the fact that one can install it in a different location. the other way i can think of doing it is to check the registry. or to locate the codec the same way the media player does (however it does it, i have no idea how). does anybody know a registry value or the way the media player finds the necessary decoder? or does anybody have any other idea at all? i am looking specifically for divx 3, divx 5/6, and xvid. please help

unskinnyboy
18th July 2006, 01:35
I presume you are planning to distribute this CD? In that case, I figure what you need is to check is to see if the decoder component exists.

For DivX 3.11, check for the presence of c:\windows\system32\divx_c32.ax.

For XviD, check for the presence of c:\windows\system32\xvid.ax or search for the data string XviD MPEG-4 Video Decoder in the registry.

XviD will playback DivX 4, 5 & 6, so you don't need to check for the presence of those. But if you *must* check, check for c:\windows\system32\divxdec.ax.

But the absence of all of the above doesn't necessarily mean that the person isn't capable of decoding any MPEG-4 content (i.e. if the person is using ffdshow). So maybe you should account for ffdshow too. Check for c:\program files\ffdshow\ffdshow.ax or search the registry for the data string ffdshow MPEG-4 Video Decoder since the decoder could have been installed to a different directory.

fragilerus
19th July 2006, 04:48
thanx for responding. however, due to the wide aray of decoders capable of decoding mpeg-4, i decided to try to check for it via a different means, since i cant possibly check all the directories. i figured the best way about it would be to detect if a suitible decoder is present the same way any media player detcts it. do you know how the media player detcts if a codec is installed? and if so, can i write a simple script utilizing the same method?

fragilerus
23rd July 2006, 18:52
I am trying to make a simple autorun file on a cd that should detect weather the necessary codec is installed. i figured that since there are several different codecs that can read a certain codec type (for example, divx 5 can be read with divx codec or xvid codec, either of them would suffice), it would not be optimal for me to check if the directory path exists, not to mention the fact that one can install it in a different location. the other way i can think of doing it is to check the registry. or to locate the codec the same way the media player does (however it does it, i have no idea how). does anybody know a registry value or the way the media player finds the necessary decoder? or does anybody have any other idea at all? i am looking specifically for divx 3, divx 5/6, and xvid. please help

unskinnyboy
23rd July 2006, 19:13
What's with the cross-posting? :readrule:

http://forum.doom9.org/showthread.php?t=113658

fragilerus
23rd July 2006, 19:42
figured different people visit different topics

DaveEL
23rd July 2006, 19:47
I have merged the two please don't cross post - contact the mods if you decide a subject has been put in the wrong place we will move it around for you.

DaveEL
23rd July 2006, 19:55
You *might* be able to get directshow to render the filter graph for your file and detect any error conditions to see if it has all the required filters.