In the past year Microsoft has released an update to their
Windows Media Encoder SDK. This has made encoding audio files (such as .WAVs and .MP3s)
a much easier process in Visual Basic. However, the documentation for this SDK is not always very
helpful for some fairly basic Encoding issues.
For example, something that I have found a great need for has been the ability to update
the properties (CopyRight, Description, Title and Author) of WMA files without having
to entirely reencode them. There is a fairly easy way to do this. This tutorial will
show you how to update a batch of WMA files using an xml file and a visual basic application.
The first thing you need to do is to create an XML template that will hold the values of the
properties you will be updating in your WMA file(s). You can create the file in any
text editor, and save it in the folder that you have your VB application. Name the file
XMLConfigFile.xml. Put this in your xml file:
Now create a new VBApplication, with 1 Command Button (named CmdConfig) and
1 Label (Label1). Also, in your VB Project add a reference to Windows Media Encoder
and Windows Scripting Runtime. Add the following code to your VB Form:
Then, load up your VB App, click the button and sit back while your WMA files are updated!
Related Links: Main Forum
Want to discuss this article, or other development issues? Visit our
message boards!
Or contact us directly with a comment or question on this article: click here ! |