Solved

What is the best video format for the web?

Posted on 2011-03-08
4
514 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

778 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