Someone I know has asked that I convert the videos on his webpage from using FlowPlayer to using native HTML 5 video.
To start off, I read that 3 formats are sufficient to cover the main desktop browsers (Chrome, Firefox, IE and Opera). Starting from .avi, I used Miro Video Converter to get videos in .mp4, .ogg and .webm as can be seen here:
To further help with cross-compatibility, I decided to use VideoJS.
The mark up seemed straightforward too:
<video id="example_video_1" class="video-js vjs-default-skin"
controls preload="auto" width="500px" height="300px"
poster="something.png">
<source src="something.mp4" type="video/mp4" />
<source src="something.webm" type="video/webm" />
<source src="something.ogv" type="video/ogg" />
</video>
Here was what I found on the browsers (latest versions of all):
Google Chrome v30.0: no problems whatsoever. It picked .mp4 which was the highest quality of the three formats. Great.
Opera v12.16: again, and a little surprisingly, no problems. Same behaviour as Chrome.
IE 11: It's all downhill from here. IE 11 waits for the entire video to finish buffering and then starts playing only audio. So it was audio + the poster.
Firefox v24.0: Unlike IE, it doesn't wait for the entire video to buffer but like IE, it plays only audio and no video. I read somewhere that Firefox does indeed support .mp4 playback as long is it is a Windows 7 or higher OS. I am using Windows 8.
I then did some reading up on Apache. The headers stated that Firefox and IE were both recognizing the mp4 as just that as opposed to some other MIME type. Even so, I added the following to my .htaccess:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
That didn't make a difference.
I then swapped the order of the source tags so that the .ogv video came first. Now, the video played in Firefox too but the .ogv is not nearly as high quality as the .mp4.
The page in question is this: http://keyrecords.com/Artist%20Pages/haggard.html
I am linking to the page above for illustration purposes only. On the page above, .ogv comes first, so yes, I know it plays in Firefox.
So my question is this: what do I need to do to get Firefox and IE 10/11 to play the .mp4? It is safe to assume that these are the latest version of each of the browsers running Windows 7/8 machines.
EDIT: MediaInfo gave me this information about the file (does it look right?):
I managed to solve the issue by using the HandBrake converter.
I gave it the existing .mp4 and asked it to give me a new .mp4 with the following specs:
This new .mp4 works in all 4 browsers without issues :)
Something about the way Miro Video converter converted the files caused IE and Firefox to see the audio track only but not the video track. This was rectified by reconverting using HandBrake converter.
Related
I have two video tag, one work fine but second give me error,
no video with supported format and mime.
This is First video tag. Which work fine and take this e.g from This Link.
<video loop controls class="popvideo">
<source src="https://archive.org/download/WebmVp8Vorbis/webmvp8_512kb.mp4" type="video/mp4">
Your browser doesn't support HTML5 video tag.
</video>
Second video tag which is not working on desktop but work in android firefox version, and throw me error.
<video class="popvideo" loop controls id="v1">
<source src="https://video.twimg.com/amplify_video/771965608854446080/vid/480x360/J-cvquAduyhPHJmg.mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'">
<!--<source src="https://video.twimg.com/amplify_video/771965608854446080/vid/480x360/J-cvquAduyhPHJmg.mp4" type="video/mp4;">
if i do this too nothing happen, i still get error-->
Your browser doesn't support HTML5 video tag.
</video>
i have add this to my .haccess but none helped.
AddType video/mp4 mp4 m4v f4v f4p
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
So my question is why this is happening? if you will say Fire fox don't support mp4 then i will tell first example is taken form respected site only.
The second source that you commented out that you said "also doesn't work" has an error in it - If you look at it, there's a semi-colon before the quotes, after the mp4. When you remove the semi-colon, your video plays fine.
It then becomes:
<video class="popvideo" loop controls id="v1">
<source src="https://video.twimg.com/amplify_video/771965608854446080/vid/480x360/J-cvquAduyhPHJmg.mp4" type="video/mp4">
Your browser doesn't support HTML5 video tag.
</video>
The 'No video with supported format or mime type" error was logged as a known bug with firefox a long time ago, and fixes were suggested and it is marked as fully resolved. Have you updated to the latest desktop version? The bug was 990623 - the solutions suggested were to reload (after updating ff), by pressing ctrl+shift +r and if that didn't work, to just right click on the video and choose 'View Video', and that would play the video. The ultimate solution is to restore Firefox, it seems the issue was caused primarily by conflicts with add-ons etc. It's not ideal, because you'll have to re-install any add ons but it works (see screenshot)
So to sum up, your issue is not the video itself, it's more a firefox issue...
Hope this helps
fiddle
Check your type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'" attributes from Video Codecs
<source src="https://video.twimg.com/amplify_video/771965608854446080/vid/480x360/J-cvquAduyhPHJmg.mp4" type="video/mp4; codecs='avc1.42E01E, mp4a.40.2'">
Check all browser support for HTML-5 video HTML 5 Video - Browser Support
I assume it means the codec which is required to decode (and thus play) the video is available on the phone, but not on your desktop. Try another video or encode yours with an open source codec which supported by Firefox out of the box.
Also, note that the filename extension is practically meaningless for videos - it is merely a container format. The actual encoding of the contents in the container is what matters - and it, in turn can vary wildly.
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.
Does HTML video tag works in IE browser. I have a little demo here. Its working in Firefox. I need to make it work in Internet Explorer as well.
<div class="content flowplayer is-splash is-closeable" id="vid1">
<video id="mainVideo" src="http://www.w3schools.com/html/movie.webm" tabindex="0">
<source type="video/mp4" src="http://www.w3schools.com/html/movie.mp4"></source>
<source type="video/webm" src="http://www.w3schools.com/html/movie.webm"></source>
</video>
</div>
Do you have any suggestion ?
Webm should play in Iexplorer 9 and higher. It won't work in older Iexplorer versions, unless you use Google Chrome Frame (or anything simular). Another option is to use Flash as a fallback option.
If that's not the issue, some servers need an .htaccess file to play video's online. The htaccess file should contain:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
If that's not the issue, check if the Webm is alright. You could use Miro Video Converter It's free fast and good.
You need Google Chrome Frame to work in IE 6,7,8
For IE9 you need WebM support
Check this out
you could potentially look at http://www.flowplayer.org as an alternative, native support, but then falls back based on browser and version
I have searched around quite a bit but have not solved my problem.
I have a video tag running as follows:
<video
class="ne"
src="{{ page | video_url }}"
muted="true"
volume="0"
controls
width="720"
height="480"
poster="{{ page | video_poster_image_url }}"
type="video/mp4">
</video>
I am using Jekyll for the URLs. They work fine.
The site is live at switzerlandllc.com. Click any video in FF and it shows an image and an X. Chrome and other browsers work fine.
If you grab the source of a video and load it in a new tab it plays fine. At least it does for me.
I have added:
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
to my htaccess file. I suspect that I don't need the .ogv or .webm.
I don't understand why loading the video URL will play the videos fine but loading the video into a video tag fails.
Any ideas?
This is caused by the limited support for the MP4 format within the video tag in Firefox. Support was not added until Firefox 21, and it is still limited to Windows 7 and above. The main reason for the limited support revolves around the royalty fee attached to the mp4 format.
Check out Supported media formats and Media formats supported by the audio and video elements directly from the Mozilla crew or the following blog post for more information:
http://pauljacobson.org/2010/01/22/2010122firefox-and-its-limited-html-5-video-support-html/
I can confirm that mp4 just will not work in the video tag. No matter how much you try to mess with the type tag and the codec and the mime types from the server.
Crazy, because for the same exact video, on the same test page, the old embed tag for an mp4 works just fine in firefox. I spent all yesterday messing with this. Firefox is like IE all of a sudden, hours and hours of time, not billable. Yay.
Speaking of IE, it fails FAR MORE gracefully on this. When it can't match up the format it falls to the content between the tags, so it is possible to just put video around object around embed and everything works great. Firefox, nope, despite failing, it puts up the poster image (greyed out so that isn't even useful as a fallback) with an error message smack in the middle. So now the options are put in browser recognition code (meaning we've gained nothing on embedding videos in the last ten years) or ditch html5.
I have an annoying problem regarding the <audio> tag and FF/Chromium as media won't be played back when I would expect it to. Opera seems to handle it correctly.
We have audio media to be played back using the corresponding HTML5 <audio> tag. The <source> tag includes media in an audio-only OGGÂ container.
However, the file-extension ogg is not in the src-attribute, so src-links look like http://localhost:1234/a/b/cdefg/Xyz (Restful API using redirection to get the actual media file).
The following code is the part of the web page that should display the HTML5 player:
<div class="mainContent">
<audio id="aud1" height="360" width="640" autoplay="false" controls="controls" tabindex="0">
<source type="audio/ogg" src="http://localhost:1234/a/b/cdefg/Xyz"></source>
Your browser does not support HTML5.
</audio>
<div class="divider"></div>
<a class="homeLink" href="/index.html">Take me back to the Homepage</a>
</div>
The media being played back is definitely a audio-only OGG file.
I have tested this code on Ubuntu 10.04 FF5.0, Chromium 12.0.742.91 (87961) and Opera 11.50 with the following results:
FF: doesn't play back
Chromium: doesn't play back
Opera: OK
I've integrated a small script to display different attributes of the HTMLMediaElement (attributes: networkState, readyState, see) yielding the following results:
FF => networkState: NETWORK_LOADED (media source finished loading), readyState: HAVE_NOTHING (no media available for playback)
Chromium => networkState: NETWORK_LOADED (media source finished loading), readyState: HAVE_NOTHING (no media available for playback)
Opera => networkState: NETWORK_IDLE, readyState: HAVE_ENOUGH_DATA
(Note that the descriptions for the different states are from the Safari Dev site: http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html)
If I insert a src which directly points to an audio-only OGG file (like http://en.wikipedia.org/wiki/File:Tromboon-sample.ogg), then it works as expected.
It seems as if FF and Chromium seems to have issues with links not including the final file name?
Does anyone have an idea or hint about this?
Cheers,
Chris
I know you already fixed it, but make sure you didnt miss any MIME types:
HTML5 <video>
.ogv
video/ogg
.webm
video/webm
HTML5 <audio>
.oga
audio/ogg
.mp3
audio/mp3
HTML5 <video> <audio>
.mp4
video/mp4
.ogg
application/ogg