Displaying 2 results from an estimated 2 matches for "my_bitr".
Did you mean:
ml_bits
2004 Aug 06
2
buffer size from source to ice/shoutcast
Hello,
I've built my own source for ICE/SHOUTcast, and it works pretty well except for one thing. After tuning into the server and listening for an 60-90 minutes you may hear a song skip ahead 30-90 seconds. I think I know why this is happening but I'mnot sure how to fix it.
I think this is happening because my source is sending a little bit too much data to ICE/SHOUTcast. My formula
2004 Aug 06
0
buffer size from source to ice/shoutcast
...=
1000bits/sec (Microsoft uses 1kbit=1024bits for it's media formats
incidently).
But your algorithm will suffer because sending the data will take a
non-negligible time -
better algorithm is
tart = time();
sent = 0;
while(1){
sent += send_chunk();
delta = time() - start;
my_bitrate = sent *8 / delta;
if(my_bitrate> target_bitrate){
sleep(1); /* (or any short time)*/
}
}
you maybe want to reset the sent/start parameters periodicly.
Scott Manley
--- >8 ----
List archives: http://www.xiph.org/archives/
icecast project homepage: http://www.i...