Browsing a movie library with other media players

Once you converted your recordings into a movie library, you can use Windows Media Center or the movie library web application to browse your archived recordings conveniently. However, the XML-based approach to metadata management taken by Windows Media Center is not compatible with most other media players. Besides from portable media players this even applies to Windows Media Player. Sadly, most media players expect metadata to be integrated into the movie file itself and thus, having the metadata stored in a separate XML file is pretty useless. While it is possible to use the Windows Explorer to edit the metadata of a movie in Windows Media format, manually editing a large movie library is quite cumbersome. Fortunately, there is another alternative.


Windows Explorer: Cumbersome, at best …

To automate the overall process, I have hacked a simple .NET console application called WmvInfoFix. Upon execution, the program parses the XML files used by Windows Media Center and writes their contents into the corresponding movie file. Thereby, it supports 3 basic modes of operation depending on the parameters that you specify. If it is run without parameters, WmvInfoFix will simply list the available modes as shown in the image below.

wmvinfofix-operation-modesWmvInfoFix: It may be slow but at least it is automatic

The following list briefly outlines the basic principle of operation for each of the supported modes:

  • In the single file mode (-f), WmvInfoFix simply copies the metadata contained in the specified dvdinfofile into the specified wmvmoviefile. When using this mode, you can optionally specify an image in jpeg format which will be embedded as icon into the wmvmoviefile.
  • In the directory mode (-d), WmvInfoFix recursively crawls the specified wmvmoviedir and searches for *.dvdid.xml files. Once it finds a file, it will try to find a *.wmv file in the same directory. If a *.wmv file is present, it will parse the *.dvdid.xml file to retrieve the DVDID. Using the DVDID, the program searches the specified dvdinfodir for the XML file with the metadata. If it can find the file, it will copy the data to the *.wmv file. In addition, it will also embed the contents of a folder.jpg file as a file icon into the movie file, if it can find one in the directory containing the movie.
  • In the removal mode (-r), WmvInfoFix recursively crawls the specified wmvmoviedir and removes all metadata from any *.wmv file that it can find.

Note that while the single file mode can be used to update a new movie when you add it to your library, the directory mode follows the same basic search rules used by Windows Media Center and thus, it is useful to update an existing library in batch. To do this, you only set the dvdinfodir to Windows Media Center’s cache directory and you set wmvmoviedir to the location of your movie library.

windows-media-player-listWindows Media Player: Movies with metadata

To use WmvInfoFix, simply download the zip file containing the binaries and extract it to some arbitrary directory. The zip contains two files namely WmvInfoFix.exe which provides the program logic and WindowsMediaLib.dll which provides a .NET wrapper around the Windows Media Format library built into Windows. WindowsMediaLib.dll is compiled from the Windows Media .NET library which is an excellent timesaver that is freely available via Sourceforge.

windows-media-player-iconsWindows Media Player: Movies with icons

Although, I have used WmvInfoFix on all movies contained in my own movie library without experiencing any issues, when embedding metadata into a movie, there is obviously a risk of damaging the file. Since WmvInfoFix is using functions that are built into Windows, this risk is probably as low as it gets. However, in order to play it safe, you might want to backup your movies before running the program over all of them. If you experience issues, please send me an email but of course, I cannot take responsibility for any data loss. So use at own risk.