Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Server Not Found Error in


Hello all,

We recently upgraded to JWPlayer version 4.6 and are now getting an occasional error (95%+ of our viewers are getting no problem) where the rtmp player is not found. The error is

"Server Not Found: rtmp://www.vega.org.uk/oflaDemo"

Does anyone know what sorts of issues cause this?

We are assuming this is a network issue but are stuck with what to do about it as we cannot replicate the issue.

Is there a timeout somewhere in jwplayer that is firing off and then displaying this error, or does it mean that the search for the server genuinely returned an error.

If there is a timeout, is there anyway to set it much longer?

Our settings for creating the player are
// player is jwplayer from www.longtailvideo.com
var s1 = new SWFObject("http://www.vega.org.uk/flash/player.swf","single","480","380","9");
s1.addVariable("type", "rtmp");
s1.addParam("allowfullscreen","true");
s1.addVariable("image","http://www.vega.org.uk/flash/preview.jpg");
s1.addVariable("streamer","rtmp://www.vega.org.uk/oflaDemo");
s1.addVariable("file","{$flash_file}");
s1.addVariable("showdigits","total");
s1.write("player1");

Regards

Neill Jones

26 Community Answers

JW Player

User  
0 rated :

Hi Neill,

I'm not sure what would be causing this besides being unable to communicate with the server. Also, there's currently no way to specify a timeout.

Is there any specific page that seems to be generating the error?

JW Player

User  
0 rated :

I am also getting reports of this from a few customers.

It's not a specific page - if they can't view one video, they can't view any.

Swift advise would be appreciated - as a video company it's no use if people can't see our videos!

Thanks, Linda

I'm using this code, on this page for example:
http://www.rossiterandco.com/videoad.htm

<script type="text/javascript">
var so = new SWFObject('videoplayer/player.swf', 'mpl', '550', '328', '9.0.124');
so.addParam('allowscriptaccess', 'always');
so.addParam('allowfullscreen', 'true');
so.addVariable('file', 'webvideo/VA02_webvideo.flv');
so.addVariable('image', 'videoplayer/images/videoademail.jpg');
so.addVariable('backcolor', '333333');
so.addVariable('frontcolor', 'CCCCCC');
so.addVariable('lightcolor', '62A9F0');
so.addVariable('screencolor', 'FFFFFF');
so.addVariable('streamer', 'rtmp://draco.streamingwizard.com/streamingvideo123/');
so.write('player1');
</script>

JW Player

User  
0 rated :


Sometimes corporate firewalls block port 1935 (used for RTMP). Does your RTMP server have fallback to port 80?

There are mistakes in your HTML document, such as wrapping the JavaScript code in the division element, that the object element for embedding the Flash content, will be written to by SWFObject.

SWFObject v1.5 is considered to be obsolete and is no longer supported by its developers.

I would suggest moving to swfobject v2.2, loaded from Google's CDN.

Place this code in the head element of your HTML document:bc.. <scriptsrc="http://www.google.com/jsapi"></script>

<script>
google.load('swfobject','2.2');
</script>

<scripttype="text/javascript">
varflashvars=
{
'streamer':'rtmp://draco.streamingwizard.com/streamingvideo123/',
'file':'webvideo/VA02_webvideo.flv',
//'type':'rtmp',//requiredbythev4.6player
'image':'videoplayer/images/videoademail.jpg',
'plugins':'gapro-1',
'gapro.accountid':'UA-229582-1',
'gapro.trackstarts':'true',
'gapro.trackpercentage':'true',
'gapro.tracktime':'true',
'backcolor':'333333',
'frontcolor':'CCCCCC',
'lightcolor':'62A9F0',
'screencolor':'FFFFFF',
'id':'playerID',
'autostart':'true'
};

varparams=
{
'allowfullscreen':'true',
'allowscriptaccess':'always',
'bgcolor':'#FFFFFF'
};

varattributes=
{
'id':'playerID',
'name':'playerID'
};

swfobject.embedSWF('videoplayer/player.swf','player1','550','328','9.0.124',false,flashvars,params,attributes);
</script>



PlacethiscodeinthebodyelementofyourHTMLdocumentwhereyouwanttheplayertoappear:bc.. <divid="playercontainer1"class="playercontainer"><aid="player1"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a></div>


You can use CSS to style the division element with a class of "playercontainer" to position and style the player object if so desired.

Theadvantagesofusingswfobjectv2.xloadedfromGoogle'sCDN:

LoadingfromGoogleAJAXLibrariesAPI:

*http://pipwerks.com/journal/2008/11/11/swfobjectjs-finds-a-home-on-google-servers/*


How&WhyYouShouldUseGoogleCDN:

*http://webmuch.com/how-why-you-should-use-google-cdn/*

JW Player

User  
0 rated :

Hobbs, thanks for your feedback.

> Regarding the blocked port - with advice, I've now changed it to rtmpt://draco.streamingwizard.com:80

As I can't replicate the error I'll wait and see if someone else complains.

> As for the code - in my defence, I bought the licence, and I used the wizard on this site to generate the code. The developers obviously need to update it.

Someone on this forum then improved it earlier this year.

As a video editor rather than a programmer I just take the next bit of advice given!

So, as you're offering help today, can you help a little further? My site has hundreds of pages, with a common header. So I don't want to put the unique video names in the header each time.

Also I need the videos to be different sizes on different pages, so again would want to specify this figure in the body.

Third point - how would I deal with a number of videos on a page, for instance here?

http://www.rossiterandco.com/CorporateVideoExamplesMarketing.htm

(The first of these is actually a vimeo clip - I got fed up of our embedding his week, and started to experiment.)

Advice much appreciated.

JW Player

User  
0 rated :

Update - in haste I've change the rtmpt code back to rtmp, as I couldn't see any video.

There's a comparison page here: http://www.rossiterandco.com/streamtest.htm
The first is with rtmp, the second with rtmp

On a standard BT Business hub, wired and wireless, I can see the first, but not the second.

Advice, please.... Linda

JW Player

User  
0 rated :


1) SWFObject v1.5 vs. swfobject v2.x:
a) I don't know why Longtail Video hasn't updated to swfobject v2.x,
b) swfobject v2.x has quite a few improvements and is actively being developed,
c) as explained in the links that I posted, loading swfobject v2.x from Google's CDN has advantages (faster load, less traffic) for everyone,
d) ultimately, it's about keeping up to date with improvements in browsers, Flash, players, video encoding, and utilities.

2) The swfobject developers highly recommend that the code be put in the head element of your HTML document, but in cases where this is impossible, you can put the code in the body element.

3) For the possibly blocked ports: Fallback from RTMP on port 1935 to RTMPT on port 80 is internal to the Flash player; no configuration is needed in your player code however, your server has to support RTMPT on port 80.

4) Multiple videos:
a) when it's 2 or 3 videos that are all visible without scrolling, just duplicate the player code with unique attribute names/ids for the player and the containing element the user can pause/stop a running video before starting another or leave both running,
b) when it's many videos, like your CorporateVideoExamplesMarketing.htm, you should use a different technique where a clickable element, usually an image or a screen capture of the player, is placed where each video player will appear. When the user clicks on the image, a player is instantiated and plays the video. When the user clicks on another image, the running player is replaced with the image and another player is instantiated for the next video. This allows for hundreds of players without slowing the browser to a crawl and initial page load is very fast, because no players are instantiated on initial page load. You can see an example here: *http://www.editorschoicemusic.com/index.php/music/cd/ecm001_drama_one*
c) if you would like to use that technique with swfobject v2.2 and the v4.6 JW FLV Player, I can setup a Test Page for you, based upon your CorporateVideoExamplesMarketing.htm page, with a few "video players". Once you see how easy it is to code a link with an image and a file to be played, you can probably do the rest.
A sample from the Editors Choice site:bc.. <td class="mp3_player">
<div id="CD1-player7o" class="player" style="text-align:center">
<img id="CD1-player7" src="http://www.editorschoicemusic.com/photos/btn_play.gif" alt="" width="25" height="20" style="cursor:pointer;" *onClick="loadPlayer('http://www.editorschoicemusic.com/index.php?ACT=37&url=1&linklocker=NzYuMTE5LjQuMjI5MC4zNjQ4MjgwMCAxMjM5NDA0MDQ0', 'CD1-player7')* />
</div>
</td>



The code in bold instantiates a player when the play button image is clicked. There is some extra "garbage" in the URI, because of the CMS and the linklocker, that you can ignore.

The essential point is that a click instantiates a player with a particular media file.

If you need different sizes for the videos, the width & height can be included along with the URI for the media file.

JW Player

User  
0 rated :


I changed the player embedding method in *CorporateVideoExamplesMarketing.htm* to the multiple players method as explained in my post above.

A few notes:

1) only the JW Player videos,

2) something is wrong with the serving of the first video because it shows a #2095 error; check your source,

3) I didn't bother to load your images or CSS, just concentrate on the players, not the appearance of the page,

4) several things were repeated in the head element of your page, you might want to check what you are specifying like styles, the image preloader, you're loading *AC_RunActiveContent.js* twice and you don't need it at all; look at the page source, you can see where I marked the repeated elements, fix that "stuff" and your page will load faster & better,

5) for the image placeholder, you can choose an image (see Glasgow) or a screenshot of the player (see AIG),

6) let a video run to the end and you will see how the player is replaced by the placeholder image; this behavior is optional; you can choose to have the player sit there showing the preview image until the user chooses another video,

7) the JavaScript code for the player and the player's API is all in the body element,

8) all of the code needed is in that page, look at the individual video embedding division elements to see how it is done.

*http://willswonders.myip.org:8074/CorporateVideoExamplesMarketing.html*

JW Player

User  
0 rated :

Hobbs, I really appreciate the time you've taken.

I'll study it before I ask any more questions - except one:

How should I have known to do this? Longtail are offering a player - but is it only really for those with good programming ability?

Thanks, Linda

JW Player

User  
0 rated :


bc.. How should I have known to do this?
That's an easy one *ask*.

Putting a player on a page is relatively easy, for more complex setups, most of it has already been figured out and is available to those who ask.

For example, the EditorsChoice site came about when Forrest was having trouble with 104 players all instantiated on one page. The site took forever and 14 days to load, was sluggish, and didn't work in Firefox, which has a limit of 16 Flash objects.

So he asked if there was a better way and I showed him how to do it. Since he is using a CMS (the "linklocker" thing), it was a bit of a terror to sort it all out, but as you can see, it works well now.

One of the most important points, is that there is *_not even ONE single player_* instantiated when the page loads, ...nada, ...zip. so the page loads fast and is very responsive.

Here's another page I just sorted out for Christos, using the JWBox for multiple players, if you're into Shadow/Lightbox "stuff".

*http://willswonders.myip.org:8074/Christos.html*

JW Player

User  
0 rated :

Ok, I'll ask.

Going back to the basics of putting just one video on a page, bearing in mind that I can't put specific stuff in the header, have I got the code on this page right:

http://www.rossiterandco.com/writenew_video.aspx

Also, should I be putting some of it in the header (the common stuff, like the streamer and the gapro bits?

Thanks, Linda

JW Player

User  
0 rated :


I would put the code to load swfobject v2.x in the head, since it's always going to be the same.bc.. <script src="http://www.google.com/jsapi"></script>

<script>
google.load('swfobject', '2.2');
</script>




The JS for embedding your Flash content can go in the body since it has values, like the files and images, that will be changing. You could break it up, but the crucial line, which begins with "swfobject.embedSWF(..." would still have to be in the body, after you finished defining your file & image flashvars, so you might as well leave it together in the body.

When it's put in the body, the JS for the Flash content must be after the "container" division element, so it is available for swfobject to write the object element into it. swfobject v2.x monitors the DOM loading (essentially the page loading into the browser) and will write the object element into the "container" division at the appropriate time. This is why the developers of swfobject v2.x recomment putting the JS in the head you want swfobject running as early as possible during page load.

So move your "container" div up above the JS code.bc.. *<divid="playercontainer1"class="playercontainer"><aid="player1"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a></div>*

<scripttype="text/javascript">
varflashvars=
{




JW Player

User  
0 rated :

Thanks - I've swapped the code.

Question - in the container I want the name of the video (for spidering purposes).

So I'd like it to appear so that if the video didn't play, it it said

Rossiter & Co testimonial video
Get the flash player to see this video (link)

I can't figure where to put the "Rossiter & Co testimonial video" within this - before the <a it goes to the top, within it, it's part of the link.

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

Many thanks, Linda

JW Player

User  
0 rated :


You can put other HTML elements inside the "container" div.

Like a span or another div. You can style them with CSS if desired.

So something like:bc.. <div id="playercontainer1" class="playercontainer">*<span>Rossiter & Co testimonial video</span>*<a id="player1" class="player" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></div>



JW Player

User  
0 rated :

That's what I tried... but I end up with this:
http://www.rossiterandco.com/writenew_video.aspx

the "Rossiter & Co" bit is at the top of the video, rather than replaced by the video.

Thanks, Linda

JW Player

User  
0 rated :


Sorry, too early not enough coffee!

swfobject will replace the entire HTML element with an id of "player1" with the object element that is used for embedding your Flash content.
bc.. <div id="playercontainer1" class="playercontainer"><span *id="player1" class="player"*>Rossiter & Co testimonial video<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Get the Adobe Flash Player to see this video.</a></span></div>


id & class moved to the span element.

I don't know if you're allowed to wrap an anchor element in a span element might be a big booboo then again, it might be OK (Google says OK, but what do they know?).

JW Player

User  
0 rated :

Brilliant - that's now solved, thank you.

I'm now trying to understand the multiplayer code - I'll be back later!

Thanks, Linda

JW Player

User  
0 rated :

Hobbs, can you tell me why the video in this page works in Chrome, but not in ie?

http://www.rossiterandco.com/VideoProductionIntro.htm

Many thanks, Linda

JW Player

User  
0 rated :


Ha, Ha!

You got caught by the "comma trap".

The flashvars, params, and attributes are arrays of name:value pairs with the comma as the separator character.bc.. var flashvars = {'name':'value', 'name':'value', 'name':'value'};



There should not be a comma as the separator character after the last name:value pair. Chrome & Firefox ignore it, Internet Explorer correctly interprets it as an invalid array.

So just remove the comma after:bc.. 'autostart': 'false'
and all will be well.

JW Player

User  
0 rated :

Genius!

Many thanks... learning as fast as I can!

JW Player

User  
0 rated :

Ok, I've now got a single player running happily (I think) for instance here: http://www.rossiterandco.com/VideoProductionIntro.htm

I've put the code to load swfobject v2.x in the head throughout the site.

I'm now working on getting the pages with more than one video to run correctly.

I've cut it down to 2 videos here: http://www.rossiterandco.com/CorporateVideoExamplesMarketing_new.htm

The gist of it is right, but I have a query...

> These's no play button and mouse over on the original images, so no one would know it was a video. I appreciate that I could put an arrow on the video, but is there a way of getting the play arrow to show so I don't have to adjust all the images?


Many thanks, Linda



JW Player

User  
0 rated :


You are still loading SWFObjet v1.5. Won't really huurt anything, just wasted.bc.. <script type="text/javascript" src="videoplayer/swfobject.js"></script>[/code

You are also loading the very old JavaScript for embedding Flash:<code><script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>


You still have two instances of the MM_ functions. You only need one. The second block of MM_ JavaScript is missing the opening tag.bc.. <script language="JavaScript" type="text/JavaScript">


You have a mistake in the image element. At the end, playerid01 shuld be playerid1 (no zero).

You need to uncomment (remove the double forward slashes - "//") the URL for your player here:bc.. //swfobject.embedSWF('videoplayer/player.swf', playerid, width, height, '9.0.124', false, flashvars, params, attributes);

And comment out or delete the entire swfobject.embedSWF() line for my test player here:bc.. swfobject.embedSWF('player-4.6.526.swf', playerid, width, height, '9.0.124', false, flashvars, params, attributes);


This is exactly what your JW FLV Player code should look like:

Intheheadelement:bc.. <scriptsrc="http://www.google.com/jsapi"></script>

<scripttype="text/javascript">
google.load('swfobject','2.2');
</script>




Inthebodyelement:bc.. <!--inlinescript#1JWFLVPlayerAPI-->
<scripttype="text/javascript">
varplayer=null;
varplaylist=null;


functionplayerReady(obj)
{
player=gid(obj.id);
addListeners();
};


functionaddListeners()
{
playlist=player.getPlaylist();

if((playlist!==null)&&(playlist.length>0))
{
player.addModelListener('STATE','stateMonitor');
}
else
{
setTimeout("addListeners();",100);
}
};


functionstateMonitor(obj)
{
if(obj.newstate=='COMPLETED')
{
if(currentDivContents!='')
{
gid(currentPlayerID+'o').innerHTML=currentDivContents;
}
}
};


functiongid(name)
{
returndocument.getElementById(name);
};
</script>

<!--inlinescript#2JWFLVPlayerembeddingcode-->
<scripttype='text/javascript'>
varcurrentDivContents='';
varcurrentPlayerID='';


functionloadPlayer(videofile,imagefile,width,height,playerid)
{
//...ifaplayerisalreadyloaded,removetheplayerandrestoreit'sdivcontents
if(currentDivContents!='')
{
swfobject.removeSWF('playerID');
gid(currentPlayerID+'o').innerHTML=currentDivContents;
}

//...savecurrentdivcontents
currentDivContents=eval(document.getElementById(playerid+'o')).innerHTML;

//...savecurrentplayerid
currentPlayerID=playerid;

varflashvars=
{
'streamer':'rtmpt://draco.streamingwizard.com:80/streamingvideo123/',
'file':encodeURIComponent(videofile),
'type':'rtmp',
'image':encodeURIComponent(imagefile),
'plugins':'gapro-1',
'gapro.accountid':'UA-229582-1',
'gapro.trackstarts':'true',
'gapro.trackpercentage':'true',
'gapro.tracktime':'true',
'backcolor':'333333',
'frontcolor':'CCCCCC',
'lightcolor':'62A9F0',
'screencolor':'FFFFFF',
'id':'playerID',
'autostart':'true'
};

varparams=
{
'allowscriptaccess':'always',
'allowfullscreen':'false'
};

varattributes=
{
'id':'playerID',
'name':'playerID'
};

swfobject.embedSWF('videoplayer/player.swf',playerid,width,height,'9.0.124',false,flashvars,params,attributes);
};
</script>




Inthebodyelement,whereyouwanteachvideotoappear:bc.. <tdcolspan="4">
<!--<divid="player1">Carillion</div>-->
<divid="playerid1o"style="width:400px;height:244px;">
<imgid="playerid1"src="videoplayer/images/AFC_long.jpg"width="400"height="244"onclick="loadPlayer('popup/AFC_long.flv','videoplayer/images/AFC_long.jpg',400,244,'playerid1');">
</div>
</td>

<tdwidth="240">
<!--<divid="player10">thecoachholiday.comPromotionalVideo</div>-->
<divid="playerid10o"style="width:240px;height:156px;">
<imgid="playerid10"src="videoplayer/images/coach_small.jpg"width="240"height="156"onclick="loadPlayer('popup/coach.flv','videoplayer/images/coach_small.jpg',240,156,'playerid10');">
</div>
</td>




Running here: *http://willswonders.myip.org:8074/Rossiter-4.html*

I removed all of the extraneous code, alerts, instrumentation, testing, blah, blah, blah...

JW Player

User  
0 rated :

Your help is invaluable... I do really appreciate your time.

I've made the changes here: http://www.rossiterandco.com/CorporateVideoExamplesMarketing_new.htm

> I'll get rid of the v1.5 code in the header once I get all the pages running on the new code (I'll have 30 pages to fix once I'm happy what I'm doing is right)

> I don't know what the old AC_RunActiveContent code is doing - so I'll leave that for stage 2 as I don't want to break something else.

> I fixed the other comments.

I took your play button code from http://willswonders.myip.org:8074/Rossiter-4.html.

I put the style into my stylesheet.

I notice that, while it looks perfect in ie, the play button is on the left in Chrome.

Before I start duplicating this code everywhere, could you

> Take one last look

> Get the play button in the middle in Chrome?

Thank you, thank you....

JW Player

User  
0 rated :


You can't imagine how hard it was to get that play button displayed and centered in IE & FF!

But it was worth it, because now I can use it with JW Box.

*http://willswonders.myip.org:8074/Simple_JWBox.html*

There's a slightly nicer Play Button here:

*http://willswonders.myip.org:8074/videoplayer/images/PlayButtonSquare70.png*

I don't have Chrome available for testing, but I'll try to install it on some remote system so I can check the horizontal centering. Luckily, horizontal centering is *_MUCH_* easier than vertical centering, especially with overlaid images.

Later...

OK, this seems to work in IE, FF, & GC.

*http://willswonders.myip.org:8074/Rossiter-4.html*

WOW! What a black art worse than Flash. Just one line in the CSS:bc.. img.play
{
position:absolute;
top:50%;
margin-top:-30px;/*1/2image+10pxforcontrolbar*/
margin-left:-20px;/*1/2image*/
*left:50%;*
z-index:100;
}




Please test it for me.

JW Player

User  
0 rated :

Brilliant! Works for me in Chrome here:

http://www.rossiterandco.com/CorporateVideoExamplesMarketing_new.htm

Ok, I have to get on and implement all the code for both single and multiple players throught my site.

I do have a new question, but I'm going to start a new thread before this one gets wrecked. It's in General Chat.

Do please take a look!

Many thanks, Linda

JW Player

User  
0 rated :

I tried to copy the v2.2 style code you mentioned. But, the player doesn't show on the webpage.
Here is the code I'm using:

<script src="http://www.google.com/jsapi"></script>

<script>
google.load('swfobject', '2.2');
</script>


<script type="text/javascript">
var flashvars =
{
file: 'http://changeleadershipgroup.com/videos/Race4.flv',
image:'http://changeleadershipgroup.com/videos/Race4.jpg'
};

var params =
{
allowfullscreen: 'true',
allowscriptaccess: 'always'
};

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

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

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

Also, I have the following embed code working, but it has two problems: a) the preview image doesn't display, b) the player is blocking the navigation.

src="http://changeleadershipgroup.com/video/player.swf"
width="580"
height="200"
bgcolor='undefined'
allowscriptaccess="always"
allowfullscreen="true"
flashvars="duration=31&file=Race4.flv&image=Race4.jpg&controlbar=over"

Can you help me?

JW Player

User  
0 rated :

Never mind.
I used SWFObject 1.5 and the code generated by the wizard and it worked perfectly!!

This question has received the maximum number of answers.