[MPlayer-users] output audio to stdout in linux:/dev/audio-playable format?

Alexis Huxley ahuxley at gmx.net
Sun Aug 22 22:40:23 CEST 2004


Hi, there's probably a much much easier way to do this, ...

... I'm trying to use xmms to play an rtsp:// stream using
mplayer instead of realplayer/rmxmms as the plugin.

I tried a mplayer plugin I found already packaged (for
Debian) but It doesn't want to play http://-wrapped 
rtsp:// streams; in fact it doesn't want to play rtsp:// 
streams at all; it only wants to play local avi files :-(

So, I saw that xmms has a 'meta-input' plugin, whereby this
plugin calls a user-written script, passing it the URI of
the thing to play, and the user-written script returns an
OSS-compatible audio stream, suitable for directing to
/dev/audio.

Well, I'm trying to put a call to mplayer in this user-written
script to do this conversion from http URL to OSS-compatible
stdout stream.

So far, I have lynx to 'unwrap' the http:// wrapping from
the rtsp:// stream, and then I'm calling mplayer ... but
I can't make mplayer produce something on stdout. I can only get
it into a file:

	mplayer -cache 100 -ao pcm -aofile target.wav rtsp://...

or I can make mplayer play directly on the audio hardware,
but I want don't want that 'cos I want to let xmms decide
which audio/net hardware to use.

So then I have a file, which I can convert to a suitable stdout
stream with:

	sox target.wav -r 44100 -t ossdsp - 

Is there any way to either make mplayer do what I want
in a single command, or to combine these two commands without
using an intermedia file? (I tried using a fifo as the 
intermediate file, but sox complained - presumably because
the source wasn't seekable.)

Any assistance appreciated!

Alexis

PS Oh, also, I noticed that playing the rtsp:// stream is 
   fine for a little while and then it flips into a garbled
   mode that sounds like a tape chopped up into little
   bits and each bit is moved a random small distance! I
   thought I had cracked this by playing in mono but eventually
   that also failed. 

PPS I'm using marillat's latest 'testing' debs.




More information about the MPlayer-users mailing list