Question about command line, hide console and get feedback

bluelegacy

New member
Joined
Jan 17, 2010
Messages
1
Programming Experience
1-3
Hi guys, I've been cruising this site for quite a while as I've been learning but just recently came across some problems that I think might be worth discussing here.

I am working in VB. I have a fairly long and detailed explanation that I'll avoid posting but what I'm looking to find is quite simple. I'm looking for information how the command line executable LAME.EXE (the Mp3 encoder) returns information to the host program/form.

I am a VB novice and a novice to programming in general and am looking to learn more about as much as I can on the whole but basically I have a Windows form that gathers all the necessary information as a front-end:

The input .wav file path
The output .mp3 file destination
The encode settings (bitrate, frequency, etc)


This information is pooled in to a string like this:

VB.NET:
lame.exe -v -b 112  input.wav output.mp3

or any variant on the settings selected in the GUI which is then in turn used to execute LAME.EXE with the set of parameters in a command line console...

That's all well and good and it is quite functional but what I'm looking to do is to 'hide' the console in itself and have the encoder feed back its progress, say as a percentage inside the GUI.

The problem is that it doesn't appear that LAME in itself has this kind of functionality explicitly built in. I know it's possible however, as every single front end in the world has this functionality.

I have tried a few ways of doing this with avoiding the issue of not being able to find the functionality within the codec. Perhaps I'm looking in the wrong place entirely or I'm not thinking correctly 'outside the box' as it were.

Ideally, what I'm looking for is to use a command like this within the script itself:

VB.NET:
lame(v,b,112,"C:\input.wav","c:\output.mp3")

or even pass the parameters obtained from the GUI a string formatted dynamically on the fly itself.

I expect of course that this kind of functionality won't be available anywhere at all, what I'm really looking for as a workaround that reports the actions/progress/console output of the executable back in to the VB program somehow.

Any help at all would be greatly appreciated! Even if I can get some ideas going besides the correct and standard way of doing this, it might help to eventually lead down the path that I need to go to get this working and understanding programming on the whole a lot better.
 
Back
Top