View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Mon Mar 31, 2008 9:21 am Post subject: mpg123 taking in an input stream |
|
|
hey guys
I have recently installed mpg123 on my system and have tested it for a local test.mp3 which gets decoded into a WAV file.
I am wondering how do I setup a server and stream an mp3 as an input for the mpg123 decoder. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Tue Apr 01, 2008 10:06 am Post subject: |
|
|
hey i think i've figured it out by typing :
./mpg123 "http://icecast.freeteam.nl:8000/dfm_2"
its just a random server i found somewhere. However i do not hear anything 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='';
I guess this shows the decoder is working fine. I am wondering how do i get the decoder to write whatever the mp3 its decoding into a file or play it through a speaker. I have tried:
./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?
thanks alot |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu Apr 03, 2008 1:27 am Post subject: |
|
|
anyone have a clue? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Apr 03, 2008 1:37 am Post subject: |
|
|
You really need to talk to the people involved with mpg123 to report issues with them. I'm sure the man pages or other docs associated with mpg123 with indicate the exact arg to use for writing to file if supported.
karl. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu Apr 03, 2008 4:20 am Post subject: |
|
|
thx karlh i'll play around with it
http://icecast.freeteam.nl:8000/dfm_2 is just a random server i found on the net.
I have also tried to use wget http://icecast.freeteam.nl:8000/dfm_2, this seems to grab the mp3 frames.
I am wondering howcome after running wget command for just 10secs, i have created a dfm_2 file( which i believe is in the mp3 format) which is a song that goes for 45secs. I dont quite get how this is possible as i should only be getting 10sec of streams.
I think what's happening is that wget is downloading the song at normal download rate for the time interval, and that's not true streaming.
Can someone please explain this simple concept to me? How would i go about using wget to do true streaming?
thanks in advance |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Apr 03, 2008 4:38 am Post subject: |
|
|
That will be a burst on connection. To quickly fill a prebuffer of a player. By default icecast sends 64kbytes burst but it can be changed.
karl. |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu Apr 03, 2008 5:17 am Post subject: |
|
|
so even when its streaming, you will download the entire song to your computer LONG before the radio station finish playing the song? |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Apr 03, 2008 12:25 pm Post subject: |
|
|
of course not. You will only receive whatever has been sent to server by the broadcaster. icecast doesn't really have the notation of songs, only the stream and any metadata associated with it.
karl. |
|
Back to top |
|
|
|