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

"The Video Could Not Be Loaded" - Encode Video for JW Player/iPhone


Hi!
I've been through these forums and I see this question has been asked a lot, but I'm still not able to get this working. I would like my video to play on iPhones and iPads.

On my iPhone (3GS) I get the same message regardless of the file I am using. The message is:
"The video could not be loaded, either because the server or network failed or because the format is not supported:" Then it shows the path to the video.

Here is a link to my site:
http://www.runningwithelephants.com

Currently, all of the videos here are h.264 AAC .mov files with the exception of the video at the following link which is h.264 AAC .mp4:

http://www.runningwithelephants.com/?p=71

To create that .mp4, I did a "Save As" in Mpeg Streamclip to save the h.264 .mov to an h.264 .mp4.

I've seen in the forums that you like Handbrake for encoding. I am on a Mac using the latest version of Handbrake (0.9.5). I tried converting the file using the presets for iPod 4, and it created a .m4v file. I tested the .m4v on my site with my iPhone but it did not work. I have not been able to find a way to get Handbrake to export a file with an .mp4 extension.


The code I am using to embed the video on my site is as follows:

<script type='text/javascript' src='http://www.runningwithelephants.com/wp-content/mediaplayer/jwplayer.js'></script>

<div id='countrytour'>This text will be replaced</div>

<script type='text/javascript'>
jwplayer('countrytour').setup({
'flashplayer': 'http://www.runningwithelephants.com/wp-content/mediaplayer/player.swf',
'file': 'http://www.runningwithelephants.com/videos/country_tour.mp4',
'controlbar': 'bottom',
'width': '810',
'height': '480'
});
</script>

On my iPhone, I am totally able to see the Buck Bunny file at:
http://www.longtailvideo.com/players/jw-flv-player/

So my questions are:
1. How can I encode my videos to match the settings the Buck Bunny movie you have on your site? (What software, settings, etc)
2. Is that even the problem?

Thank you!

Dave

5 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

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!

JW Player

User  
0 rated :

That worked! Thank you Ethan.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

JW Player

User  
0 rated :

Hello,
I m trying to get the current time of my video on iphone/ipad, when i do this with event listeners, it doesn't load my video, and when i remove the event listeners from my page it loads my video.I m using the following code to get the current time of the video.
<script type="text/javascript">
/* <![CDATA[ */

var currentPlaylist = null;
var currentLength = 0;
var currentItem = -1;
var previousItem = -1;
var currentMute = false;
var currentVolume = 100;
var currentPosition = 0;
var currentState = 'NONE';
var currentLoaded = 0;
var currentRemain = 0;
/*var player = null;*/

function playerReady() {
player = document.getElementById('player1');
addListeners();
}


function addListeners() {
if (player) {
player.addModelListener("STATE", "stateListener");
player.addModelListener("TIME", "positionListener");
} else {
setTimeout("addListeners()",100);
}
}


function stateListener(obj) { //IDLE, BUFFERING, PLAYING, PAUSED, COMPLETED
currentState = obj.newstate;
previousState = obj.oldstate;

var tmp = document.getElementById("stat");
if (tmp) {
}
}


function positionListener(obj) {
currentPosition = obj.position;
var tmp = document.getElementById("tim");
var show_time=document.getElementById("show_time");
if (tmp)
{
show_time.value=currentPosition;
}
}

/* ]]>
.

Please help me so that i can do both the things, play video with getting the current time of the video.

Thanks
Ravinder

Ethan Feldman

JW Player Support Agent  
0 rated :

Please post in the JavaScript interaction forum. This forum is for Video Encoding.

This question has received the maximum number of answers.