PDA

View Full Version : scripting problem.. cannot convert from wav to wma



pchung
05-15-2007, 06:38 PM
Hi,
Im having problems with my script. I can convert from wav to mp3 without any problem but I cannot convert from wav to wma.
Here is my script

Dim dMC
set dMC = CreateObject("dMCScripting.Converter")
call dMC.Convert("C:\file.wav","file.wma", "Windows Media Audio 10", "-settings=128 kbps, 44 kHz, 2 channel 16 bit CBR", "C:\dMC_erros.txt")
set dMC = Nothing

The -settings cam from the registry.
I had to remove the double quotes after the -settings=

I recieve the following error
Error Creating WMA Profile. [clEncoder::BeginConversion]

Thanks
Phil

LtData
05-15-2007, 08:21 PM
Moved to Developer section of this forum.

Have you looked at the code examples from here: http://www.dbpoweramp.com/developer/dMC-Scripting%20vb%20.NET.txt ? Also, check the WMA help file for scripting settings for WMA.

pchung
05-15-2007, 10:27 PM
Hi LtData,
Yes Ive read both docs. but there are'nt any specific examples for wma. Im pretty sure its just a syntax error.. or typo. I am able to convert to mp3.
Are there any other scripting docs? Do you have a sample of a script that converts to wma?
Thanks
Phil

LtData
05-15-2007, 10:51 PM
There aren't specific examples for WMA, no, but it tells you how to set up a script for mp3/wav and then the WMA help file tells you how to set up the command line, which is the same setting for a script, it looks like.

Spoon
05-17-2007, 04:07 AM
>call dMC.Convert("C:\file.wav","file.wma", "Windows Media Audio 10", "-settings=128 kbps, 44 kHz, 2 channel 16 bit CBR", "C:\dMC_erros.txt")

You would need a " with settings so it is sent as -settings="....."

MiHiR
06-15-2007, 03:59 PM
Hey try using this instead:

call dMC.Convert("C:\file.wav","file.wma", "Windows Media Audio 10", "-codec={qt}Windows Media Audio 9.2{qt} -settings=128 kbps, 44 kHz, 2 channel mono CBR", "C:\dMC_erros.txt")

this should work fine.......I've fiddled a lot with it and have got it working, but I'm calling it through command line!!!

Make sure you have this WMA codec installed:

http://www.dbpoweramp.com/codecs-new/dBpoweramp-Codec-WMA10Pro.exe

Cheers,
MiHiR