Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

What is the best video format for the web?

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
petewinter
Asked:
petewinter
  • 2
  • 2
2 Solutions
 
gizmolaCommented:
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
 
petewinterAuthor Commented:
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
 
gizmolaCommented:
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
 
petewinterAuthor Commented:
Many thanks for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now