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 

writing a source client

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



Joined: 18 Mar 2010
Posts: 8

PostPosted: Fri Mar 19, 2010 8:56 pm    Post subject: writing a source client Reply with quote

I was wondering if writing a source client, without libshout, is as simple as creating a http request , and then sending the mp3/ogg data? I'm on windows and cant get the libshout-java bindings to work.

Thanks,
jason
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Mar 19, 2010 9:14 pm    Post subject: Reply with quote

Basically it is. The method is not standard http for a source client, it's just SOURCE /stream .. authorization header and anything else followed by the stream. The main thing libshout does is provide a wrapper between shout/icecast connections, metadata updates and it can throttle the stream being sent so that it's sent in real time. Nothing is stopping you from doing that yourself and the protocol is not that difficult.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mohadib



Joined: 18 Mar 2010
Posts: 8

PostPosted: Sat Mar 20, 2010 11:15 pm    Post subject: Reply with quote

thanks, do you know of any documentation on the protocol?Also, will I need to throttle the stream? If I dont, will icecast reject any data, or play the song out of time?

Thanks Again,
Jason
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Mar 21, 2010 4:03 am    Post subject: Reply with quote

Think http style, but icecast only really needs is the SOURCE request and the content-type, other header can be passed though. Icecast will not throttle the connection for you, after all you may be sending data it does not know how to parse.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mohadib



Joined: 18 Mar 2010
Posts: 8

PostPosted: Sun Mar 21, 2010 4:50 am    Post subject: Reply with quote

ok thanks, i got my app working mostly now. Im curious, If i have a variable bit rate mp3, how will i know how much data to send for a given span of time? Thank You!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sun Mar 21, 2010 4:56 am    Post subject: Reply with quote

generally you find out what the samplerate is and then based on the samples seen so far, match against the current clock time. Obviously that will be codec dependent.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mohadib



Joined: 18 Mar 2010
Posts: 8

PostPosted: Mon Mar 22, 2010 3:52 am    Post subject: Reply with quote

Ok, thank you. So I got the stream timing down pretty good now. Im curious about the number i see in the log:

[2010-03-21 21:49:47] DBUG stats/modify_node_event update node total_bytes_read (1165374000)
[2010-03-21 21:49:47] DBUG stats/modify_node_event update node total_bytes_sent (1165392499)


It seems more data has been read from the server than my stream client has sent. Can you shed any light on those numbers and what to make of them?

Thanks,
Jason
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Mar 22, 2010 4:53 am    Post subject: Reply with quote

That is probably because your listener has asked for metadata updates to be inserted. Or maybe you have requested the status page a number of times.

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 -> Source 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