Old 29th December 2010, 03:13   #41
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
After I option the use of socket versus url stream, I may be able to get to a skin.

The skin is loaded at run time, so one could begin work on a skin before the heart of the code is released.
Smelter is offline   Reply With Quote
Old 29th December 2010, 04:21   #42
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,007
Send a message via Skype™ to thinktink
Oh, is there something I should do or just wait?
thinktink is offline   Reply With Quote
Old 29th December 2010, 04:38   #43
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
'should' is a relative term.. do you compile flash? if so, one could work on visual skin without the stream codecs
Smelter is offline   Reply With Quote
Old 29th December 2010, 04:40   #44
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
if you can't afford flash ... what about haxe http://haxe.org/

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 29th December 2010, 04:54   #45
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
flex/flash/haxe

doesnt matter except for the interface is implemented.
Smelter is offline   Reply With Quote
Old 29th December 2010, 04:58   #46
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
was just offering a free alternative

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 29th December 2010, 05:14   #47
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,007
Send a message via Skype™ to thinktink
I've never messed with flash before. I don't know if I would even know where to start. lol

I leave it in your obviously capable purview.

thinktink is offline   Reply With Quote
Old 31st December 2010, 22:38   #48
shonuff66
Junior Member
 
Join Date: Dec 2010
Posts: 2
How did you send a HTTP GET with the "Icy-MetaData:1" from flash? If not from flash, then from where?

Flash blocks all custom headers with HTTP GET. HTTP POST doesn't work for shoutcast audio streams I try to connect to.

Also, have you discovered a way to go crossdomain and get a shoutcast stream with the "Icy-MetaData:1" header? If you solved the above HTTP GET problem, then this problem should be solved. Tried in javascript, but you run in to site origin policy.

People have been doing flash shoutcast stream players for a while, and some had eliminated the memory problem. but nobody from what i can tell has been able to send "Icy-MetaData:1" for the song info in an HTTP GET.
shonuff66 is offline   Reply With Quote
Old 1st January 2011, 03:32   #49
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Hello, and welcome shonuff66.

Quote:
Flash blocks all custom headers with HTTP GET. HTTP POST doesn't work for shoutcast audio streams I try to connect to.
False;

Quote:
Also, have you discovered a way to go crossdomain ...
crossdomain rules apply and are they are not too difficult.

Quote:
"Icy-MetaData:1" header?
Is not a problem with a socket connection, but requires a socket policy server.
Smelter is offline   Reply With Quote
Old 1st January 2011, 23:43   #50
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
To follow up on the meta data concerns, I went ahead and added trace out in flash code to show what I get. I picked up a random aac station from the shoutcast directory.

code:

Play stream type: Shoutcast Stream uri: ;stream.nsv
[SWF] c:\wamp\www\bonkers\Shoutcast.swf - 58,803 bytes after decompression
Provider Loaded
onChannelReady : MetaData


_____________
Response : ICY 200 OK

icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>

icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>




_____________
Metadata :
br : 32
name : KissFM Romania - www.kissfm.ro - Cea Mai Buna Muzica Se Aude La Kiss
url : http
content-type : audio/aacp
audiocodec : AAC
metaint : 8192
genre : Top 40
audiocodecid : 10
pub : 1
Meta length 32
Metadata :
br : 32
StreamTitle : ''
name : KissFM Romania - www.kissfm.ro - Cea Mai Buna Muzica Se Aude La Kiss
audiocodecid : 10
content-type : audio/aacp
audiocodec : AAC
pub : 1
genre : Top 40
url : http
StreamUrl : ''
metaint : 8192
.
.
onChannelReady : AAC
.



The first flv metadata event is the aggregated icy headers, and the second one is when the first metaint had passed. I aggregated the data into the existing meta object and re-dispatched it.
Smelter is offline   Reply With Quote
Old 3rd January 2011, 23:07   #51
shonuff66
Junior Member
 
Join Date: Dec 2010
Posts: 2
The question is how you are able to send the request with the "Icy-MetaData:1" header.
1) using HTTP GET (URLStream method) in flash certain limits HTTP GET. AS3 reference says "Due to browser limitations, custom HTTP request headers are only supported for POST requests, not for GET requests." I've tried it and any header that is added to a GET request is removed.
2) Using sockets. Obviously if sockets are used, HTTP GET with custom headers is possible, but as you said a socket policy file is needed to connect to the stream. Now, it seems you are able to bypass this, if so how?

I tried connecting to http://80.86.106.136:8000;.mp3 (KissFM Romania) within flash using sockets and also URLStream and neither one loads, because there is no crossdomain.xml nor socket policy file.

Error using sockets:
cannot load data from 80.86.106.136:8000.: Error #2048: Security sandbox violation: file:///C|/<blah>/blah.swf cannot load data from 80.86.106.136:8000.
at fly.sound::StreamPlayer/_socketSecurityErrorHandler()

So what method are you using to send the request?

Yes, I see you are getting the metadata, thank you for that. The question is how you are able to send the request. Either:
1) AS3 URLStream based HTTP GET has the limitation of custom headers being filtered. AS3 specification for URLRequestHeader says "Due to browser limitations, custom HTTP request headers are only supported for POST requests, not for GET requests." I've tried it, and certainly does filter out custom headers for GET. POST just doesn't work for Shoutcast.
2) Sockets: I believe you are using this method to send the HTTP GET with custom "Icy-MetaData:1". But as you said, a socket policy file is required on the stream side server.

I tried to the KissFM Romania station, it does not have a crossdomain.xml nor a socket policy file. I get a sandbox error when trying to connect via sockets.

So how do you send the request and avoid these sandbox restrictions?
shonuff66 is offline   Reply With Quote
Old 4th January 2011, 02:49   #52
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
I didn't do it cross-domain. I did it from the desktop. However You are correct, a socket policy server is needed to serve the player to the browser from the web. This is not a technical issue. If a radio station wants to allow it, they have control.

I am not bypassing cross-domain issues. They still apply.
Smelter is offline   Reply With Quote
Old 4th January 2011, 03:02   #53
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
One wonders what you are going to do once you get the socket stream flowing....

You cant use it with Sound(); You've gotta construct an flv stream on the fly.
Smelter is offline   Reply With Quote
Old 4th January 2011, 03:24   #54
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Quote:
Originally Posted by Smelter View Post
One wonders what you are going to do once you get the socket stream flowing....
same as you?

Quote:
Originally Posted by Smelter View Post
You've gotta construct an flv stream on the fly.
isn't that what you are doing?

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 4th January 2011, 03:29   #55
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Yeah, I just wondered if he was going for the 'Sound' technique or if he knew that once he set up his policy server, that he still had 90% of the job to go.

What tools do you have Jaromanda? For flash compilation.
Attached Thumbnails
Click image for larger version

Name:	logo.jpg
Views:	276
Size:	15.8 KB
ID:	48253  
Smelter is offline   Reply With Quote
Old 6th January 2011, 00:52   #56
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Let the fun begin.

http://thundersnow.thebitstream.com/
Smelter is offline   Reply With Quote
Old 6th January 2011, 01:35   #57
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Quote:
Originally Posted by Smelter View Post
What tools do you have Jaromanda? For flash compilation.
I use the aforementioned haxe http://haxe.org/

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 6th January 2011, 02:04   #58
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Sweet, well there is a lot of fun that can be had!
Smelter is offline   Reply With Quote
Old 6th January 2011, 02:42   #59
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,289
Quote:
Originally Posted by Smelter View Post
Sweet, well there is a lot of fun that can be had!
there's a lot of fun just converting flex to haxe - whilst it's very similar, it's also very different

Is it just me or are shoutcast users getting dumber?
jaromanda is offline   Reply With Quote
Old 6th January 2011, 04:07   #60
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
there shouldnt be any mx classes in there. Hopefully its pure flash.* with my com.thebitstream.*
Smelter is offline   Reply With Quote
Old 6th January 2011, 12:57   #61
DaZilertaler
Junior Member
 
Join Date: Mar 2010
Posts: 23
How does the compleet setup to play an aac shoutcast stream look like?
do i only need to edit the xml?
DaZilertaler is offline   Reply With Quote
Old 6th January 2011, 16:08   #62
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Yes.
Smelter is offline   Reply With Quote
Old 6th January 2011, 16:27   #63
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
And you'll need the files
  • Codecs.swf for video
  • Shoutcast.swf
  • ShoutcastFile.swf if needed.
  • The main loader.swf
  • Or recompile all into one with imports.

code:

<playlist>

<projector>
<name>DemoSound</name>
<uri>ViewDeveloper.swf</uri>
</projector>

<codec>
<uri>CodecPack.swf</uri>
</codec>

<item>
<provider>ShoutcastFile</provider>
<description>NSV file over http progressive download</description>
<view>DemoView</view>
<uri>http://thebitstream.com/snow.nsv</uri>
</item>
<item>
<provider>Shoutcast</provider>
<description>Shoutcast v1 over http stream</description>
<view>DemoView</view>
<connection>tcp</connection>
<uri>http://234.234.234.234:8008/;stream.nsv</uri>
</item>
<item><!-- icy-metaint data requires socket -->
<provider>Shoutcast</provider>
<description>Shoutcast v1 over socket stream</description>
<view>DemoView</view>
<connection>socket</connection>
<!-- If not port 843. uri of policy file.
<policy>xmlsocket://foo.com:414</policy>
-->
<host>123.123.123.123</host>
<port>8010</port>
<uri>/;stream.nsv</uri>
</item>
</playlist>

Smelter is offline   Reply With Quote
Old 6th January 2011, 19:14   #64
mohanad
Member
 
Join Date: Jun 2000
Posts: 65
great work, I tried with my vp6/mp3 live stream and it didn't work, I've the transcoder.swf under my webserver on the same domain, I tried playing a local nsv file, it didn't work, I copied your snow.nsv file to my webserver and tried it with the transcoder swf and it worked fine, but can't play 127.0.0.1:8000/;stream.nsv
mohanad is offline   Reply With Quote
Old 6th January 2011, 19:32   #65
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Vp6 is in the codec swf. That player did not import them at compile time so you'd have to load them with the xml list

http://thundersnow.thebitstream.com/demo/CodecPack.swf
Smelter is offline   Reply With Quote
Old 6th January 2011, 19:35   #66
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
And you need a socket policy server, or strict crossdomain.xml compliance to connect.

Icecast is easier because it has a web server built in. When served over the same port from the same domain, you wont need crossdomain.

Socket requires policy server.
Smelter is offline   Reply With Quote
Old 6th January 2011, 19:37   #67
mohanad
Member
 
Join Date: Jun 2000
Posts: 65
I also captured an nsv stream from http://87.230.55.91:4010/ to a local file, it played in the aol activex player, it didn't play in the trancoder swf
mohanad is offline   Reply With Quote
Old 6th January 2011, 19:44   #68
mohanad
Member
 
Join Date: Jun 2000
Posts: 65
thanks, I tried using the codec and the videoplayer, I still can play only snow nsv, can't play the attached file.
Attached Files
File Type: zip 2.zip (1.06 MB, 378 views)
mohanad is offline   Reply With Quote
Old 6th January 2011, 19:44   #69
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
false


code:

[SWF] c:\wamp\www\bonkers\Shoutcast.swf - 38,755 bytes after decompression
Provider Loaded
onChannelReady : MetaData
_____________ false 0
Response ok @ socket? : ICY 200 OK

icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>

icy-notice2:SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>


_____________ true 0
reportedBR 32768
Metadata :
metaint : 8192
name : )) ~ POP-Radio POP One ~ ((::: streamed by pop-stream.de
content-type : video/nsv
StreamUrl : 'http://www.pop-radio.tv'
pub : 1
genre : Pop Top40 Charts Hits News
url : http://www.pop-radio.de
br : 256
StreamTitle : 'Specht 0 5 2 8 4 / 9 4 2 9 3 3 2 1 auf www.pop-radio.tv'
onChannelReady : AACP
onChannelReady : VP62
Metadata :
metaint : 8192
content-type : video/nsv
StreamUrl : 'http://www.pop-radio.tv'
framerate : 30
flipVideo : 1
genre : Pop Top40 Charts Hits News
url : http://www.pop-radio.de
audiocodecid : 10
videocodecid : VP62
pub : 1
name : )) ~ POP-Radio POP One ~ ((::: streamed by pop-stream.de
audiocodec : AACP
width : 320
height : 240
br : 256
StreamTitle : 'Specht 0 5 2 8 4 / 9 4 2 9 3 3 2 1 auf www.pop-radio.tv'
onChannelReady : SUBT
Subtitle
Specht 0 5 2 8 4 / 9 4 2 9 3 3 2 1 auf www.pop-radio.tv

Smelter is offline   Reply With Quote
Old 6th January 2011, 19:46   #70
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Quote:
Originally Posted by mohanad View Post
thanks, I tried using the codec and the videoplayer, I still can play only snow nsv, can't play the attached file.
It is difficult to play a file locally. The proto code requires some element of network delay to play NSVFIles.

No talk of ripping plz.
Smelter is offline   Reply With Quote
Old 6th January 2011, 19:48   #71
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
You need to import the vp6 and aacp codecs with the playlist, and comply to crossdomain, if you use the demo transcoder on the web
Smelter is offline   Reply With Quote
Old 6th January 2011, 19:49   #72
mohanad
Member
 
Join Date: Jun 2000
Posts: 65
thanks , I got my attached file to play after loading the codec, I'll try the icecast, or do you know what cani do in the shoutcast or the webserver to allow cross domain,

Thanks
mohanad is offline   Reply With Quote
Old 6th January 2011, 19:54   #73
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,007
Send a message via Skype™ to thinktink
Without recompiling the SWFs (because I dunno how and wouldn't know what to compile anyways cause I'm a SWF uber-noob) what components are needed to put on the webserver to get this to work with just SHOUTcast audio streams AAC+ and MP3? I know it's prolly a dumb question but I couldn't find a readme and the playlist.xml file seems to talk about Icecast, legacy SHOUTcast and video streams and I dun wan none tha' stuff. A little bit confuzled.

thinktink is offline   Reply With Quote
Old 6th January 2011, 19:57   #74
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Quote:
Originally Posted by mohanad View Post
thanks , I got my attached file to play after loading the codec, I'll try the icecast, or do you know what cani do in the shoutcast or the webserver to allow cross domain,

Thanks
You bet.

The bit stream needs to be optimized to get the higher bitrate content to perform as good as the streams that are 128kbs
Smelter is offline   Reply With Quote
Old 6th January 2011, 20:02   #75
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Quote:
Originally Posted by thinktink View Post
Without recompiling the SWFs (because I dunno how and wouldn't know what to compile anyways cause I'm a SWF uber-noob) what components are needed to put on the webserver to get this to work with just SHOUTcast audio streams AAC+ and MP3? I know it's prolly a dumb question but I couldn't find a readme and the playlist.xml file seems to talk about Icecast, legacy SHOUTcast and video streams and I dun wan none tha' stuff. A little bit confuzled.

I believe you can use legacy , and I recommend socket. You also need codecs swf .

code:

<projector>
<name>DemoSound</name>
<uri>ViewDeveloper.swf</uri>
</projector>

<codec>
<uri>CodecPack.swf</uri>
</codec>
<item>
<provider>Shoutcast</provider>
<description>Shoutcast v1 over socket stream</description>
<view>DemoSound</view>
<connection>socket</connection>
<!-- If not port 843. uri of policy file.
<policy>xmlsocket://foo.com:414</policy>
-->
<host>domain</host>
<port>port</port>
<uri>/;stream.nsv</uri>
</item>

Smelter is offline   Reply With Quote
Old 6th January 2011, 20:11   #76
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
full meal deal.

http://www.adobe.com/devnet/flashpla...ty_update.html
Smelter is offline   Reply With Quote
Old 6th January 2011, 21:28   #77
mohanad
Member
 
Join Date: Jun 2000
Posts: 65
unable to play through icecast,
is this the correct syntax for icecast playlist,


<item>
<provider>IcecastNSV</provider>
<description>Icecast nsv over http stream</description>
<view>DemoView</view>
<host>http://127.0.0.1:8000</host>
<uri>/live.nsv</uri>
</item>
mohanad is offline   Reply With Quote
Old 6th January 2011, 22:00   #78
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
put this next to the player

http://thundersnow.thebitstream.com/demo/IcecastNSV.swf

Each provider is loaded at run time if it is not precompiled. {Provider Class name}+".swf" is attempted to be loaded at run time. If it fails, I think it advances in the list.
Smelter is offline   Reply With Quote
Old 7th January 2011, 04:38   #79
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
this should help

I love pictures. The 'View' Class is the front facing GUI.

Smelter is offline   Reply With Quote
Old 7th January 2011, 10:07   #80
thinktink
Forum King
 
thinktink's Avatar
 
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,007
Send a message via Skype™ to thinktink
I must be doing something wrong. It shows the metadata and one of the bars goes back-and-forth like there's audio but I don't hear anything.

http://bogproghome.hopto.org/thundersnow/exp.html

Also, I'm assuming that since I dun know how to compile SWFs I'm not going to be able to get rid of that [NEXT] button or make the visual display wider to accommodate lengthy metadata? Every time I try to re-size the object in the HTML tags it just disappears.
thinktink is offline   Reply With Quote
Reply
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