[MPlayer-users] garbled audio through FIFO

Jeremy Cook jeremy.cook at bccs.uib.no
Wed Nov 30 13:37:12 CET 2005


Dear Mplayer users,

I'm new to mplayer, so hope for some help. I'm tying to transcode
RealAudio BBC webcasts so that I can listen to them by UPnP media
player. There are several recipes for saving streams to mp3 so that they
can be listened to later, but I don't want to record programs, I want to
simply stream them so that I can listen in to the stream whenever I
like. I am using mplayer and lame to transcode the incoming stream into
mp3, then I am using shoutcast server to make the stream available. I am
buffering the output/input of mplayer and lame through fifos so that we
don't have any large files hanging around.

My recipe so far is (using linux..):

mkfifo  livestream  content/livestream.mp3  livestream.wav
start shoutcast in 'current' directory (ie with 'content/' as subdir.)


[I use 3 different windows for these commands during testing]
mplayer -dumpstream -dumpfile livestream rtsp://rmlivev8.bbc.net.uk/farm/*/ev7/live24/radio2/live/r2_dsat_g2.ra
mplayer -ao pcm:file=livestream.wav livestream
lame -h -v -b 112 livestream.wav content/livestream.mp3

Then I can access livestream.mp3 from winamp 
as http://my.shoutcast.server:8800/content/livestream.mp3

So far so good. And I can start/stop winamp and join the stream.

However now and again audio gets garbled. It seems to be in connection
with starting/stopping play, ie one of the processes must be losing 
track of one of the incoming streams/fifos when play is stopped. It
sounds almost as though there are 2 same/similar streams, slightly
overlapped (1-2 seconds). If I leave it running for long enough it seems
to synch up again at some later stage, but very annoying all the same.

Any input on how to correct this, gratefully received. Ofcourse the
problem may not be related to mplayer, but I have to start somewhere.

Jeremy


-- 




More information about the MPlayer-users mailing list