Go
Not registered? Sign up!

Shoutcast and JW Player issue

Google Translate
22 posts | return to the Setup Problems forum | get the rss feed for this thread

Aug. 08, 2009The Catt

Hi,

I cant get my shoutcast stream to work in the new version of JW Player. It has been working fine with 3.16 version.
The exact problem is it plays for a second and then stops. Here is the code I use to embed the player:

---------------------------------------------------------------------------
<div id="player">
<a href="http://www.macromedia.com/go/getflashplayer">Get Flash!</a>
<script type="text/javascript">
var so = new SWFObject('player.swf', 'player', '600', '200', '7');
so.addVariable("type","sound");
so.addVariable("file","http://72.20.6.90:8590/;stream.nsv");
so.write('player');
</script>
</div>
---------------------------------------------------------------------------
Also, Player works with SWFObject v1.5, but not with SWFObject v2.1. Please help me!

Thanks

Aug. 08, 2009lost

SWFObject v1.x
    <div id="player" class="player"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this video.</a></div>

    <script type="text/javascript">
      var so = new SWFObject('player.swf', 'player', '600', '200', '9.0.124');
          so.addVariable('file',     'http://72.20.6.90:8590/;stream.nsv');
          so.addVariable('type',     'sound');
          so.addVariable('duration', '99999');
          so.write('player');
    </script>


swfobject v2.2
  <head>

    <script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>

    <script type="text/javascript">
      var flashvars =
      {
        'file':               'http://72.20.6.90:8590/;stream.nsv',
        'title':              'My Stream',
        'type':               'sound',
        'duration':           '99999',
        'frontcolor':         '86C29D',  // text & icons                  (green)
        'backcolor':          '003367',  // playlist background           (blue)
        'lightcolor':         'C286BA',  // selected text/track highlight (red)
        'screencolor':        'FFFFFF',  // screen background             (black)
        'id':                 'playerID',
        'autostart':          'true'
      };

      var params =
      {
        'allowfullscreen':    'false',
        'allowscriptaccess':  'always',
        'bgcolor':            '#FFFFFF'
      };

      var attributes =
      {
        'id':                 'playerID',
        'name':               'playerID'
      };

      swfobject.embedSWF('player.swf', 'player', '600', '200', '9.0.124', false, flashvars, params, attributes);
    </script>

  <head>

  <body>

      <div id="playercontainer" class="playercontainer"><a id="player" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Flash Plugin to see this video.</a></div>

  </body>

Aug. 08, 2009The Catt

Thanks!

Aug. 11, 2009Andy

Hey I have exactly the same problem. cant get jwplayer playing shoutcasts.

please help

cheers
Andy

Aug. 13, 2009Andy

hey lost or the cat could you please make some comments to the code i cant understand it. do I have to make 2 files???

swfobject v1.x
swfobject v2.2

???

please explain it

thanks

Aug. 13, 2009lost

Just use the swfobject v2.2 code. It's newer and much better!

I included the SWFObject v1.x because it's still in widespread usage, but I would never recommend it.

Aug. 16, 2009Andy

hey lost,

thanks for your answer.

so all i have to do is to copy and paste your code into my test.html and when i open it it will stream music?

Aug. 16, 2009lost

Well...

You need player.swf on your server and a valid stream, but then the code should work. If not, post a link to your Test Page and I'll help you finish it.

Aug. 16, 2009Andy

works...

my player.swf was named player-viral.swf

thank you very much!!!

Aug. 16, 2009lost

You're welcome. Nice to see it works for you.

    Good Luck!

Aug. 26, 2009RH

The swfobject v2.2 code works great but the player shows the file length (a streaming station) as 1666:3, how would I change that?

Aug. 28, 2009Fallo

RH, It will always show that. There is no way to know the length of a stream; infinite perhaps...

Sep. 03, 2009Jesse

the v1.x code doesn't work

I'm interested in getting this to work with flash lite, does anyone know how?

Sep. 05, 2009Jesse

Bump- there's gotta be an answer

Sep. 25, 2009Dirk

Hello LOST, I have inserted as described above, copies the data has changed but it is not running. There are all the files in the same directory. My test page is http://80.237.155.71/videoplayer/video.html. Can you help me please ? Thx

Sep. 25, 2009lost

 
@Dirk,

Check the Shoutcast mount point at: http://80.237.155.71:8500

Current Stream Information
Server Status: Server is currently up and public.
Stream Status: Stream is up at 256 kbps with 17 of 500 listeners (17 unique)
Listener Peak: 35
Average Listen Time: 4h 42m 04s
Stream Title: ** Germany-Stream - Einfach geil... **
Content Type: video/nsv
Stream Genre: The New Generation mit Discofox,Pop,Schlager,Oldies u.v.m.
Stream URL: **http://www.germany-stream.de**
Stream AIM: N/A
Stream IRC: **Jetzt für Euch Euer Andi**
Current Song: Germany.Stream @ GS-Musikexpress - Tel: 030 - 89 39 89 66



Flash-based players cannot play NullSoft Video streams.

Sep. 25, 2009Dirk

Hello LOST thx for your answer. But on Radio have a JW Player an stream the NSV in Flash...
So one would have to create an FLV file to view the video let me guess about it.
Not only knew what I must write in the FLV file

Sep. 25, 2009lost

 
If you want to have a FLV video playing  —AND—  a Shoutcast audio only stream playing, you can use the JW FLV Player to play the FLV video and use the Audiodescription plugin to play the Shoutcast stream.

Just point audiodescription.file at your Shoutcast stream (must be audio only).

Sep. 25, 2009Dirk

@LOST
shame that I do not know me so out how to implement it. 've Got no idea of. Sorry for my english..
how can you create an FLV video script ?

Sep. 25, 2009lost

 
Like this: http://willswonders.myip.org:8074/Dirk.html

The audiodescription can be toggled on/off by the AD button on the controlbar.

The audiodescription volume can only be controlled by the audiodescription.volume flashvar in the player code.

The other option is to use a second player to play the Shoutcast audio stream, which I have also done in the Test Page. Then you can use the player's volume control to control the volume of the Shoutcast audio stream. If you decide to use a second player, remove the audiodescription plugin and flashvars from the first player's code.

Nov. 05, 2009john

how can i add a plugin like equalize in the 2.0 above code, i tried to use something like
'plugins': 'spectrumvisualizer-1'
but it doesnt work

Nov. 05, 2009hobbs

 
@john,

Are you trying to use the spectrumvisualizer plugin with a Shoutcast stream?

Sorry, won't work. Flash security restrictions...

Add a reaction

You can also return to the category or try this search for related threads.


 

Search the Forums

Go

Support

Support Here are some helpful links to learn more about the JW Player™:

Monetize Your Video

Monetize Your Video Earn money with ads from LongTail's AdSolution. Watch our demos and sign up now!

Why Buy a License?

Why Buy a License? If you don’t buy a commercial license, you cannot use a JW Player™ on (i) a site that has ads; (ii) a corporate site; or a (iii) CMS. Our licenses are very inexpensive, so what are you waiting for? Buy a license today.