Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

mpg123 taking in an input stream

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Mon Mar 31, 2008 9:21 am    Post subject: mpg123 taking in an input stream Reply with quote

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





PostPosted: Tue Apr 01, 2008 10:06 am    Post subject: Reply with quote

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





PostPosted: Thu Apr 03, 2008 1:27 am    Post subject: Reply with quote

anyone have a clue?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 03, 2008 1:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Apr 03, 2008 4:20 am    Post subject: Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 03, 2008 4:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Thu Apr 03, 2008 5:17 am    Post subject: Reply with quote

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
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Apr 03, 2008 12:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber