I'm sorry if the title is quite confusing but I am wondering if it's possible to get the stdout of an app that is piped into another app in java.
Here's the commandline.
sox -d -t wav - | lame - test.mp3
If this is executed in bash, this is the output.
Input File : '/dev/dsp' (ossdsp)
Channels : 2
Sample Rate : 48000
Precision : 16-bit
Sample Encoding: 16-bit Signed Integer PCM
In:0.00% 00:00:25.00 [00:00:00.00] Out:1.20M [ -|=- ] Clip:0
The last line gets updated by sox until user sends SIGINT.
Problem is, in java, InputStream from that process does not produce any data. But if I omit the piping of sox to lame, sox -d -t wav test.wav
, InputStream gets data. My question is, what happened to the console out? How can I get access to it.