How to put video on Website - html

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">

Related

Video tag doesn't work in html5

<video width=200 controls>
<source src="../../../Content/111.mp4" type="video/mp4">
</video>
it doesn't work. Path is correct. What is this??
Result is white window with play button.
The html5 code below works for me in every browser except Chrome. Can you test in other browsers. Are you able to add another video in another format type? See this stack overflow question for more info.
<video width="200" controls>
<source src="yyy.mp4" type="video/mp4" />
</video>

html5 video tag subtitles srt won't work

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>

How to show a viedo file on html4 page

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

Making video tag play in all browsers

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).

HTML5 <video> tag in Chrome doesn't work

I have noticed a strange problem with the HTML5 <video/> tag in Chrome.
Using this, it works fine:
<video poster="023.png" autoplay controls>
<source src="todojunto.mp4" type="video/mp4" />
</video>
This only plays the sound, no video:
<video poster="023.png" autoplay >
<source src="todojunto.mp4" type="video/mp4" />
</video>
If I remove the poster attribute, it works again.
All other browsers (even IE9...!) works perfectly, and I can't seem to find the reason.
Any ideas/help?
Thanks
Video tag's attributes should be specified for strict standard implementation:
<video poster="023.png" autoplay="autoplay" controls="controls">
<source src="todojunto.mp4" type="video/mp4" />
</video>
If this doesn't work, there is something changed in your browser's preferences
I'm surprised your video even shows up. Chrome stopped supporting mp4. You should use a .webm file when working with Chrome for html5 videos.
You need to use muted=""; it does work for video
<div class="wrap">
<video width="auto" height="400px" autoplay="" loop="" muted="">
<source src="Video.mp4" type="video/mp4">
<source src="Video.ogg" type="video/ogg">
</video>
</div>
I've encountered the same error.
I fixed it by adding the preload="auto" tag.
<video autoplay loop preload="auto" poster="023.png">
<source src="todojunto.mp4" type="video/mp4" />
</video>
Don't know if this will work for you, and it's been some time since you asked the question. But maybe this will help someone in the future!
I just converted it to ogv and works well in all browsers. I had problem with firefox but no issues anymore. It was also showing a gray background but now, now anymore. here is my code: you can see it in eargo.com/products
<video class="" style="" autoplay loop>
<source class="" src="video.ogv" >
<source class="" src="video.mov" >
<source class="" src="video.mp4" >
</video>
you may see it after 5-7-2015.