Friday, July 20, 2012

Embed Video in HTML5 Websites

How would you embed a video into web pages employing the HTML5 syntax? We know that HTML5 introduces a video tag to replace previous object tag to specify videos in HTML pages. Embedding videos in HTML5 websites and pages is straightforward:

<video id="sampleid" src="videosample. mp4" controls></video>

It is just that simple! That’s all you'll have to do when adding a video player for a site, no third-party add-ons or embedded code via other sites — one simple tag is all you need.

However that’s not all, what skilled HTML5 users concerning about is the browser compatibility. The complexity involving HTML5 arises not through the syntax, but via browser support along with video encoding.

Template designers are used to being affected by browser compatibility, but you need to wider-than-usual disagreement amid browser vendors with regards to codec standards. So as to build a profitable HTML5 site, you’ll need to consider how modern web browsers and surfers implement HTML5 online video Web standards and also how to take care of how users watch video in legacy browsers. The main browsers you need to consider about are Chrome, Firefox, Safari and Internet explorer.

The <video> Tag

In HTML5 embedding video essentially comes down to using a single tag: <video>. But other than that, you have a lot of options for parameters. Here are the essentials within the video tag itself:

src: specify the location and name of the source video, you can specify width and height (optional) dimensions of the video;

controls: adds a default video control overlay. This is useful if you don’t want to create your own custom control. However, if you do want to delve into customizing the player controls, you can use JavaScript and CSS. HTML5 Video Player is a good example.

preload: begins downloading the video as soon as the user hits the page. 

Bellow is a quick HTML5 video code sample:

<video width="640" height="360" controls>
<source src="samplevideo.mp4" type="video/mp4" />
<source src="samplevideo.ogv" type="video/ogg" />
<source src="samplevideo.webm" type="video/webm" />
</video>

Video Codecs

As already mentioned, your biggest challenge with HTML5 video will be preparing and incorporating your content in multiple codecs. Currently, each browser has its own preferred video format. And it appears that the fractured implementation of HTML5 video will get worse before it gets better.

Right now you have three possible options for encoding your video:

  1. H.264 – a popular format that can take advantage of hardware acceleration, supported by graphics chips in desktops and devices; also the default recording format for many of the newer video and mobile devices on the market; however the format is patented and while it remains royalty free for non-commercial use, it gets complicated, and potentially expensive. Supported by: IE 9, Safari 3.1, and Chrome (for now)
  2. Ogg Theora – an open standard that is not patented and is royalty free. Supported by: Firefox 3.5, Chrome 4, Opera 10.5
  3. VP8 (WebM) – a newer standard recently acquired by Google and released as an open source, royalty-free (but still patented) format. Supported by: Firefox 4.0, Chrome 6.0, Opera 10.6.

Video Converters

What this means in practical terms for you is that your video content will need to be encoded in at least two (optimally all three) video formats in order to work with the HTML5 spec. Fortunately, you have several tools ready to help you with this task.

Handbrake: Another open source converter for Mac and Windows (and Linux), Handbrake makes a good tool for converting specifically to H.264.

MPEG Streamclip (): While not open source, MPEG Streamclip is available for free for both Mac and Windows. It, too, handles on lH.264, though it also converts to many other useful formats for use outside of the HTML5 spec. 

Firefogg: Kind of a specialty tool, Firefogg is a Firefox extension that converts video to Ogg format only, hence the name. To use it, you’ll need to download Firefox first, and then install the extension.

HTML5 Video Player: HTML5 Video Player software is the easiest way for you to encode your video to HTML5 video compatible format and embed into your own website with a few mouse clicks. Features:1. Encode video files to HTML5 video compatible format(include MP4, WebM, Ogv) in a batch mode.2. Support all modern and old web browser with HTML5 video and Flash fallback.3. iPad/iPhone and mobile device compatible.

Miro Video Converter: Your primary tool, this open source converter, available for both Mac and Windows, converts just about any video source to all of the HTML5 formats you might want to use, as well as several other device- and platform-specific formats.

5 Tools to Add HTML5 Video to Your Websites

Wherever you sit within the HTML5 and Flash debate which is so hot topic these days, the truth is, more and more mobile or low-powered devices are now being shipped without having or with really minimal support with regard to Flash video. Webmasters, site owners, developers who utilize online video have to be cognizant of this reality. 

While it’s excellent that video web hosting services like Vimeo as well as YouTube support HTML5 which solutions for larger sites can be found from places such as Encoding. com as well as Brightcove, that still leaves users who wish to host their personal video content — however don’t necessarily make use of a platform like Brightcove — in a predicament. After just about all, in a ideal world, everyone who appointments a website will be able to view video, whether or not they are on the desktop or with an Android, or an iPod.

Luckily, there are numerous of great tools available free of charge. These HTML5 video tools can help you to serve video via HTML5 as well as support Flash, when a visitor’s internet browser doesn’t support HTML5, they will still be able view your video as Flash.

Want to know more about these useful HTML5 video software? Here we pick up some of the solutions you may like:

1. JW - Player for HTML5

JW Player for HTML5 uses jQuery and supports playback of H.264, Theora and FLV video. It also supports existing JW Player and PNG skins.

2. Kaltura HTML5 Video Solution

Kaltura supports OGG, H.264, FLV and MOV formats and is designed to work across browsers and fallback to Flash if necessary.

It is open source video solution with an HTML5 player and library. Already in use by Wikimedia (the Wikipedia people), the JavaScript library is built on jQuery and jQuery UI which means that the look and feel will be very easy to customize.

3. HTML5 Video Player

This is a video converter and player specially designed for making HTML5 videos and integrating HTML5 videos into websites with customizable video settings and skinnable video player settings. This HTML5 video tool can convert source videos into HTML5 video formats (mp4, ogg, webm) in batch mode, saves lot of time for web developers.

4. Video for Everybody

One of the unique aspects of Video for Everybody is that it does not use JavaScript. This is important for accessibility standards or for playback in applications, like RSS readers, that might not support JavaScript.

5. OSM - Open Standard Media Player

OSM is another open source video solution with an HTML5 player and library. It is written in jQuery to support HTML5 as well as Flash with customizable using jQuery UI’s ThemeRoller.

Are you using HTML5 video on your websites with any tools? Share with us in the comments!

Thursday, July 19, 2012

Shenzhen Hospital’s Reform 2012

China is the most populous nation in the world with 1.3 billion people. How does China provide such a huge population with health care? Are the Chinese happy with their social health system? Does it work well for the vast majority?
It is difficult to answer yes or no, as China is a huge country. The level and quality of medical care available depends very much on your location. The rural communities has long constituted the majority of Chinese population. Many of the remote villages are hours from doctors and hospitals and, if lucky, may have some sort of para-medical person. The big cities though have many first-class facilities. In today's China there is no need for the expatriate to go to Hong Kong or to return home for medical care.
In China, no money means no treatment, Shenzhen is with no exception. Without assurances that someone would cover the cost for the patient, no hospital would treat the patient and the hospital has no responsibility even if the patient dies due to no treatment. On June 18th, 2012, Shenzhen the Forth People’s Hospital introduced the new payment reform. “diagnosis and treat first, settle accounts later” came to exist for the first time in China health care.
This payment reform in Shenzhen 4th hospital is for patients’ good. It shortens wait times, prompt treatment is critical in emergency. The late treatment means no treatment in some circumstances for some patients.
However this Medical and health care reform in Shenzhen is currently carried out in the Shenzhen the Forth People’s Hospital only. Patients can take the advantage of this new policy in other Shenzhen hospitals, let alone patients outside of Shenzhen. And unfortunately only the city’s health-insurance holders are now covered. Without Shenzhen’s health-insurance, patients still need to pay for hospital services and treatment upfront, no money no treatment, if one dies, no complain.
But a serious question is how about the patients fleeing away without paying the bills in the hospital?
According to Shenzhen 4th people’s hospital director, 8,000 patients have thus far taken advantage of the service. Only a few patients are fleeing without paying. 47 patients have fled without paying. After the reminding from the hospital, 26 patients have since come back to pay for their treatment bills in the people’s forth hospital of Shenzhen. Still the rest 21 others have not paid their medical fees.