Website Video doesn't work - html

I am making a website with a video that is in .ogg and .mp4 , but for some reason when i go on my website in chrome, it doesn't play when it is hosted by hostmonster. The video works fine on the localhost, so I don't know why it isn't working.
Here is my code if it helps:
<video width="100%" height="100%" >
<source src="web.ogg" type="video/ogg" autoplay="autoplay">
<source src="web.mp4" type="video/mp4" autoplay="autoplay">
Your browser does not support the video tag.
</video>

Your code is ok, it should work on every browser that support HTML5 Video, the problem is that your server is not responding to mime-type such .ogg or .mp4. By default, Apache decides what media type to send with each file by inspecting the file's extension. The extension-type mappings are stored in the mime.types file in the httpd/conf directory. If a pair extension-type is missed then you have that problem. That's the reason why it works on localhost, but is not working on your server, differents mime.types files
If you have access to the mime.types file search this lines:
video/mp4 mp4 mp4v mpg4
video/ogg ogv
If you cannot modify your master configuration files, edit the .htaccess file located in your root directory (if not exist, feel free to create it). Add this lines:
AddType video/mp4 mp4 mp4v mpg4
AddType video/ogg ogv

Related

html5 videos giving 404 errors

I'm trying to do a background video for a banner. When I view the page locally everything works just fine, but when I load it on a server the video won't load. I do get the fallback jpeg properly displayed but for all three video files the console shows a 404 error.
<video autoplay loop class="fillWidth" poster="img/Push-The-Buttons.jpg">
<source src="img/Push-the-Buttons.mp4" type="video/mp4"/>
<source src="img/Push-the-Buttons.ogv" type="video/ogg"/>
<source src="img/Push-the-Buttons.webm" type="video/webm"/>
Your browser does not support the video tag. I suggest you upgrade your browser.
</video>
I've triple checked all of the paths but I'm finding nothing. I've tried putting an .htaccess file in the home folder and the folder with the media, and here's what I put in it:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/mp4 .mov
AddType video/webm .webm
AddType image/jpeg .jpeg .jpg .jpe .JPG
Am I missing something here?
For me the solution was to right-click on my project in Eclipse, and correct the invalid entries in the Java Build Path.
Check if your file names are correct. File names are case sensitive on Linux but not on windows

HTML 5 video not working in IE on Windows 7

So I've read countless posts about this issue as it seems to be a common one but I've tried everything and I can find.
Here is the html
<video toggle-play autoplay loop>
<source src="url.ogg" type="video/ogg">
<source src="url.webm" type="video/webm">
<source src="url.mp4" type="video/mp4">
</video>
I've added these MIME types to my .htaccess
AddType video/mp4 .mp4
AddType audio/mp4 .m4a
AddType video/mp4 .m4v
AddType video/ogg .ogv
AddType video/ogg .ogg
AddType video/webm .webm
I've tried changing the order of the different sources. I verified the video is using the H.246 codec for video and AAC codec for audio. I also made sure that my server isn't Gzipping the files it gives me.
The video works on all other browsers and all versions of IE in windows 10. Unfortunately the client needs it to work in windows 7.
Here is a working copy of the video if you want to look at it
http://ac.anthonyvespoli.com/html/home/home.html
Starting to get pretty frustrated. At the moment a flash fall back is not an option. Please help :)
The format .ogg and .webm don't work in IE check http://caniuse.com/#search=video
but .mp4should ... try comment the other one .. anche check better if the codec is the codec MPEG-4/H.264
I found out that even though the codec was MPEG-4/H.264 that it was AC1 which apparently is not supported out of the box in windows 7. Converted the file to .avi and it works fine.

local wordpress installation not playing html5 video

I'm developing a WordPress site using XAMPP. I am using the html5 video tag in the header to display the video. I have the videos on the C:\ drive - not in the XAMPP installation. C:\WebVideo is the path.
I am testing in the five major browsers:
Firefox 27.0.1 which says "No video with supported MIME type found"
IE9 which just displays a big black box.
Chrome Version 32 displays the control bar as does Opera 17.
Safari 5.1.7 shows the header without a hint that video is supposed to be displayed.
So, the only clue I have is the MIME types.
I do have an .htaccess file located in the C:/xampp/htdocs/wordpress folder. This is the content of that file:
AddType video/mp4 .mp4 .m4v
AddType video/ogg .ogv
AddType video/webm .webm
I know the file is being read because when I put a bunch of nonsense in the file I get internal sever errors. When the nonsense is removed Wordpress functions correctly.
Here is the HTML I am using:
<video width="320" height="240" controls="" preload="" style="width:30%; position:absolute; float:right; ">
<source src="C:/WebVideo/my-vid.mp4"></source>
<source src="C:/WebVideo/my-vid.ogv"></source>
<source src="C:/WebVideo/my-vid.webm"></source>
</video>
The video itself is not broken it plays fine.
I've been all over the web for about 2 hours looking for some fix and come up empty handed. Anyone have any ideas?
As mentioned in comment, Safari requires QuickTime to be-installed to playback video via <video> tag (Windows only).
Also, it is suggested to provide alternative video source for fallback purpose. Even better, use libraries that has Flash player fallback, such as videoJS.

Why would videojs HTML5 video not play sound in Firefox?

I've converted an .mp4 video into .ogg and .webm formats (with ffmpeg) and used videojs to create the following web page that plays the video on all browsers (IE6-IE9, safari, chrome, opera, firefox):
http://tanguay.info/examples/testvideo
However, Firefox (12.0) does not always play the audio, depending on how the page is accessed:
Playing from file:// with the webm source before ogg, Firefox plays fine:
<source src="videos/damconnect.mp4" type='video/mp4'>
<source src="videos/damconnect.webm" type='video/webm'>
<source src="videos/damconnect.ogg" type='video/ogg'>
But playing from file:// with the ogg source before webm, Firefox plays without audio:
And playing from http:// with either ogg or webm first, Firefox plays without audio.
How can I get Firefox to play via http:// with audio?
ADDENDUM:
Also: Opera will not play the video if ogg is listed first (just spins, doesn't start).
I notice that my tanguay.info server seems to be sending a text/plain header with the .webm video, how can I change that?
ANSWER:
I added this .htaccess file to the directory where index.htm is, which fixed the problem:
AddType audio/ogg oga ogg
AddType video/ogg ogv
AddType video/webm webm
For the text/plain - edit your mime.types file (~www/conf) and add webm/video webm
Chances are you are having the same problem with ogg/ogv, add mime type ogg/video ogg ogv
Also ensure the audio codec is correct on conversion.
EDIT
Ok, I see you added it to the httpd.conf - just read this
10.5.31. TypesConfig TypesConfig names the file which sets the default list of MIME type mappings (file name extensions to content types).
The default TypesConfig file is /etc/mime.types. Instead of editing
/etc/mime.types, the recommended way to add MIME type mappings is to
use the AddType directive.
For more information about AddType, refer to Section 10.5.54 AddType.
Although I can find any argument as to why...

IE9 doesn't load video from remote host

I'm using jPlayer and it's working in all browsers except IE 9. If i open the page from a local location as '\192....\index.html', everything works... but if i open the page from the domain name 'http://dominename/... index.html', the video doesn't works.
Anyone knows how to solve this problem?
had a similar issue on safari with mp4 files. sounds like either you didn't upload your video to the right path (but I guess you checked it several times) or your server has problems with the mime types on ie. did you set mime types in your source like.
<source id="mp4" src="http://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4">
or set mime type via .htaccess file
AddType video/mp4 .mp4
AddType video/mp4 .mov