Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to serve videos on a website?

I want so serve some videos on my site. They are available as .MP4 files gotten from a FlipShare camera.

Now I tried converting them to WMV (which succeeded, but when embedded in html in a <object id='mediaPlayer' width='320' height='285' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' etc' tag, users have to install an addon and the user experience of 10 Windows Media Players on the site isn't just so good.)

So then I looked at youtube and wondered how they do it, but I can't figure out what format they convert the video to.

So my question is: What format do I have to convert my video to, to show it in a player which does not need to be installed in the users browser. What tool do i need and what is the html code to embed such a video?

As you can see: starting from scratch.

PS: I often hear: This or that file extension is just a container, there can be anything inside. If you're using this in your answer, can you explain this to me, because I never understood this. For me a .cs is a c# file and a .doc a Word file, and not 'a container'.

like image 593
Michel Avatar asked Apr 07 '10 20:04

Michel


People also ask

What is the best way to present a video on a website?

Embed a video. The quickest and easiest way to incorporate video onto your website is by embedding a link to a YouTube or Vimeo video. This method is compatible with nearly every content management system (CMS) and requires nothing more than copying an embed link into your site's HTML code.

Should you put videos on your website?

Increase website traffic—video users get 41% more web traffic from search than non-users (Aberdeen Group) Engage visitors—72% of people would rather use video to learn about a product or service (HubSpot) Keep people on your site—the average internet user spends 88% more time on a site that contains video (Mist Media)

Can I put a video on my website?

We looked into the rules about using videos from YouTube, Vimeo, and Instagram. Here's what we found. In general, it's fine to post video that you create yourself on your website. Once you create a video, it is automatically copyrighted, and you have full rights to it unless stated otherwise by a sharing service.


1 Answers

This isn't an easy question. The basic answer is that you need to use a format that the user's computer already supports. There is no one answer to this question. YouTube encodes videos as MP4 and embeds them in the page with a Flash-based movie player, and Flash is pretty widely supported, but you'll notice that Flash isn't available on a lot of mobile platforms — so anybody using an iPhone is shut out if you go the Flash route.

HTML5 introduces the video tag, which is meant to solve this problem once and for all, but there's still a hiccup even there — most HTML5-enabled browsers support h.264-encoded video, but Mozilla supports Ogg Theora instead. YouTube is currently experimenting with a <video>-based player, so this does seem like the future.

I believe the current best practice to support the most people possible is to encode as h.264, try to serve as a <video> element, and have a Flash-based player as a fallback if that doesn't work (which can play the same h.264 file).

like image 84
Chuck Avatar answered Oct 12 '22 23:10

Chuck