Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: help with mpg123 taking in stream (Read 2662 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

help with mpg123 taking in stream

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?