0

I'm running lame to convert a WAV sound in MP3, executing as console application:

ProcessBuilder pb = new ProcessBuilder(new String[]{"lame", "in.wav", "out.mp3", "-b", "128"});
Process p = pb.start();
try {
    p.waitFor();
} catch (InterruptedException ie) {
    logger.error("Error calling lame", ie);
}

When I'm reading the output, the "normal" output is empty, but the err has values. It's an execution error, or the lame do all output as err.

4

1 に答える 1

2

自分を見てください。ターミナルでそのコマンドを実行し、stdoutとstderrを別のファイルにリダイレクトします。次に、それがどこに行くのかがわかります。

lame in.wav out.mp3 -b 128 1>stdout 2>stderr
于 2012-08-31T17:53:00.317 に答える