[MPlayer-users] dumpaudio and listen at the same time?

Corey Hickey bugfood-ml at fatooh.org
Fri Nov 1 07:17:02 CET 2002


I just worked out a fancier way to do this. From a single console:

mplayer -slave http://whatever -dumpstream & sleep 5 ; ( cat stream.dump 
| mplayer - )

1. In order to make mplayer run in the background, the -slave switch 
seems to be necessary. I'm figuring this is because mplayer watches the
console for input otherwise, and can't do so from the background.

2. Then, sleep 5 seconds to give the download a chance to start. If the
playback ever catches up to the stream-dumping, tough luck! :) Adjust
that value as appropriate.

3. Now, if I just play the stream with "mplayer stream.dump", the
playback seems to quit once it plays as far as the dump had gotten when
the playback began. Actually, I just realized this limitation applies to
what I said to do in my last mail, so ignore what I wrote then. If 
mplayer reads from stdin, however, this doesn't happen, hence the
"cat stream.dump | mplayer - "

4. That last part is encosed in a subshell to make it work as intended
with the order of operations in bash.

...anyone know a better way to do this?

-Corey


Steven Adeff wrote:

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> is there a way to both listen to a internet audio stream and dump it 
> to the
> harddrive at the same time?
>
> thanks!





More information about the MPlayer-users mailing list