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

Gilberto Abram gilberto.abram at gmail.com
Tue Feb 12 08:02:10 CET 2008


On Feb 12, 2008 1:48 AM, Rich Felker <dalias at aerifal.cx> wrote:
> 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

I am not sure what I am supposed to see other than the wave data in
binary. crap works. in fact, as i said in the first post (and as I
tried just now) by doing

cat crap | mplayer -demuxer rawaudio -rawaudio
channels=1:rate=48000:samplesize=2 -

I hear the original file, whereas if I have just "mplayer ... |
mplayer ..." I hear noise. Please, could you explain me what I should
see in that file?
Thanks,

GB



More information about the MPlayer-users mailing list