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!
linuxroxAsked:
Who is Participating?
 
tomwalters5678Commented:
if all you want to do is run it externally, use the shell command:

Shell("C:\Users\")

replace the C:\Users\ with the path
0
 
linuxroxAuthor Commented:
Hey, I tried the following and this doesn't work:

ShellExecute Me.hwnd, vbNullString, "C:\ffmpeg.rev12665\ffmpeg.exe", "-i C:\ffmpeg.rev12665\localbreak2.wma -vn -f wav - | C:\ffmpeg.rev12665\lame --resample 22.05 -b 40 -B 40 --cbr -f --priority 4 -m s - C:\ffmpeg.rev12665\localbreak2.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\localbreak2.wma -vn -f wav - | C:\ffmpeg.rev12665\lame --resample 22.05 -b 40 -B 40 --cbr -f --priority 4 -m s - C:\ffmpeg.rev12665\localbreak2.mp3

any ideas?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.