hey guys

i have recently used mpg123 to decode a test.mp3 to a WAV file and it worked fine. I am wondering how would I use mpg123 to play streaming mp3 or write the streaming mp3 to a file (WAV)?

I have tried ./mpg123 "http://icecast.freeteam.nl:8000/dfm_2" , but i hear nothing and i get this msg.

Directory: http://icecast.freeteam.nl:8000/
Playing MPEG stream 1 of 1: dfm_2 ...
ICY-NAME: ! DFM RADIO TELEVISION
ICY-URL: http://dfm.nu/
MPEG 2.0 layer III, 24 kbit/s, 22050 Hz mono

ICY-META: StreamTitle='';

This shows the decoder is working fine and is decoding i believe.

next i tried to write this stream to a file.
./mpg123 -w test "http://icecast.freeteam.nl:8000/dfm_2"

but i get this error

Directory: http://icecast.freeteam.nl:8000/
Playing MPEG stream 1 of 1: dfm_2 ...
ICY-NAME: ! DFM RADIO TELEVISION
ICY-URL: http://dfm.nu/
MPEG 2.0 layer III, 24 kbit/s, 22050 Hz mono

ICY-META: StreamTitle='';
Note: Illegal Audio-MPEG-Header 0x504c6121 at offset 0x3042.
[parse.c:655] error: not attempting to resync...
[mpg123.c:570] error: ...in decoding next frame: Lost track in the bytestream and did not attempt resync. (code 27)

anyone know how i would go about writing constant streams to a file or playing it?