|
|
Subject:
Reading WMA audio properties from Visual Basic 6.0
Category: Computers > Programming Asked by: piolet-ga List Price: $30.00 |
Posted:
14 Apr 2003 19:32 PDT
Expires: 14 May 2003 19:32 PDT Question ID: 190561 |
We need to read the following information from Windows Media Audio (.WMA) files: - Song duration (seconds) - Bitrate (BPS) - Frequency The WMA files use the microsoft DRM system, to protect the file, so that only licensed users/computers will be able to listen to the file. We don't need to get the sound without the license, we just need to read that informational fields. Kazaa and other applications do it... so there must be a way :) The code should run on Visual Basic 6.0 and require no external DLLs (except those included with standard windows installations). Thanks and good luck! Pablo. | |
| |
|
|
There is no answer at this time. |
|
Subject:
Re: Reading WMA audio properties from Visual Basic 6.0
From: deefresh-ga on 21 Feb 2005 10:47 PST |
I realize this is a really old question, but since noone answered... In your VB project, add a reference to "Windows Media Player". To get the duration of your WMA file (you can also get the duration of an MP3) use this function: Function GetDuration(fullFilePath As String) As String Dim BasicEdit As WMEncBasicEdit ' Create the WMEncBasicEdit object. Set BasicEdit = New WMEncBasicEdit ' Specify the input and output files. BasicEdit.MediaFile = fullFilePath ' Add indexing to the file. BasicEdit.Index = True GetDuration = BasicEdit.duration Set BasicEdit = Nothing End Function Pass in a fully-qualified path to your WMA file (ex. "c:\wma\somefile.wma") and the function will return the duration of the file in milliseconds. If you want the bitrate and frequency instead of the duration, return the value for BasicEdit.Profile |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |