Player/Codecs to use for site to be mobile device friendly

Hi,
I posted a thread earlier dealing with mobile devices and websites in the general development forum, but since i got no replies I figured I would try here as well.

Hi,

I’m building a site where users can upload video clips. I want users with mobile devices such as Iphone and Android based smart phones to be able to watch the videos, but I know that phone and Android are a little picky when it comes to video codecs/formats.
I did some reading but I’m still a little confused so I would appreciate a little help here putting the pieces of puzzle in my brain in place

I know that Iphone and some versions of Android don’t support Flash, So its best if by default the site uses HTML5 and fall back to a Flash player for non supporting browsers. And I know that Iphone can only play videos encoded in H264 codec with an mp4 or m4v format.

My questions are:

  1. Do I need two versions of each video? one H264/mp4/m4v for HTML5 to play if possible and another flv to be played for the Flash fallback option?
  2. or Can I use Flash player to play mp4/m4v files too?

Hope someone could at least point me in the right direction…

thanks in advance

  1. Use h.264 base format, with mp3 audio then it can be played by pretty much any modern mobile device and will play via flash too. Make sure the moov atom is correctly positioned e.g using this http://renaun.com/air/QTIndexSwapper.air and then it’ll stream fine

Thanks for replying EastCoast

  1. From what i have read (and ended up more confused), there are various encoding rates at which h.264 can be encoded, and it’s best practice to supply a few versions that mobile devices can automatically choose from depending on the quality of their internet connection. Is that true / something I should consider ?

  2. For Firefox/Opera I would still need to supply a OGG video file right?

  3. Could you please tell me a little about what moov atom is?

thanks!

  1. You can encode at any bitrate you want with h.264. The device itself won’t automatically choose between streams, this is a function of either clientside player coding and/or server software with adaptive bitrate streaming.

  2. Personally I wouldn’t implement a different file for one browser,particularly when h.264 file + flash playback covers the majority of firefox users.

  3. The moov atom is a chunk of metadata. If it’s not positioned at the start of the stream, then the player will typically wait until all the video has loaded to the end before starting playing, which you don’t want.

  1. So what is the recommended bit rate?
  2. You mean only use HTML5 for webkit browsers and let Firefox users fall back to a Flash player? If so, are you basing this on the assumption that mobile devices currently hardly use Firefox mobile?

Thanks for your replies, they are very informative

  1. Depends on frame rate, frame pixel dimensions, content motion.
  2. I generally display a flash video player using swfobject that overrides an html5 video tag when flash is available.
    Firefox Mobile is such a tiny percentage it’s not worth bothering about (incidentally I’ve tried it on my phone- it’s awful compared with webkit/opera).