Solved

What is the best video format for the web?

Posted on 2011-03-08
4
519 Views
Last Modified: 2012-05-11
What is the best video format to use on websites. Previously I have used FLV files, but this doesn't work on iphones and ipads. What does You Tube use?

Also how do I combine with a you tube style control panel that let's you enlarge to full screen size?
0
Comment
Question by:petewinter
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
gizmola earned 500 total points
ID: 35073221
Youtube uses flash video.  You are correct that apple refuses to support flash.  The solution that websites use to support mobile applications is to detect the device and offer an alternative version of the video, so basically they maintain multiple different versions of the content, and serve up whatever the device can support.  What the ipad and iphone support is mpeg4 files (.mp4) with the H.264 codec.  The specifications of various devices differ, so you still have to make choices in regards to the format you use.  This article provides the specs of the iphone and ipad and some common configuration settings you would use with the popular Max Handbrake encoding application, although there are choices for every platform that will let you encode video.  While there is no one size fits all solution that works with every platform.  Mpeg4/H.264 is a good choice due to its wide adoption for mobile devices.  One technology to keep an eye on is html5 video which aims to address the issues with flash video adoption, however, at present there are a lot of reasons it isn't being widely adopted by websites for PC/Browser content delivery, although for IPads, html5/h.264 works well.  Regardless, you're going to have to detect the user agent and serve different sites by device, but that just makes sense for the mobile world.

http://en.wikipedia.org/wiki/HTML5_video
0
 

Author Comment

by:petewinter
ID: 35073355
Thanks that's great help.

I assume the best solution for now is to upload a FLV and mpeg version then use a script to check what browser the request has come from.

Do you know how to do this? Have you got a script?
0
 
LVL 4

Assisted Solution

by:gizmola
gizmola earned 500 total points
ID: 35073677
The basics of it in PHP is that you check the value of the $_SERVER['HTTP_USER_AGENT'] variable which comes in the HTTP header with every request.

You then need to parse it to determine what to serve.  

This site is an amazing reference on Mobile browser id's and should help you figure out what to search the user agent string for, to determine what you want to serve up.  

http://www.zytrax.com/tech/web/mobile_ids.html
0
 

Author Closing Comment

by:petewinter
ID: 35082455
Many thanks for your help.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question