Holland
Holland

Reputation: 415

Html5 video element refuses to play

I have a html5 video embedded as follows:

<video controls poster="/wp-content/uploads/2015/12/screenvid1.png">

   <source src="/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4" type="video/mp4">

   <source src="/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4.ogg" type="video/ogg">

 Your browser does not support the video tag.

</video> 

This works fine on the test server. However, it doesn't work on the 'real' server. On this 'real' server, Internet Explorer 11 says "Invalid Source", and Firefox 43.0.4 says "No video with supported format and MIME type found."

I am quite positive that the source file is in the correct map and believe that the browsers find the file, but somehow refuse to play it. At least I don't see how the source file could possibly in the wrong place. It's true that I get the same error message when I change the file path into a non-existing path, but as I said, I don't see how it could be a simple case of 'file not found'. And if it is a case of 'file not found', it's not because the file isn't actually there (unless I'm tragically mistaken of course!)

Note: the only difference in the path for the source file between the two servers is that on the test server the path begins with an extra map '/wptest', because that's the submap the Wordpress site resides in, whereas on the 'real' server it resides in the root folder. After copying the site to the 'real' server, I've made the corresponding change in all relevant places for many files (e.g. images), and the files are always found. I've also checked three times that the file is actually there, in the correct map, on the 'real' server. In fact, let me upload a screen shot of the map structure as it is on the 'real' server (with the video file selected):

http://www.test2468.nl/wptest/Screenshot%20(3137).png

[NB: On this server, the map called 'svvreewijk' always counts as the root folder!]

I've found other questions regarding this error message, but the proposed solutions seem quite complicated (like changing the format with special audio formatting software), and I'm still hoping that the issue is actually simple to resolve - especially given that the video plays without problem on the test server.

Link to the relevant page on the test server: http://www.test2468.nl/wptest/foto-vid/ (video more to the right)

Link to the equivalent page on the 'real' server: http://www.svvreewijkdevaan.nl/nl/foto-video/

Thanks.

Upvotes: 0

Views: 304

Answers (2)

Mick
Mick

Reputation: 25471

Its definitely the case that the sever is returning a message saying that the file is not available as Sarah says.

Given the info in your question this might be caused by a number of things:

  • different relative vs absolute paths between test server and real server (although if your other files, images etc work this looks less likely).
  • the video file is very large - your server or your network may have restrictions on very large files
  • there may be difference in the servers video serving capability (for example see this similar issue with mp4 on IIS: http://robwillis.info/2012/04/iis-7-404-file-not-found-when-the-file-really-does-exist/)

Upvotes: 2

user4427511
user4427511

Reputation:

In first case, file exists:

$ wget --spider test2468.nl/wptest/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4
HTTP request sent, awaiting response... 200 OK
Length: 587940629 (561M) [video/mp4]
Remote file exists.

In second case, file does not:

$ wget --spider svvreewijkdevaan.nl/wp-content/uploads/2015/12/Speeltuin-de-Vaan-montage-met-muziek.mp4
HTTP request sent, awaiting response... 404 Not Found
Remote file does not exist -- broken link!!!

Upvotes: 1

Related Questions