Archive for August, 2009

Published by Roman on 28 Aug 2009

Windows Media Codec List

Windows Media Codec List utility uses IWMCodecInfo interface (see also IWMCodecInfo2, IWMCodecInfo3) lists installed Windows Media Codecs and their formats and presents the findings in a convenient way. The utility gives a quick idea what a programmer would obtain through IWMCodecInfo2/IWMCodecInfo3 interfaces and what well known format structures (WM_MEDIA_TYPE, AM_MEDIA_TYPE, WAVEFORMATEX, VIDEOINFOHEADER) correspond to particular format.

For a description of Windows Media video and audio codecs, check article Encoding Audio and Video with Windows Media Codecs.

Windows Media Codec List Screenshot

Copy button copies discovered information into clipboard in comma-separated values (CSV) format (e.g. suitable fo rMicrosoft Excel). Submit button posts the same information to this website for… possibly further aggregation.

Some quick facts immediately visualized by the utility:

  • for a video codec there is exactly one generic codec format listed
  • video codec FOUCCs are: WM Video – WMV1, WMV2, WMV3; WM Video Screen – MSS1, MSS2; WM Video Image – WMVP, WVP2; WM Video Advanced Profile – WVC1
  • for audio codecs there are complete codec formats enumerated, with names/descriptions suitable for GUI
  • audio codecs enumerate different formats in response to enumeration settings (e.g. request for VBR formats)
  • WM Audio Lossless only lists formats for single pass VBR mode
  • audio format tags (wFormatTag) are: WM Audio including Professional and Lossless – 0×0161, 0×0162, 0×0163; WM Audio Voice – 0×000A; ACELP.net – 0×0130

Partial Visual C++ .NET 2008 source code is available from SVN, release binary included.

Continue Reading »

Published by Roman on 08 Aug 2009

Asus Eee PC, Tray Utility, Default Resolution

Among things beyond of any understanding are those presented by Asustek/Asus engineers. While hardware is more or less OK, software is often confusing. Asus Eee PC 1000HE, out of which I own one, comes with Asus Eee PC Tray Utility 5.1.1.4008.

Asus Eee PC Tray Utility 5.1.1.4008

A helper application to provide quick access to certain hardware control functions, it is OK. No, you don’t have an option to close it and even if you kill it from task manager, another Asus utility will immediately relaunch it. It is a kind monther care from Asus who are just sure that they know the right way.

The laptop las an LCD of 1024×600 pixel reoslution, and, as it usually happens, most accurate, sharp and best looking image is on the display when screen resolution is also set to 1024×600. That is, one virtual screen resolution pixel that matches exactly one physical pixel on the LCD matrix. Do I  need to be so much detailed on the obvious things, because everyone knows this as it seems? Everyone but Asus engineers who for some reasons sell laptops that automatically switch to default resolution 800×600. Even if you change resolution to desired one, the laptop will switch it back  sometimes when you logon, when you reboot, when you use fast switch user capability… Could it be more stupid than that? Perhaps it could, but this way it is already rather annoying.

After less than two months, the hotkey which switches LCD resolution sunk down while it was only used for one thing: to bring back resolution of 1024×600, which beyound of any doubt had to be default resolution without any justification to fall back to a different one for no reason. The key is definitely not going to last for too long.

Asus Eee PC 1000HE Resolution Hotkey

Out of curiosity, I started the utility on my desktop, where it immediately blinded me by turning off both of my Asus monitors and left me no other way to press reset button to reboot the box.

I thought that there might be an update for the utility on Asus Support website because this kind of thing had to be fixed with apologies and sincere promises to never happen again. I was reluctant to use Asus Update utility because it is more refined masterpiece of stupidity. However on the website, there is no utility in downloads at all. It could be a part of another downloadable package, but there was also no obvious indication that would give a hint what update is required.

So that only solution left was to anatomize the crapware and think of a workaround to at least for some time extend the life of the hotkey. The utility below, PostAsTrayCommand, will look for Asus tray icon utility to be running and will post a requested command (this way it can also be used to switch on or off wireless LAN, or the camera) to the utility.

To switch resolution to 1024×600, a command of 32797 has to be posted. The screenshot below gives an idea of other values, which might be useful:

AsTray Utility Tray Icon Menu Commands

To post a command, it needs to be started from command line “PostAsTrayCommand.exe 32797″ and it makes sense to add it to Startup group to be automatically launched on logon.

A Visual C++ .NET 2008 source code is available from SVN, release binary included.

Published by Roman on 05 Aug 2009

Another third party DirectShow filter that may break your very own application

One of the DirectShow’s most important features is Intelligent Connect, which allows Filter Graph Manager to build graphs out of independent filters trying to connect them together including options to fall back to originally non-preferred alternatives and so on.

It is however important that filters are properly registered with the Filter Mapper. For the developers to do so, there are special guidelines for registering filters. Unfortunately it is not always the case that developers carefully take them into consideration, and so we have compatibility issues. In particular a faulty filter may break an application it is not intended to be used in in first place. Some examples were already mentioned: Ahead Nero NeResize Filter, FFDShow Video Decoder Filter, PICVideo MJPEG Decompressor Filter.

As we are moving on, the brilliant collection is expanding. New entry on the list:

MainConcept Color Space Converter Filter

Friendly Name: MainConcept Color Space Converter
File Name: mccsc.ax
File Version: 1.0.103.60203 (note that other versions might be hopefully free from this problem)
Merit: 0×00600000 (MERIT_NORMAL)

Symptoms: registers itself under higher merit and takes over standard Color Space Converter Filter. As such, might be used in various applications including those, where it is not supposed to appear. Does not fully implement functionality of the filter being replaced and can crash breaking expected operation of third party application.

Published by Roman on 05 Aug 2009

MediaTools: How to manually configure filters to render M-JPEG video stream from an IP camera

Media Tools DirectShow Filters can be used to acquire, parse and decoder M-JPEG encoded video stream from an IP camera or a video server, however for a quick start it is necessary to properly register filters on system and create a DirectShow graph.

To register the filters, it is necessary to download DLLs from repository. While Acquisition.dll does not require special prerequisites installed, CodingI.dll is using Intel Integrated Performance Primitives (IPP) version 6.0.0 internally and requires its [at least] redistributables installed before DLLs are being registered using regsvr32.

Intel went further with new releases of IPP, which are incompatible with the version used to build CodingI.dll, so it is version 6.0.0 (in downloads on Intel website: version 6.0 build 0) has to be installed. Note that Intel DLLs from C:\Program Files\Intel\IPP\6.0.0.044\ia32\bin (version 6.0.0.062 is known to be also compatible) need to be on system search path, or copied to C:\Windows\system32 directory.

Once Intel IPP is prepared, it is required to register CodingI.dll using resgvr32. This registers filters and they are available in GraphEdit and for applications. It is important that on the way of constructing graph which renders video using standard video renderers it is required to specify correct resolution for video, or otherwise graph might fail to start with a message “The graph could not change state”, caused by video renderer failure to dynamically change to different (effective) resolution.

To create rendering graph, add Alax.Info HTTP Stream Source Filter from the filter list and provide camera URL in properties, e.g. http://cam15001.miemasu.net/nphMotionJPEG?Kind=1

Adding Alax.Info HTTP Stream Source Filter

Continue Reading »