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

Sound, but no Video


This is a major bug, around 10-20% of the time this happens, I've had reports from loads of visitors to my sites and I also get the problem on my PC's
I'm using SWFObject 1.5 and the newest player (v.3.7).

However, I had a thoery it's the JavaScript rendering time being the issue, so tried a couple of things out and here's how I fixed it:

Instead of the line:
s1.write("video")

I'm using this:
setTimeout("s1.write('video');",1)

This adds a 1 millisecond delay before the browser writes the player into the page, and it works everytime for me (it's not failed once yet).
Have tested in IE6, IE7 and Firefox 2.0.
Not had time to confirm if Mac Firefox & Safari are OK, but I don't see why not.

PS Note the mix of double & single quotations in that line, make sure you do the same.

If anyone else tries this method of mine, please let us all know how you get on.

54 Community Answers

JW Player

User  
0 rated :

@Exo - thats a really ingeneous fix, good thinking, that should be the standard implementation now...

JeroenW

JW Player Support Agent  
0 rated :

I’ll add this to the default setup of the players. It’s indeed a handy fix!

JW Player

User  
0 rated :

@Exo, JeroenW et al - please note: for the fix to work for me on win xp IE7 and FF2 i have to use ony one set of quotes: setTimeout(s1.write("player1"), 1);

JeroenW

JW Player Support Agent  
0 rated :

Hmm, that’s not too handy. Different quotations on different browsers. I’ll do some tests first with different setups.

JW Player

User  
0 rated :

horrible

JW Player

User  
0 rated :

I was running into some very weird occurrences with UFO and 2 MonoSlideshows on the same page. After a full day of trying any solution I could think of (server side, MIME Types, SSL, mod_rewrite, etc, etc, etc) I thought to look at the way the JavaScript was loaded.

UFO does not *require* a onload/domready system event to replace with the Flash object, it does it on-the-fly...it turns out that replacing two containers with the same Monoslideshow Flash object at the same time (which then loaded separate XML files, which then each loaded a series of JPG image files) was somehow conflicting, preventing the .SWF from ever loading at all. I was left two empty containers (resized per width/height attributes in UFO declaration) but the Flash never loaded.

The solution ended up being *delaying* the Flash load/replacement.

Of course, the problem more than likely is not UFO, rather the mash-up/implementation of UFO, MonoSlideShow, and sIFR, etc.


So -- here is the catch:

For my implementation to work, I obviously need to delay the UFO.create() method. However, this results in an unsightly flicker of the fall back content area (The text that is replaced by the Flash). This is undesirable.

So, I wonder, is there any methods within UFO to delay the actual Flash replacement, but AFTER the container itself is resized?

It would be so great if I could define a delay in milliseconds via UFO. Then, UFO would resize the content and empty the fall back text prior to actually loading the Flash itself. Then, upon meeting the delay criteria, load the Flash via innerText/innerHTML...

This feature could open up some doors for advanced functionality for various developers.

Let me know your thoughts/ideas!

Thanks,

Mike

JW Player

User  
0 rated :

I had the same problem with the internet explorer, no picture but the sound was running. I changed a lot of things, tried swfobject embedding instead of the ufo, but nothing helped. Even tried the js setTimeout. Did not really help, till I found out that the js-code from Openads for the banner rotation was influencing the ufo-code somehow. So I changed the implementation of the banners and it works now. So maybe you just have to go through your code and check where other js-code could interfere your ufo or swfobject.

JW Player

User  
0 rated :

Has there been a concrete fix to this yet?!
I've received yet another email this morning stating that the player will only load the audio, not the video. :s

Have received several emails from visitors experiencing the same problem.

Please help! Thanks!

JW Player

User  
0 rated :

@Jeff
please post a link to your page - else people here can guess forever what might be the problem!

some guesses:
you need to set width and height.
you dont use a function, but have the player created inline, and see a timing problem.
you have other scripts on the page containing write commands that will erase the memory, preventing proper creation of the player.

JW Player

User  
0 rated :

Hi Andersen, thanks for the response.

Here's a link to the player:

[url=http://www.electricfireplacesdirect.com/]Click here[/url] and open the player from the right column.

What puzzles me is the 5,800+ hits on that page but only a small handful are having problems. I thought maybe those having problems should update their plugins. /shrug

Who knows? I'll leave it in the hands of more capable experts! ;)

Thanks in advance
Jeff

JW Player

User  
0 rated :

@Jeff
well, im in the small handfull- i was not able to make the player show in my otherwise trusty IE7 but it played fine in FF2 -both flash9

i would suggest to [url=http://www.jeroenwijering.com/upload/jw_media_player.zip]update[/url] the player, you are using v.3.5 - current is v.3.99
now adays JeroenW recommend using the swfobject.js rather than the ufo.js
its somewhat more handy, easy to maintain and quite stable.
there have been numerous changes/bugfixes made since, so that alone might fix the problem.
due the changes you will want to read the [url=http://www.jeroenwijering.com/extras/readme.html]readme[/url] again and have a look on the demo in the download.

you have placed the script in the head, which is fine but not wrapped in a function, which might be the cause, due the timing risc mentioned.

please have a good look on the source of the [url=http://www.jeroenwijering.com/extras/readme.html]demos[/url] - look for the createPlayer() functions
and i just have to point you to this in particular: [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/fireplace.htm]fireplace[/url] ;)

i should mention that in IE7 your front page consistantly gives the error:
" unterminated string in line 15"

let us hear how you progress - good luck

JW Player

User  
0 rated :

I didn't think that the players before v3.7 even responded to JavaScript. I'm amazed that it works at all. Yeah, and same thing here, audio, no video.

I get an error "Object expected" on line 598
bc.. <script language="JavaScript">Testimonial();</script>



I also get an error "" on line 15 of "testimonials.js"
bc.. tests[9] = ""Hello Miss Leah :-)<br>
I received my order today and it looks great in my piano room. It is 90 degrees over here in NY, but what the heck...I like fireplaces! Of course, I had the heater off. The delivery service was great, the order was delivered quickly as promised, and I was able to track the delivery. I will definitely recommend your products and services to my friends. I will be ordering another fireplace soon!<br><br>Thanks again!"<br><br>- Ray Nieves";


because the line is broken by a CRLF and JS thinks that it isn't properly terminated.

JW Player

User  
0 rated :

I'm having a similar no video - only sound problem. But hereit only occurs on MAC both Firefox / safari / ... . FF and IE on Windows don't seem to have the problem.

The site I'm working on is a Plone site, we pimped the default ATVideo product a bit to make it play FLV via SWFObject (we send the flv URL to a swf container via Flashvars).

That method is working perfectly, but only on MAC (Flash version 7.0) we're having some probs. That is that the video isn't showing, we only have sound.

I tried to add "so.addVariable("overstretch","fit");" But that didn't help.

Anybody with some good advice for me?
Probably the problem is solved after an update to flash 9.0, but I guess our customer won't like that solution :)

Thanks.

JW Player

User  
0 rated :

@cubus - if you are wondering why advise you find here doesnt work, it could be because this site is all about the [url=http://www.jeroenwijering.com/?item=JW_Media_Player]JW players[/url] - you should take your questions to [url=http://plone.org/products/plonemultimedia]plone.org[/url] there the chance of relevant assistance will be better ;)

JW Player

User  
0 rated :

@andersen - I don't think it really is a plone problem, more a problem of the combination of SWFObject - flv and flash7.0.

And I was just hoping someone here had encountered the same situation, with a JW player or not :)

But I do have to give those JW players a closer look. They look interesting.

JW Player

User  
0 rated :

@cubus
in the thousands of postings here i have only seen a genuine problem with swfobject once or twice, and even then it could be attributed to interactions with other scripts on the page!

but there are scores of postings on problems with various cms, mainly because people lose control of whats going on when using them.

so guessing by the experience from this forum and your description of the problem, i would stick to the explanation: its probably due to some quirk of plone, an interaction with other scripts or the stylesheets.
(this can be deduced from the fact that you have seen your player work on some machines!)

had you been using one of the JW players the advice would have been: make a simple test page with only the player embedded with the swfobject, that will settle the question...

JW Player

User  
0 rated :

I am trying out the jw player on a site I am developing and just upgraded from 3.7 to 3.99 ...

My problem is this. I have a database driven site that has the same issue only in IE ....

When i watch a video say the first time it plays fine, if I hit the back button or my "edit search" button on the site to get the list of results then when i go back to watch that same video again or another video then i get the sound no video issue ....

when i was using 3.7 i would get no video at all, now that i have upgraded i get a small section of video and a messed up control bar ...

any ideas on what might be the problem ?

JW Player

User  
0 rated :

@Jonathan
a link to you page would make it easier to say -

are you using the swfobject.js for the embedding?
have you set the width and height flashvars?
are using a playlist? (below or to the right?)
do you have other scripts on the page?
are you creating the player inline or using a function in the head?

please see the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/minimal_but_safe.htm]minimal_but_safe[/url] demo on the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/]demopage[/url] for an example...

JW Player

User  
0 rated :

Not sure that you will see the error right off but if you play around some and maybe check out some other videos you should see the issue i am having ....

let me know if you are unable because since i have been home working on this i havent seen the problem until just now when i went to the site to paste in the link

JW Player

User  
0 rated :

@Jonathan,

One thing you should definitely do, because it usually solves this issue, it to add these two flashvars to your JavaScript code.
bc.. s1.addVariable("width","450");
s1.addVariable("height","254");



Also, it's best to put the player code into a function in the <head> of the page and start it with a <body onload...

In the <head>
bc.. <script type="text/javascript">
function createPlayer()
{
var s1 = new SWFObject("flvplayer.swf","single","450","254","8");
s1.addParam("allowfullscreen","false");
s1.addVariable("file","videos/1145KnightsBridgeLane.flv");
s1.addVariable("width","450");
s1.addVariable("height","254");
s1.addVariable("overstretch","true");
s1.addVariable("showdigits","true");
s1.addVariable("autostart","true");
s1.addVariable("bufferlength","5");
//setTimeout("s1.write('35');",10)
s1.write("35");
}
</script>



Replace your <body> element with this:
bc.. <body bgcolor="#6C6553" onload="javascript:createPlayer">


And you shouldn't need the timeout anymore.

JW Player

User  
0 rated :

@Jonathan,

This will work better:
bc.. <body bgcolor="#6C6553" onload="javascript:createPlayer()">


JW Player

User  
0 rated :

looks great .... after reading this post i forgot about trying the info in a function as well as the variable width and height ... I will go ahead and update my code ... I appreciate all of your help ...

JW Player

User  
0 rated :

I have the same problem of "sound but no video" in my FLVs, but not only in the jeroen player. I used flash 8 to "import video" and create 3 FLVs - 1 from a quicktime file, one from an avi, one from a wmv, both of which I made from a DVD using iSofter DVDPlatinum. The quicktime FLV played normally in the jeroen player, but both the avi and wmv FLVs had sound but no video. But I had the same problem when I exported an swf from the fla file - sound, no video.

JW Player

User  
0 rated :

aah... further to, I converted the dvd file to mp4 and the FLV is perfect - sound AND vision. Only thing is, the file is only 1 minute long, like the quicktime file (see above) that also has no problem. The wmv and avi were 20 minutes. So before I get too satisfied, will have to produce a 20 minute mp4 to see whether the length of the clip somehow influences the conversion (i.e drops the video).

JW Player

User  
0 rated :

The conversion of a 120 MB mp4 file to FLV went very well. Used default encoding for flash player 8, medium quality - codec On2 VP6, video 400 kbps, audio 96 kbps (stereo). FLV size , 71 MB. Interestingly, mp4 is not among Flash 8's default "video formats" when you go looking for your mp4 file. You need to view "all files" to find it. Dramatic quality difference between the conversion for flash player 7 and 8 (latter much better).

So, presumably, my particular problem with sound-but-no-picture was due to some bug in the encoding of the source files (avi and wmv) to flv. Both source files were OK when played with Windows Media Player.

JW Player

User  
0 rated :

@GTT,

Did the FLV files encoded with the On2 codec play through to the very end?

Many users have been having trouble with their FLV files not playing the last second or so, and then not advancing to the next item on the playlist.

JW Player

User  
0 rated :

Will. I was so happy to get sound that I didn't play the file to the end - but yes, there was a couple of seconds of white space at the end. But tolerable for my use.

JW Player

User  
0 rated :

PS... just got an avi file (produced with Windows Movie Maker) to convert with sound, so maybe my problems with avi were due to a) iSofter DVD Ripper's conversion from DVD or b) I haven't got my settings right in Flash 8 yet.

JW Player

User  
0 rated :

@GTT,

Thanks for the info. Please keep us updated. Many users would greatly appreciate knowing the specific settings that you use, once you get it working well. :)

JW Player

User  
0 rated :

I had same problems, but using Will's method above fixed it. Thanks Will!

Here is the code I used:

bc.. <head>
<script type="text/javascript" src="swf/swfobject.js"></script>
</head>
<body onload="javascript:createPlayer()">


bc.. <div id="player1"><p><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>

<script type="text/javascript">
function createPlayer()
{
var s1 = new SWFObject("swf/flvplayer.swf","player","400","319","8");
s1.addParam("allowfullscreen","false");
s1.addVariable("file","bush.flv");
s1.addVariable("width","400");
s1.addVariable("height","319");
s1.addVariable("image","images/bush.jpg");
s1.addVariable("displayheight","300");
s1.addVariable("overstretch","true");
s1.addVariable("showdigits","true");
s1.addVariable("autostart","false");
s1.addVariable("bufferlength","5");
//setTimeout("s1.write('35');",10)
s1.write("player1");
}
</script>

</div>


Damn Internet Explorer! It worked in Firefox every time before!

JW Player

User  
0 rated :

Hi Friends

I have a similar issue over the internet when using IE- 7?I have vista premium when I open a website the video does not come but open a website the video does not come but only the audio is played.

But the player on the website is windows media player 11?it buffers fully but there is no video the same website on my friends system works perfectly fine who has the same model laptop and the operating system.

I have checked almost all the settings under IE.

But when I open youtube.com all the flashplayer websites work fine.

Any advice will be appreciate?

JW Player

User  
0 rated :

The website that I am trying to get the video is

http://www.ibnlive.com/videos/video_streaming.php

JW Player

User  
0 rated :

I have read through most of the posts and happy to see I am not the only person having this problem. I also can only hear audio and see no video when playing off a website.

I seem to be able to view the videos fine on a Mac, but not on my PC at home. I have updated Flash Player (as well as uninstalled it and reinstalled), and have IE 6.0 on a Windows XP.

Here is a link to the website that I cannot view video on (can only hear the audio) - http://www.winnipegsun.com/Video/home.html

Any input/advice would be welcomed! Thanks.

JW Player

User  
0 rated :

I found this thread after experiencing the same problems with other SWFs. There are a lot of posts here, and a lot of theories and workarounds, but I don't think anyone nailed it on the head.

The problem is in the timing of Internet Explorer rendering a SWF. IE isn't very efficient at laying out a page, and will render a page and adjust it many times as new pieces arrive while loading. All browsers do this, but I've found IE to be the worst. Now, if the SWF is already cached by the browser, then it can be created as the HTML page is initially rendered. I've seen IE often render a SWF with a 0 pixel stage size .. that is 0px wide by 0px tall. Shortly after being created, its size will be adjusted, let's say to 400px wide by 300px tall (and multiple adjustments are possible too). Depending on how the SWFs are coded, this can lead to an invisible stage that still plays a video. The illusion is 'sound only' - but the cause is that the stage is simply 0px and too small to see.

That's why adding a slight delay to the SWF will help, and why appending an HTTP GET param (to force a reload of the SWF, thereby adding a delay) also works. But the true fix is to code the SWF so it handles this problem. If your SWF uses its initial stage size to layout elements inside itself, the sure fix is to have it handle when the stage size changes. Adding a sufficient delay within the SWF such that it'll ignore the initial 0px stage size would work too. But that delay may have to be quite long to factor slow machines and slow connections (i.e. slow page loads).

I hope that helps.

JW Player

User  
0 rated :

@Suki - objects and scripts should be created/executed onload anyhow - that is after all elements have have been processed
to avoid best as possiible the resizing of elements, one can give all elements their proper size in the css -
please see the source of the "minimal but safe" demo on the demopage for example code:
http://home5.inet.tele.dk/nyboe/flash/mediaplayer/minimal_but_safe.htm
http://home5.inet.tele.dk/nyboe/flash/mediaplayer

JW Player

User  
0 rated :

I've got the same audio but no video problem - but using a Mac with Safari version 2.0.2. I'm not sure if it is because this is a really old version or something - I got my mac a few years ago.

I've been working on versions of the brilliant http://home5.inet.tele.dk/nyboe/flash/mediaplayer/minimal_but_safe.htm and have come up with two versions. One using the video that I'm using at work and one using the video in one of the examples. The video from one of the examples works and the one from work doesn't - could it be in the video settings?

[http://www.e-clea.com/fred3.html] and [http://www.e-clea.com/fred5.html]. It works find on firefox and on IE.

If anyone has any ideas I'd be very grateful.

JW Player

User  
0 rated :

Hello all,

does anyone still have this problem with the 4.1.56 version ? Because I do.

When I refresh with F5 I can the first image of the video , then black screen but sound still continue...

I have tryed all tips on this page without luck.


regards,
oliver

JW Player

User  
0 rated :

same problem.. no video sometimes.

JW Player

User  
0 rated :

Over a year after this thread began, and this problem still exists :-(

I get it regularly (with the latest release of JWplayer and SWFobject), in this pattern:

first load - fine
second load - audio only

it does appear from my poking around that there is a caching issue involved...

any more ideas, folks?

JW Player

User  
0 rated :

Hi Folks !

My problem looks quite the same with JW-Player 4.3.

The video works fine with "autostart" set to "false" but when I set it to "true" I can only hear the sound in the first run of the video in IE7 and IE6. Then I get the image too.

It works perfectly well in firefox.

Here is the code I use :
bc.. <div id="flash-video">
Ce texte sera remplac par votre swf.
</div>
<script type="text/javascript">

var so = new SWFObject("squelettes-public/flv-player/jw-player.swf", "mymovie", 320, 240, 9, "#336699");
so.addVariable("file", "[(#URL_DOCUMENT|url_absolue|replace{:,%3A})]");
so.addVariable("width", "320");
so.addVariable("height", "240");
so.addVariable("autostart", "true");
so.addVariable("displayheight", "240");
so.addVariable("repeat", "always");
so.addVariable("controlbar", "none");
so.addVariable("bufferlength", "1");


so.write("flash-video");

</script>



Any help ?

JW Player

User  
0 rated :

Have just run into this problem as well. The only way I can seem to make the videos autoplay consistantly is by not setting the controlbar setting so the controlbar is fixed at the bottom rather than 'over' or 'none'. Both other settings give me sound but no video in IE constantly.


Any thoughts?

JW Player

User  
0 rated :

Another victim of this issue... and since the change in 4.3 to requiring a duration in XML playlists, I can't upgrade, either. >.<

JW Player

User  
0 rated :

Yep, same here with width and height set and version 4.3.132 w/SWFObject...

JW Player

User  
0 rated :

I'm experiencing the same as everyone here.

I've tried the

bc.. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="Expires" CONTENT="Mon, 04 Dec 1999 21:29:02 GMT">


to prevent IE from caching, but that doesn't help.

JW Player

User  
0 rated :

run into the same and solved it this way:

on frame 2 i placed:
// fix BrowserCache-Problem
if( Stage.width==0 || Stage.height==0 ){ gotoAndPlay(1); }

everything else i'm handling on frame 3 an further.

with that flash some time later has width and heigth and i can go on.
works fine for me an my needs

JW Player

User  
0 rated :

Same problem, I solved like this: for IExplorer I removed the autostart the add a setTimeout for the function mediaplayer.sendEvent('PLAY') so it makes a "manual play"

In php:
bc.. <?php if(!preg_match('/msie/', strtolower($_SERVER['HTTP_USER_AGENT']))){ ?>
s1.addVariable("autostart","true");
<?php }else{ ?>
setTimeout("mediaplayer.sendEvent('PLAY')",100);
<?php } ?>



so it finally works!

Hope it helps.

JW Player

User  
0 rated :

Alessandro
Can you show how you implement the code above. I tried several things but I'm relativly new in this anyway. Here is my page bellow. I had to set the player not to start automaticly just to avoid this problem, but it would be ideal if i can set the player on autostart.
http://exyuvideo.com/
I do not know which part of the code to replace so please help
thanks

JW Player

User  
0 rated :

Hi,
as I suppose you have problem expecially with explorer, because of that i write php code for fix only when is iexplorer.
Anyway to fix the problem you have to set it no autostart:
bc.. s1.addVariable("autostart","false");

and then, at the end, put a js settimeout to make it play:
bc.. setTimeout("mediaplayer.sendEvent('PLAY')",500);

and it works!
hope this helps

PS: good site, if you need a real webtv try http://www.glomera.com

JW Player

User  
0 rated :

First time play any video in the list from xml. No video, only sound. Stop it and play again. then it is fine. This only happens in ie, works fine in FF.

How do I setTimeout? Because the following will get the error message 'theItem' is undefined.
setTimeout("player.sendEvent('ITEM', theItem);",500);

Here is my code, any help is appreciated:
function createPlayer() {
var flashvars = {
file:"chapters.xml",
streamscript:"lighttpd",
autostart:"false",
fullscreen:"true"
}

var parameters = {
allowfullscreen:"true",
allowscriptaccess:"always"
}

var attributes = {
id:"player1",
name:"player1"
}

swfobject.embedSWF("player.swf",
"placeholder1",
"100%", "100%",
"9.0.115",
false,
flashvars, parameters, attributes);
}


function play(theItem) {
var tmp=document.getElementById('wrapper');
if (tmp) {
tmp.style.width = 100+"%";
tmp.style.height = 100+"%";
}
if (player) {
player.sendEvent('ITEM', theItem);
}

JW Player

User  
0 rated :

My last solution is the following.
Just put in your js code this function:

bc.. function playerReady(obj) {
mediaplayer = document.getElementById(obj['id']);
if(mediaplayer.getConfig().state!="BUFFERING")
setTimeout("mediaplayer.sendEvent('PLAY');", 500);
}
};


It's automatically called by the player when it's loaded and if it's not buffering yet it set a timeout to make ti start

JW Player

User  
0 rated :


Try this: HD/Apps/QuickTime/Get Info/Idioms and unmark "Portugues" and "Portugues (Portugal)". This is a bug due to idioms between Safari and Quick Time. If it doesn't work, do the same to Safari, it will work.

Regards,

Igor Saraiva

JW Player

User  
0 rated :

Video Acceleration could be the problem.

I had the same problem. Both IE 6 and Mozilla firefox were not able to stream videos. I was getting only audio but no video.

Do the following

Start -> all programs -> window medial player -> tools -> options -> performance

Take the video acceleration button to zero.


JW Player

User  
0 rated :

[url=http://www.newhome.tv/newhometour/video.php?vidid=35]Click Here[/url] for a link..

You can click on the main header to go to the index page as not all homes have a video as of yet ...

this site isnt "public" yet, and wont be for a couple more weeks and i have all the videos

JW Player

User  
0 rated :

bc.. <divid="flash-video">
<aid="player"class="player"href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">GettheAdobeFlashPlayertoseethisvideo.</a>
</div>

<scripttype="text/javascript">
varso=newSWFObject('squelettes-public/flv-player/jw-player.swf','mymovie','320','240','9.0.124','#336699');
so.addParam('allowscriptaccess','always');
so.addVariable('file','[(#URL_DOCUMENT|url_absolue|replace{:,%3A})]');
so.addVariable('autostart','true');
so.addVariable('repeat','always');
so.addVariable('controlbar','none');
so.addVariable('bufferlength','1');
so.write('flash-video');
</script>



Upgrade to v4.3.132 if you are not already using that version.

This question has received the maximum number of answers.