OK, I reduced the code generated at http://videojs.com/embed-builder/
to just one VIDEO and one SOURCE (mp4) tag with no fallback and it
works perfectly on the Android. Substitute my file (on my server or
S3) and it fails as described.
My latest thinking is this: if the demo file (mp4) works but one
of mine does not, what else is different ? Answer: the location
it's served from. Put the demo file on my box and point at that and
I get the error - same file, different location.
I have the following in the ,htaccess file of the directory
where the file is stored:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Everybody has read access whether on my server or S3.
This IS driving me nuts. There must be some difference on the
two server set-ups but I don't know enough and/or can't figure it.
Any ideas please ?
OK, this is going to be one of those "I've got it working ...
kind of, sort of ..." threads !
After sleeping on this, I decided to try moving the test file to
another hosting account that I have (where I have what I'll call
"domain number 2") and of course changing the SOURCE tag to match
... It worked !
Now let's try it on another domain ("domain number 3"), this
time on the same hosting account as the original "test" domain
("domain number 1"). Ditto. Back to "domain 1": no dice. Weird
So I AM right in assuming that there is something odd and/or
different about the "test" domain though quite what it is, I really
don't know. With the others, I didn't even check or set MIME types,
they just worked. If anybody has any ideas on what's going on, I'd
really like to hear them.
To put the cherry on the cake, I turned my attention to having
the file on Amazon S3 ... no joy at first, so I used S3Fox to check
that the file had permission for reading on the Access Control
List. I had also been using this to get the URL to put in my code.
I copied and pasted this again and noticed that it was giving me
the "https" method by default ! Removing the last letter gives me a
happy end to my working week :-)
I still have no idea how or why my test domain is different from
the others, so I would still like to hear any ideas on that score.
But I can now play my MP4 videos on my cheapo Android without Flash
using VideoJS :D
If you have been, thanks for listening ;-)
on 14 Sep, 2011 08:12 PM
is not a matter of domain, it's not a matter of server, of
.htaccess or anything else. I downloaded the example video
(oceans-clip.mp4) on my server and it worked fine, although my miro
encoded mp4 video didn't work.
I used Zencoder with default settings (and an youtube flv as
input) to encode a 5sec mp4 video from my flv original (watermarked
by Zencoder) and it worked fine too. So the important thing to do
is use Zencoder for encoding to mp4. Anything else is a dead
Maybe this is a way to make profit for Zencoder (after all the
VideoJS is copyrighted by Zencoder)
Hi Nikos, thanks for that but my experiments suggest that is
must be a server thing. Consider ... the very same file works when
placed on 2 different domains that I control and these are on
different hosting accounts. When I try it on the original domain
(which is on the same account as one of the two working domains),
it won't work. The ONLY difference is the location where it
resides, so it must be something to do with the configuration of
that domain because the same file is being used. I have also with a
couple of different files including one that I encoded myself using
PiTiVi and one using the Zencoder test service - it even happens
with the oceans clip too !
As it happens, the problem domain is my "test" domain, and now I
know about the problem, I use Amazon S3 (http not https !) and all
is well. Unfortunately, I don't have the time to do an exhaustive
investigation of the differences in the server configurations, but
if anybody happens to know the answer, I'd be happy to hear it
I had exactly the same problem but using plain simple html5
without any js libraries. Not sure whetehr this is helpful, but
speaking of .htaccess
I had my site in a password protected area of my webspace. While
everything played back fine in all the browsers on the desktop, I
continuously got the "Sorry, cannot play this file" message on my
android browsers (Android 2.3).
Playing back files from other domains was fine.
After pulling my hair for hours I moved the videos outside the
.htaccess protected area and tadaaa: they worked as expected.
In case this does not apply to you I still would be interested in
hearing what your solution to the problem was (if you ever found
Same problem here. I have donwloaded the oceans-clip.mp4 fileto
my computer and I have hosted in a local server (Xampp). It works,
but my own mp4 file still doesn't work in that way also. I will try
Zencoder now. I think it could be the encoding as Nikos says. I
will post what happen.
Sorry for my bad english.
I have tried Zencoder, too complicated for me :D. But I found
another solution. With the Miro Video Converter, set the output to
one of the Android devices. The resulting file will be an mp4 ready
to be played on an Android device. I hope it work for you.
Did you try making your URL absolute? I had trouble with
relative paths but as soon as I put the http://.....com/video.mp4 instead
of just a relative directory path it worked. Maybe that is also why
you are seeing different domains working? When you try on the same
server you are writing the source as relative path?
A conversation has been started with the Video.js - HTML5 Video Player staff to resolve this discussion.