Old 5th May 2013, 19:43   #161
MyStEk
Junior Member
 
Join Date: Oct 2012
Posts: 18
Ok, thanks for reply. And is there any c-library to connect SHOUTcast v1 server? mp3stream not working "broken pipe error"
MyStEk is offline  
Old 5th May 2013, 19:58   #162
DrO
 
Join Date: Sep 2003
Posts: 27,873
not officially, there's probably some floating around but that error is usually from the connection dropping / aborted due to not handling / sending the information needed.
DrO is offline  
Old 5th May 2013, 22:27   #163
MyStEk
Junior Member
 
Join Date: Oct 2012
Posts: 18
but I can use the mp3stream library? So how do you fix "broken pipe" ?
MyStEk is offline  
Old 5th May 2013, 22:41   #164
DrO
 
Join Date: Sep 2003
Posts: 27,873
i have no idea how to fix your issue as you've provided zero context - really that is something you need to consult with the documentation for the library you're trying to use - that is not something that can be dealt with under the scope of this forum. as it's down to you if trying to connect to a stream to use the appropriate sockets connection and to be able to send all of the information which is required to initiate and maintain a valid connection with the DNAS.
DrO is offline  
Old 30th July 2013, 01:32   #165
dicion
Junior Member
 
Join Date: Jun 2011
Posts: 12
Quote:
Originally Posted by ibenarobeno View Post
Wonderful! Thank you so much! Would you mind sharing the *.m3u version as well if it is different. How does the nginx rewrite rule look like?
code:

<?php
$sid = (int)$_GET["sid"];
if (!$sid) {
$sid = 1;
}
$servers = array();
$servers[] = "http://relay1.server.com:8000/";
$servers[] = "http://relay2.server.com:8000/";
$servers[] = "http://relay3.server.com:8000/";

do {
$index = array_rand($servers);
$server = $servers[$index];
unset($servers[$index]);
}
while (count($servers) && !stream_available($server, $sid));

if (empty($servers))
die("No streams available!");

$m3u = $server."listen.m3u?sid=".$sid;

header('Content-Disposition: attachment; filename=listen.m3u');
header("Content-type: audio/x-scm3u");
@readfile($m3u);

function stream_available($url, $sid) {
$xml = simplexml_load_file($url."stats?sid=".$sid);
if (!$xml)
return false;
if (!$xml->STREAMSTATUS)
return false;

return true;
}
?>



And the Rewrite rule for nginx:

code:

split_clients "${remote_addr}" $relayserver {
34% "relay1";
33% "relay2";
33% "relay3";
}



server {
listen 80;
listen 5800;
server_name radio.server.com www.server.com *.server.com *.server.net *.server.org;


access_log /var/log/nginx/server.com.access.log;
error_log /var/log/nginx/server.com.error.log;
root /server/home/www;


rewrite /$ http://everfree.net$1 last;

rewrite /listen.pls$ http://radio.server.com/getpls.php$1 last;
rewrite /listen.m3u$ http://radio.server.com/getm3u.php$1 last;
rewrite /listen.asx$ http://radio.server.com/getasx.php$1 last;
rewrite /stream/1/$ http://$relayserver.server.com:8000/stream/1/$1 last;
rewrite /stream/2/$ http://$relayserver.server.com:8000/stream/2/$1 last;
rewrite /stream/3/$ http://$relayserver.server.com:8000/stream/3/$1 last;
rewrite /stream/1/(.*)$ http://$relayserver.server.com:8000/stream/1/$1 last;
rewrite /stream/2/(.*)$ http://$relayserver.server.com:8000/stream/2/$1 last;
rewrite /stream/3/(.*)$ http://$relayserver.server.com:8000/stream/3/$1 last;
rewrite /stream/$ http://$relayserver.server.com:8000/stream/1/$1 last;



location / {
index getpls.php;
}




And some important bits of the Flash Player code. It's PHP, and if you don't know PHP, I'm not going to explain how it works. Go learn PHP and it will make more sense.

code:


function stream_available($url, $sid) {
$xml = simplexml_load_file($url."stats?sid=".$sid);
if (!$xml)
return false;
if (!$xml->STREAMSTATUS)
return false;
return true;
}


if ($streamUp) {
$servers[] = "http://relay1.server.com:8000/";
$servers[] = "http://relay2.server.com:8000/";
$servers[] = "http://relay3.server.com:8000/";

do {
$index = array_rand($servers);
$server = $servers[$index];
unset($servers[$index]);
}
while (count($servers) && !stream_available($server, 1));

if (empty($servers))
$streamUp = false;
}




So use the second condition there (Which I have run after a check to see if any streams are up) randomly picks a server, check to make sure that server's up, and if it is, assign it to the $server variable.

You can then use that variable to pass to a flash player of some kind
dicion is offline  
Old 1st August 2013, 22:46   #166
Tag
Streaming Media Expert
 
Tag's Avatar
 
Join Date: Apr 2000
Location: Fort Collins, Colorado
Posts: 141
Send a message via AIM to Tag
Have you fixed the 300 listener limit issue?

Powered by Redbull and Progressive House
Tag is offline  
Old 1st August 2013, 22:56   #167
DrO
 
Join Date: Sep 2003
Posts: 27,873
yes in the internal builds (as noted in the first post and the known issues).
DrO is offline  
Old 19th August 2013, 22:19   #168
WizardX
Member
 
Join Date: Oct 2007
Location: Amsterdam, The Netherlands
Posts: 82
Really looking forward to see all fixes into a public release. When can we expect a new release? Can't wait, still running my production streams on oldskool SC1
WizardX is offline  
Old 19th September 2013, 05:22   #169
Arsimael_
Junior Member
 
Join Date: Aug 2012
Posts: 32
Same here. Some of the bugs are very critical! When can we expect a new Main releas? I don't want to have to go back to SC1... Espechially if SC1 does not support YP2
Arsimael_ is offline  
Old 30th September 2013, 10:46   #170
WizardX
Member
 
Join Date: Oct 2007
Location: Amsterdam, The Netherlands
Posts: 82
DrO any update yet?
WizardX is offline  
Old 1st October 2013, 18:24   #171
djcenk
Junior Member
 
Join Date: Jan 2005
Posts: 41
DrO We are waiting for uptade. Thank you
djcenk is online now  
Old 1st October 2013, 18:46   #172
DrO
 
Join Date: Sep 2003
Posts: 27,873
i know people are waiting for an update and the new DNAS is currently under going testing. that's my update so far on things.

and as a note, there will only be Windows, Linux and Raspbian builds provided as usage of the existing Mac and BSD builds is minimal and are not compile types generally tested against so for the coming release they will not be included. am sure that'll irk someone but the usage numbers i have available are driving things for which builds are provided.
DrO is offline  
Old 1st October 2013, 21:06   #173
Wauzi007
Junior Member
 
Join Date: Sep 2013
Posts: 5
Mean that in next time no new release will come out for linux? So the bugs and not working release 2.0.29 will be for time X must wait?

Than it is the wrong software for me....but also no answer on question`s
Wauzi007 is offline  
Old 1st October 2013, 21:24   #174
DrO
 
Join Date: Sep 2003
Posts: 27,873
Linux is the main version of the DNAS software used - i don't quite get your comment when i have said that there will "only be Windows, Linux and Raspbian builds" as part of the update which is coming. so that means, Windows builds, Linux builds and Raspbian builds will be released.

it is _only_ Mac OS X and BSD builds which will not be released for the update i am working on since that will add more time to the process in getting a release out when we don't typically test or use those builds (and neither do most people based on usage and download stats). so i am trying to do my best to target the time i have available to provide what is appropriate for the majority of users which is going to be Windows, Linux and Raspbian builds.


and i have not actioned anything with the most recent pm message you sent from the weekend since i'm doing what i can to get a working build of the DNAS for not only you but everyone else to be able to use. i appreciate that your users are very angry and that it is super urgent, but the same is the case for others and so it is better i spend the time over the next day or two to finish off and release something so everyone benefits (and that's now 15mins i've lost on doing the update in having to reply to this and other requests for updates).
DrO is offline  
Old 3rd October 2013, 22:22   #175
burnetto
Junior Member
 
burnetto's Avatar
 
Join Date: Oct 2012
Location: Europe
Posts: 26
I appreciate your work Dro and thank you for your statement on all things.

Quote:
Originally Posted by DrO View Post
(and that's now 15mins i've lost on doing the update in having to reply to this and other requests for updates).
I think that is not a problem. Its very important to stay contact with the users - and the users with the dev.


Greetings, Steve
burnetto is offline  
Old 4th October 2013, 00:20   #176
MrSinatra
Forum King
 
MrSinatra's Avatar
 
Join Date: Dec 2004
Location: WKPS, State College
Posts: 5,570
Send a message via AIM to MrSinatra
wow, a new dsp AND a new DNAS? that's awesome

looking forward to rockin em.

PENN STATE Radio or http://www.LION-Radio.org/
--
BUG #1 = Winamp skips short tracks
Wish #1 = Multiple Column Sorting
Wish #2 = Add TCMP/Compilation editing
MrSinatra is offline  
Old 16th October 2013, 17:53   #177
DrO
 
Join Date: Sep 2003
Posts: 27,873
v2.2 Build 107 released as a forums exclusive for the time being. any issues not fixed with or new issues with v2.2 need to be reported in the new thread.

closing this one so v2.0 can start to go away
DrO is offline  
Closed Thread
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Discussions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump