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

h264 mp4 plays fine in browsers, but plain blackscreen in iPad and iPhone


I am trying to get my video to play in ipad etc as well as to play in browsers. It is working fine in the browsers, but although the player window appears on my iPad 1 and iPhone4 screens when I tried, the video does not play. There is no sign of anything, just the black, blank rectangle. The video controls don't appear either.

I encoded it to H.264 in ffmpegx from a .mov, and the specs of that file type are: "mencoder h264, 1280x720, 3236 kbps, 29.97 fps, no crop". The file extension ends up as .ff.mp4

Here is the draft page I am trying to get it to work on:
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois3.html

I am trying the embedding code that I got from this site under the html5 discussion - any ideas as to what is wrong?

I can't find this info in the support materials provided, or I am not understanding what I have found.

Thanks so much for your help.

47 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

If you use this sample video, does it work – http://www.longtailvideo.com/jw/upload/bunny.mp4

We encoded it in HandBrake – http://handbrake.fr/

JW Player

User  
0 rated :

Yes. That one plays. I will get handbrake and try it. Thank you.

I assume the code looks okay otherwise?

Another question, please:

Assuming I can get this working, will it work to add the variables I got from your wizard before I realized that method did not work at all with iDevices (the player did not even appear)? i.e.:

bc.. <div id='mediaspace'>Flash player required.</div>

<script type='text/javascript'>
var so = new SWFObject('http://www.onesourcegraphics.com/jwplayer/player.swf','mpl','720','480','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('author','RT, TG4. Sen Mac an tSithigh');
so.addVariable('description','Bualeann Sen Mac an tSithigh le Nikki Ragsdale, bean ildnach chsta California. Sen Mac an tSithigh meets Nikki Ragsdale, a woman of many talents from the California coast. This documentary aired on TG4 in Ireland, 04.04.2010');
so.addVariable('duration','about half an hour');
so.addVariable('file','http://www.onesourcegraphics.com/video/Rock_Chick_an_tSean-Nos.ff.mp4');
so.addVariable('title','Rock Chick an tSean-Nis');
so.write('mediaspace');
</script>



If the extra variables above are encoded in the manner of the javascript that is in the Longtail snippet for html5 I am using in my example page, will that be okay? I thought it would, since it says in the support pages that the player is customizable.

thanks again.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, your code looks fine, and yes it will be okay.

JW Player

User  
0 rated :

Thanks, Ethan!

Well, I got handbrake and have finally got at least a partial success, after trying a number of encodings.

I searched the site at handbrake as well as here for clues when trying things out. I did find a note from you to another user saying this:
"When encoding - Please make sure you are using H.264 Baseline Profile Level 3.0 or lower with no more than three reference frames, AAC Low Complexity Profile, and an MP4 container if you want to support older iProducts. The "Normal" profile in Handbrake doesn't use Baseline Profile H.264 so the older devices can't decode it. Use the iPod or iPhone presets in Handbrake and they will work fine in Flash as well!"

Handbrake 9.5 has iPad and iPhone4 settings, which look identical to me, so I used the iPad one. I changed the extension to .mp4 from the automatic .m4V (I read in the info somewhere that was okay).

Anyhow -- I finally got a file that works perfectly in ipad but now downloads whole thing in all the browsers before playing. That takes about 12 minutes on this Mac... Uuurrrgh. :-)

I found another note from you to a user having a similar problem and you said "I don't have the exact settings, but please make sure to have "web optimized" checked."

I see the ipad preset has "large file" checked.

It is possible to check more than one!
Do you know if I check "web optimized", should I uncheck "large file" -- that might be obvious to some, but I can think of ways a large file could still be web optimized. I don't want to lose something if I should leave that checked. I hope you don't mind my "dumb question" --- Do I check web optimized by itself?

And do you think this web optimization option might be the thing that will fix this? I surely hope so, as that would mean I am nearly there!

Thanks so very much for your help.

Oh, and here is the file that uses the video about which I speak:
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois5.html



Ethan Feldman

JW Player Support Agent  
0 rated :

You need to check off “web optimized” if you want it to be able to play back before it downloads the file fully…so try it!

JW Player

User  
1 rated :

Thank you! While waiting hear, I did start fiddling with it. :-D

I was just about to write again and say I tried it... the version with only web optimize checked came out a tad bit smaller (about 60mb smaller), and it did Work!!! Woot! Thanks! :-)

Hoping to find a way to get a yet smaller file, I also tried using a .mov as the source and got a file that about 100mb smaller than the one without web optimization and that also worked, but I preferred the picture quality of the larger web quality one (which I had taken directly from the DVD).

The web optimized one I prefer is more than 303 mb on the server -- compared to about 164 for the flv with which I started... but the trade off is that it will work on both the computers and the idevices, so there we go... at the moment it also works in both Snow Leopard and Tiger; no farther back, but that's to be expected.

One last thing is to update that javascript to hold the other variables, and then it will be working the way I hoped...

Thanks a million for your help.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np! :-)

JW Player

User  
0 rated :

Hi, again, Ethan!

Am having a little trouble with updating the player js to include the variables from the one generated by your wizard, as discussed above (a couple of posts above this). You said it would work, above.

Can you point us to an API that shows it, if there is one? My javascript person says it seems not to be possible... but I think she was looking at an older api. She asked if there is another one.

She thinks the only one of the variables in question that can go it there is duration. But as well as duration I would like to add title, author and description from the Wizard version...

Which api applies? And can the variables truly be added?

I just went ahead and bought my license but have held off making this live because I'd like the information to be included with the video. (the live one at the moment is the flv only version I did at first with the wizard)

The script with the variables is in my post above, this is the one I am using that works in ipad, for your convenience:

bc.. <div id="container">Loading the player ...</div>

<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "http://www.onesourcegraphics.com/jwplayer/player.swf",
file: "http://www.onesourcegraphics.com/video/Rock_Chick_an_tSean-Nos.mp4",
height: 480,
width: 720
});
</script>






Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, here is the API:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference

JW Player

User  
0 rated :

Hi, Ethan.

Well, we had a go at adding the variables. Here is the MP4/html5 version of the player on my draft page
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois5.html

The player still works in that the video still plays in browsers and iDevices, but the variables do not show up as far as I can see.

The thing is, I don't know if it is my code in the draft above that isn't right, or something else is going on.

I say that because the second thing I changed is that I uploaded my newly purchased licensed version of the 5.5 player to the server, and as soon as I did that the variables stopped showing up in the flv version, too!

Immediately before that it was working. If I played the video to the end or stopped it at any point, a black window with tabs would pop up containing the info. This window could be closed by clicking an 'x' at the top left after reading the info, and one could continue with or replay the video.

Now, that info window no longer comes up at all. :-(
Here is the url to my flv version with the player done by the wizard:
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois.html

Has the ability to show the info been taken away? This makes me want to re-upload the old, free version of JW Player that I had! :-)

Or is something else going on? Any suggestions or help?

Thank you,
Nikki

Ethan Feldman

JW Player Support Agent  
0 rated :

@Nikki – Those variables only show up if you are using a playlist. They never showed up for just a regular video itself.

Can you show me where they are showing up..?

JW Player

User  
0 rated :

Hi Ethan.

They did used to show up on my flv version, before I uploaded the licensed version of my player.

I described above how they showed up... in a black window with tabs that popped up when the video was finished playing or if you stopped the video.

I think I will re-upload my previous version of the player (the one that put the watermark on), and see if it goes back to what it was.

I will let you know when that is done.

I did not expect that to happen on the iDevices, but hoped the same thing would at least continue to happen in browsers, but as I said, now that is not even happening in the flv version now. The code is the same (generated by the Wizard) -- the only thing I did was upload the licensed player that I bought.

JW Player

User  
0 rated :

Okay!

I put the old player back on my server and the info is there on both the flv version and teh html5 version.

(I forgot to mention, what made me hope it would work if I put the variables in the html5 one was that that same black window had appeared, but the info tab was devoid of info, whereas in the Widard flv one the info I had entered was there...)

It appears if you play to the end, and also if you pause the playback. In addition to the info window, there are a 'share' tab and a tab with embedding code. My info that I added is in the info tab. Check it out...

Here is the html5 one -
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois.html

Here is the Wizard generated flv one -
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois.html

This is not available in either version in my licensed JW Player.

Ethan Feldman

JW Player Support Agent  
0 rated :

The issue is that you are playing an flv file without metadata. Use this application to fix – http://www.buraks.com/flvmdi/

Also, the share menu is because when you downloaded the player from our site, you left the check box marked off that said “Include the Viral Plugin”. Uncheck it to remove this.

Now, if you want HTML5 support (aka iPads and iPhones), you cannot use FLV, as FLV only works in Flash.

More information:

http://www.longtailvideo.com/support/blog/15095/jw-player-53-html5-and-you
http://www.longtailvideo.com/support/blog/15827/using-the-jw-embedder-to-embed-your-player

JW Player

User  
0 rated :

I looked at my order page and it simply lists the players I can choose for my license -- I assume I want 5.5, which is what I downloaded. There is no place to check or uncheck anything there...

But maybe you are saying the original JW player (with the watermark) that I downloaded had a "viral plugin" -- is that what provides the black window where my variables show up?

The thing is, I do WANT that - I would like to show the information... isn't it possible to have it with a licensed version?

My setup seems to be working fine in my draft since I put back the the watermarked JWplayer on my server - the variables I added to the html5 code DO show up in browsers, and the video plays in flash and in ipads etc. (the variables info I added don't come up on the ipads, just in browsers, but that is okay.)

The code I use in my draft mp4/html page
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois5.html
is exactly the same as the code in the "using the jw embedder" page you gave me above... the only difference is the name of the div, plus the variables that I added, as far as I can see.

We can actually forget the FLV business, because I do not intend to leave that live.

As soon as I am happy with my MP4 version, I will make the MP4 version live instead.

If I could just get my setup to work in my licensed player the way it is working in the watermarked player right now, that would make me very happy... Is it possible?

Thank again for your help, as well as your patience. :-)

Ethan Feldman

JW Player Support Agent  
0 rated :

Okay, all you need to do to get the licensed copy of the player to show this information, is in your code, under this line:

file: “http://www.onesourcegraphics.com/video/Rock_Chick_an_tSean-Nos.mp4”,

Add:

plugins: “viral-2”,

JW Player

User  
0 rated :

Woo-hoo!!! HAPPY HAPPY HAPPY

It works and the MP4 is live.
http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois.html

Thank you, Ethan!

all good wishes,
Nikki

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

JW Player

User  
0 rated :

I know this in an old thread but does that video work on everyone elses iDevices?

I have an ipod first generation and it doesn't work. It just displays a black screen.

Ethan Feldman

JW Player Support Agent  
0 rated :

How did you encode your file?

JW Player

User  
0 rated :

I'm talking about Nikki's mp4. (http://www.onesourcegraphics.com/video/RockChick_an_tSean-Nois.html)

I've tried to see it on my ipod and it won't work.

Does it work on your idevices Ethan?

Ethan Feldman

JW Player Support Agent  
0 rated :

It does. I have an iPhone 3G and na iPad and they both work fine on her link.

JW Player

User  
0 rated :

Maybe it's a hardware issue? Or firmware?

What specs on an idevice should be the minimum for those videos to work?

Ethan Feldman

JW Player Support Agent  
0 rated :

It might be.

I am not sure about the specs.

Does this work for you?

http://www.longtailvideo.com/players/

JW Player

User  
0 rated :

Yes that one works.

I'm going to contact a couple of people I know that have different idevices and give you feedback on Nikki's video as well.

Ethan Feldman

JW Player Support Agent  
0 rated :

Okay

JW Player

User  
0 rated :

Ok I got a response from 2 people one with an iPod and one with an iPad.

iPod Model number: MB292LL
iOS version: 4.2.1

iPad Model number: MC540LL
iOS version: 4.3.3


Interestingly both of them were able to play the video without any issues. So it seems 2nd Generation iPods can't play them. (I previously stated it was a Gen 1 but then checked the model and turns out I was wrong)

I assume it would have to do mainly because of the CPU? (Or maybe it's due to jailbreak?)

Ethan Feldman

JW Player Support Agent  
0 rated :

@Mario – I have tested on an iPad 2 and it works fine. Now that I know you are running a jailbroken iPad, that would probably be it…

JW Player

User  
0 rated :

I'm not running an iPAD, I'm on an iPOD

Ethan Feldman

JW Player Support Agent  
0 rated :

Got it.

For older iDevices, you need to enable something called “iPod 5G support”, when you encode a video in HandBrake – http://handbrake.fr/

JW Player

User  
0 rated :

Ah that could be it...

JW Player

User  
0 rated :

One more question, do the subtitles work with jw player in an idevice?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yeah, that or the jailbreak.

The Captions plugin is Flash only, so it will not work on iOS.

JW Player

User  
0 rated :

Just to add a little bit more info.

I tried the video.mp4 file that comes with the jw player on the ipod and it wouldn't work. So I encoded it in Handbrake with "iPod 5G support" and it still did not work.

After that I selected "iPod Legacy" and changed a few parameters in the video and audio settings and it works now.

Just a heads up to anyone who has problems.

Ethan Feldman

JW Player Support Agent  
0 rated :

Great, thanks for letting us know.

JW Player

User  
0 rated :

Hi Ethan
I know this old thread, but suitable for my case.
I use JW 5.10 and mp4 format.
i got the problem with slow buffering.

if I use handbrake to re-encode mp4, will it be ok ?
or i still need to use QTIndexSwapper ?

Thanks

JW Player

User  
0 rated :

additional info :

the mp4 file is nearly 2 mins = 50MB
but in the future, we need to put 1 hour length mp4

currently, in 2 min mp4, sometimes stop to get buffering and play again and stop - play - ....
not smoothly like before (i used JW player with flv file in PHP website - currently we run JW player with mp4 file in ASP.NET website).

tks again.

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have a link?

JW Player

User  
0 rated :

@Ethan :
on testing domain.
http://www.member.gbinewcastle.org/media.aspx

Thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Your mp4 file has an incorrect mime type

It is – application/octet-stream

It needs to be – video/mp4

JW Player

User  
0 rated :

@Ethan :
Thanks Ethan, i did change the mime in IIS, however :
my original file : already had index (moov) at start, only the W x H slightly bigger, so make the file size : 50MB

and my last file, after encode with HandBrake (iphone size) and move the index at start using mp4Box(mux), the file size : 30MB

but BOTH of them still buffering in the middle, not as smooth as flv file, so i guess,
* this is the nature of MP4 (compare than flv) ?
* this could related to internet connection speed ?

Thanks again.

JW Player

User  
0 rated :

you can check in site which i provided before.tks

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi,

I went to your site, cleared my cache.

The fist file – http://www.member.gbinewcastle.org/videos/v1512201211131035677.mp4

Still has this mime type – application/octet-stream

Same with the 2nd file.

However, they both play okay for me?

Best,
-Ethan

JW Player

User  
0 rated :

Hi Ethan
1. is it the file play ok with yours side like this snapshot ?
www.member.gbinewcastle.org/videos/snapshot.wmv
(still buffering sometimes in the middle of playing )

2. how to check file mime type ?

Thanks again.

Ethan Feldman

JW Player Support Agent  
0 rated :

1) Yes, it plays fine for me.

2) You can use Firebug’s Net Panel to check the content-type.

JW Player

User  
0 rated :

Thanks Ethan, now the problems solved.

*My mp4 sample is 1 minute with 20MB size, so the buffering "speed" CANT catch up the video playing "per second".
buffering per second (20MB / 60 second) = 0.33 MB/sec, which is slow to achieved.

*But when I use sample : 30 minutes with 300MB size (10MB per min video), the buffering "speed" is faster than the video play "per second".
buffering per second (300MB/1800 second) = 0.16 MB/sec, which is can be achieved

*I think the average size should be like : 1 min ~ 10MB size
(also tried with 2:27 mins video with 30 MB size or 12MB per min video, looks good )
tested with ipad wifi,looks good too.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np, glad you got it.

This question has received the maximum number of answers.