I have hosted video on our company server. Now, I want to show this video in an html 4 page. What should I do ? I know that in html5 it is just drag and drop but what about older version of html?
Playing videos in HTML is not easy!
You must add a lot of tricks to make sure your video will play in all browsers (Internet Explorer, Chrome, Firefox, Safari, Opera) and on all hardware (PC, Mac , iPad, iPhone).
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
<object data="movie.mp4" width="320" height="240">
<embed src="movie.swf" width="320" height="240">
</object>
</video>
or
The tag defines a container for external (non-HTML) content.
<embed src="intro.swf" height="200" width="200">
The tag tag can also define a container for external (non-HTML) content.
<object data="intro.swf" height="200" width="200"></object>
Reference:
http://www.w3schools.com/html/html_videos.asp
Related
I using a simple HTML5 to play mp4 file but it says this file is not supported only on microsoft edge
I have followed this link https://learn.microsoft.com/en-us/microsoft-edge/dev-guide/html5/video here is my code:
<video width="500" height="300" controls autoplay loop>
<source src="video/video.mp4" type="video/mp4" />
<source src="video/video.webm" type="video/webm" />
<source src="video/video.ogv" type="video/ogg" />
Your browser does not support HTML5 video.
</video>
It works fine on opera, chrome and firefox
There is the possibility the mp4 file is in the newer H265 / HEVC format which is not supported in Windows 10, Edge or the Movies and Photos App
If the title of the mp4 file contains H265 or HEVC, then you will need to download a media player that supports this new format.
Also you can see more here Microsoft Edge and <VIDEO>
What version of edge are you running?
You could create a you tube video and then include it that way.
<iframe width="420" height="315" src="https://www.youtube.com/embed/tgbNymZ7vqY"></iframe>
Source tags are empty elements and should not be closed. Remove the closures like so:
<source src="video/video.mp4" type="video/mp4">
<source src="video/video.webm" type="video/webm">
<source src="video/video.ogv" type="video/ogg">
I'm having a problem with the HTML5 video player, doesn't show the video, in a html file I have:
<video>
<source src="video.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
Video tag not supported.
<video>
I even tried without the codec atributte in chrome I gets nothing, only the black square of the reproductor
the file video.mp4 is inside the same folder of the html, it doesn't even show a preview, nothing!
It should work with HTML5 video tag perfectly. I've put an example for your reference.
<video controls="" autoplay name="media">
<source src="http://www.html5rocks.com/en/tutorials/video/basics/devstories.mp4" type="video/mp4;codecs="avc1.42E01E, mp4a.40.2"">
</video>
This should work perfectly:
<video width="300" height="200" controls>
<source src="movie.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
I'd like to use captions with an mp4 video downloaded from Youtube. I also used googlesrt2 to create an .srt file from the youtube link. This is the html I am using:
<video controls="controls" height="480" width="640">
<source type="video/mp4" src="video1.mp4" />
<track kind="captions" src="output1.srt" srclang="en">
</video>
Ironically, it works in all browsers sans the actual captions, except for IE where it doesn't work at all (I thought IE native was mp4!).
I'm rather frustrated and not sure how to fix this. Any help would be appreciated.
Solution : You have to use JS to sync subtitles with video track for all platforms.
<script src="http://www.storiesinflight.com/js_videosub/includes/videosub-0.9.9.js"></script>
<video width="320" height="240" controls>
<source src="https://mkvtoolnix.download/samples/vsshort-aac.mkv" type="video/mp4">
<track kind="captions" src="https://mkvtoolnix.download/samples/vsshort-en.srt" srclang="en">
</video>
I have a video tag looking like this:
<video width="380px" height="190px" controls>
<source src="movie.mp4" type="video/mp4" />
<source src="movie.ogv" type="video/ogg" />
Your browser does not support the video tag.
</video>
This plays the video in Firefox and Chrome. However, IE9 and 10 simply states unreadable source (the video 'box' itself turns up so the tag is supported). Safari doesnt seem to support the video tag and thus I only see my fallback message. However, if I go to the URL directly in any browser I can watch the movie in Firefox + Chrome and download it in IE + Safari.
What should I do to make the video playable in all browsers?
Add this line in your head somewhere.
<script src="http://api.html5media.info/1.1.5/html5media.min.js"></script>
Also try putting your source in the opening video tag.
<video source src="movie.mp4" type="video/mp4" width="380px" height="190px" controls></video>
Hope fully that helps
I usually have four versions of the same video for cross-browser compatibly:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
<object data="movie.mp4" width="320" height="240">
<embed src="movie.flv" width="320" height="240">
</object>
</video>
.mp4, .webm, .ogv, and a flash fallback .flv. This has worked well for me cross-browser. Another thing to note is that for mobile, a higher-optimised .mp4 video is more likely to work (I've had issues with this in the past).
I am new to working with videos and what i'm trying to accomplish is putting a video on my site. I have been researching and havent found to much, any help would be very much appreciated. Here is what I have so far.
<embed "images/K36U21TR.wmv" width="300" height="300" />
My preffered method is to upload the video to YouTube and place it on your site using their embed code which is an iframe tag.
This provides the benefit of your users using YouTube's bandwidth when they are watching the video rather than yours.
Alternatively you could look at using the HTML5 VIDEO tag.
http://www.w3schools.com/tags/tag_video.asp
<video width="300" height="300" controls>
<source src="images/K36U21TR.wmv" type="video/wmv">
</video>
video tag : (Supprot : IE, Firefox, Chrome, Opera, Safari)
<video width="320" height="240" controls="controls">
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.webm" type="video/webm">
</video>
embed tag : (Supprot : IE, Firefox, Chrome, Opera, Safari)
<embed src="helloworld.swf">