title
Products            Buy            Support Forum            Professional            About            Codec Central
 

Help with some VBA code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dan_Donoghue
    • Nov 2005
    • 1

    Help with some VBA code?

    Hi Guys, I am playing around with the VB Module of DBPoweramp.

    I seem to be stuck when trying to convert to WMA. If someone could throw some hints my way it would be most appreciated.

    My code looks like this:

    Code:
        Case "MP3"
            Set Mp3Settings = CreateObject("dMCScripting.MP3Settings")
            Call Mp3Settings.Set(BitRate(X), SampleRate(X), 0, 0)
            ' Convert To MP3 (No option page, Want Overwrite page, Want finished, Want Errors)
            Call dMC.GoConversion("Mp3 (Lame)", True, False, False, False)
        Case "WMA"
            Set WMASettings = CreateObject("dMCScripting.WMASettings")
            Call WMASettings.SetWMA("Windows Media Audio 9.1", "192 kbps, 44kHz, stereo CBR", CBR)
            ' Convert To WMA (No option page, Want Overwrite page, Want finished, Want Errors)
            Call dMC.GoConversion("Windows Media Audio V9.1", True, False, False, False)
        End Select
    The MP3 part works flawlessly but the WMA one always tells me it cannot open the codec. Any ideas?

    Really appreciate the help if you can.

    Thanks

    Dan
  • xoas
    dBpoweramp Guru
    • Apr 2002
    • 2662

    #2
    Re: Help with some VBA code?

    I don't program, so I'm not sure whether these comments will help.
    It looks like your script tries to convert to wma at 44 kHz, stereo, 192 kbx cbr.
    A review of the following posts:
    I've been reading some earlier threads about this process, and I just need to see if my thinking is correct. You cannot adjust WMA settings through scripting - the COM object just takes defaults from dbpowerAMP. Is that right? If so, can I then set defaults in the application, then run my script calling WMA which will apply the

    I've been using perl and PHP for years, but don't know much about vb script, so I could just be missing something... I want to convert my audio collection, currently in FLAC format, to WMA Lossless so the metadata will be recognized by my Windows Media Center machine, and thus I won't have to keep two copies of everything.

    Hi, When converting to a WMA file in .vbs what parameters doi need to pass into Call WmaSettings.Set ("256", "22050", 0, 1) Are thet the same as for the MP3 codec, the above converted a 49KBps 44KHz, 1 channel, non vbr file which is basically wrong for every single parameter i passed in?? Any

    Hello! I am currently making a program that is watching a folder and converting all audio files in it to WMA. Setting the WMA Coding Options using WMASettings.Set command. This works fine with the Windows Media 8 codec. BUT: When I installed the new Windows media 9 codec, the program only converts the files to the latest


    strongly suggests that this is not possible with wma 9 and above.
    The earliest of these posts suggests that wma v8 may allow you to script settings but the next post suggests that you would maybe need to go back to wma v4 or so.
    In any case, if you have not already done so, you might get some ideas from these posts.

    Best wishes,
    Bill

    Comment

    Working...

    ]]>