[MPlayer-users] Problem with multiple mplayer in the same pipe

Rich Felker dalias at aerifal.cx
Tue Feb 12 07:48:19 CET 2008


On Tue, Feb 12, 2008 at 01:02:52AM -0500, Gilberto Abram wrote:
> Hey,
> 
> I'm writing a little program that does some simple audio processing,
> and I wanted to use mplayer to convert audio files in a standard
> format that I use, and then save or listen to the output.
> The way I had in mind was by doing something like this:
> 
> mplayer -af resample=48000:0:2,channels=1,format=s16ne -ao
> pcm:nowaveheader:file=/dev/stdout:fast $INPUT_FILE | ./a.out | mplayer
> -demuxer rawaudio -rawaudio channels=1:rate=48000:samplesize=2 -

Umm, try this and look at the contents of "crap" and I think you'll
see the problem right away:

mplayer -af resample=48000:0:2,channels=1,format=s16ne -ao
pcm:nowaveheader:file=/dev/stdout:fast $INPUT_FILE > crap

Rich




More information about the MPlayer-users mailing list