4

I need to play an M-JPEG encoded movie on HTML5 .

Do you know which container (mp4, avi, webm, ogv, etc.) and browser (chrome, safari, etc.) can play this?

Ory Band
  • 14,716
  • 14
  • 59
  • 66

1 Answers1

3

Safari and IE9 are supposed to use system codecs, so they could play M-JPEG if user has appropriate codec.

In other browsers you could try embedding it using <object> element, which may find some suitable plug-in.

However, browser vendors don't want to support ton of crappy codecs and odd containers. Don't expect anything else than H.264 and WebM to work (and you need both).

Your best bet is to re-encode the video. Even fast/low-quality encode of H.264 and WebM is going to give you compression much much better than M-JPEG.

Kornel
  • 97,764
  • 37
  • 219
  • 309
  • 1
    The original reason I wanted to do this was to be able to do accurate frame seeking on videos in the browser. I eventually found out this is doable in "standard" (WebM H.264) encoded videos in browsers. At least in Google Chrome (Was the first to implement this). You do this by calculating the time oyu want to get, taking account the frame rate. – Ory Band Jun 04 '11 at 16:41