linuxrox
asked on
How do i run a command line exe from within visual basic passing parameters to it?
Okay, what i'm doing here is working on a program that needs to use ffmpeg to convert a wma file to mp3.
what i'm needing to do though is call something like this from within my VB application.
C:\ffmpeg.rev12665>ffmpeg -i test.wma -vn -f wav - | lame --resample 32 -
b 40 -B 40 --cbr -f --priority 4 -m s - test.mp3
i simply need VB to be able to launch that externally basically.
i really need to convert the wma samplerate to different samples like 22,050 so flash will stream it properly.
i would purchase something to get this done and i was looking at this:
http://www.audio2convert.com/developers/wma-to-mp3.html
only problem with that is that it doesn't allow you to change the sample rate for mp3...only wav.
can anyone help me with this or know of an activex object i can purchase that will do this?
thanks!
what i'm needing to do though is call something like this from within my VB application.
C:\ffmpeg.rev12665>ffmpeg -i test.wma -vn -f wav - | lame --resample 32 -
b 40 -B 40 --cbr -f --priority 4 -m s - test.mp3
i simply need VB to be able to launch that externally basically.
i really need to convert the wma samplerate to different samples like 22,050 so flash will stream it properly.
i would purchase something to get this done and i was looking at this:
http://www.audio2convert.com/developers/wma-to-mp3.html
only problem with that is that it doesn't allow you to change the sample rate for mp3...only wav.
can anyone help me with this or know of an activex object i can purchase that will do this?
thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hey, I tried the following and this doesn't work:
ShellExecute Me.hwnd, vbNullString, "C:\ffmpeg.rev12665\ffmpeg .exe", "-i C:\ffmpeg.rev12665\localbr eak2.wma -vn -f wav - | C:\ffmpeg.rev12665\lame --resample 22.05 -b 40 -B 40 --cbr -f --priority 4 -m s - C:\ffmpeg.rev12665\localbr eak2.mp3", "C:\ffmpeg.rev12665\", SW_SHOWNORMAL
but when i paste this into a command prompt it does work:
C:\ffmpeg.rev12665\ffmpeg. exe -i C:\ffmpeg.rev12665\localbr eak2.wma -vn -f wav - | C:\ffmpeg.rev12665\lame --resample 22.05 -b 40 -B 40 --cbr -f --priority 4 -m s - C:\ffmpeg.rev12665\localbr eak2.mp3
any ideas?
ShellExecute Me.hwnd, vbNullString, "C:\ffmpeg.rev12665\ffmpeg
but when i paste this into a command prompt it does work:
C:\ffmpeg.rev12665\ffmpeg.
any ideas?
Shell("C:\Users\")
replace the C:\Users\ with the path