On Sat, 23 Dec 2006 07:11:26 +0000, Ralph wrote this:
> Hi
>
> I'm using mplayer to record my streaming audio using command like this:
>
> mplayer -ao pcm:file=mystream.wav -vc dummy -vo null -cache 100 http://URL
>
> What I would like to do:
>
> 1. record directly to mp3
> 2. record automatically dividing stream to lets say 15 minutes files (mp3
> or wav).
>
> Is it possible to do it with mplayer or any other program?
>
> Thank you
make the following into script then setup start/stop cronjobs for 15
minute intervals. Or maybe the mplayer -endpos option can be used to
limit the stream to 15min chunks. Of course you'll need Lame
FIFO=/tmp/converter-fifo.`date +%s`
LAME_OPTS="-b 128"
OUTPUT="somefile.mp3"
URL="http://stream_source"
mkfifo $FIFO
mplayer -really-quiet -vo null -vc dummy -ao pcm -aofile -channels 2 $FIFO -playlist $URL < /dev/null &
lame $LAME_OPTS $FIFO $OUTPUT
rm $FIFO