[fpc-pascal] Linux - ExecuteProcess versus fpSystem

Marco van de Voort marcov at stack.nl
Fri Sep 9 09:22:31 CEST 2011


In our previous episode, brian said:
> write a batch file for the actual conversions.
> 
> 
> What are the commands?
> 
> mpg321 -q -w "tempfile.wav" "inputfile.mp3"
> 
> oggenc -Q --output="outputfile.ogg" "tempfile.wav"
> between the ExecuteProcess and fpSystem calls, I just commented out 
> the one I wasn't trying. The two lines of code are
> 
> 	Status := ExecuteProcess(CommandString, ParamString);

That's probably the problem. You use ", which might be problematic with
commandline separation and don't offer the commands to exexuteprocess in a
separated matter.

Try 

Status:=ExecuteProcess('/path/to/oggenc',['-Q','--output="outputfile.org"','tempfile.wav']);



More information about the fpc-pascal mailing list