Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What is the best video format for the web?

Posted on 2011-03-08
4
Medium Priority
?
539 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
gizmola earned 2000 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 2000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
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.

688 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