If all files are MP4, do I need a flash-fallback?

The PHP video script I’m using coverts all (accepted format) files to mp4 upon upload.
But the player code shows a flash fallback I believe. If all files are converted to mp4, prior to playing, is a flash-fallback at all necessary? If flash-fallback is not necessary can you help me tweak this player code so all files play in the video-js player, please? Any any other suggestions to improve this code are greatly appreciated:

<video id="_1200k.mp4" class="video-js vjs-default-skin"
preload="none" width="445" height="340" controls
poster="[var.thumb_file]" data-setup='{techOrder: [‘flash’,’html5’}'>
<source src="http://www.....com/uploads/[var.video_play]" type='video/mp4' />
<object class="vjs-flash-fallback" width="445" height="340" type="application/x-shockwave- flash" data="https://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="/flowplayer/flowplayer-3.2.16.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["/[var.thumb_file]", {"url":     "http://www.....com/uploads/[var.video_play]","autoPlay":false,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="[var.thumb_file]" width="640" height="264" alt="Poster Image" title="No video  playback capabilities." />

HTML5 video is not supported in IE8 or earlier, so it will need Flash if you want to support it.

But more significantly, MP4 video is not natively supported in Firefox or Opera, so those browsers would also fallback to the Flash. So even if you don’t care about IE8 and earlier, you still need the Flash fallback in this case, otherwise only Chrome, Safari and IE9+ will be able to play it at all.

And Flash video can only play MP4.

However the real problem with this implementation (IMHO) is its conversion of all formats to MP4. When using HTML5 video, it’s better to have two different video sources – MP4 and WebM – then all modern browsers will support it and you’d only need Flash for older IE.

But if you can’t change how the PHP script behaves, then the best thing to do is just leave it as it is.

What? I’m pretty sure they do.

MP4 doesn’t cover all systems though so ideally he has SOME sort of fallback for MP4. Perhaps try converting the MP4 to other HTML5 video formats. There are services online that can do this.

from https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats: “Chromium and Opera do not support the format” … “Firefox supports the format in some cases, but only when a third-party decoder is available, and the device hardware can handle the profile used to encode the MP4.”

And I tested all this when I built OzPlayer – MP4 is not natively supported by those browsers. Although Firefox can be provided with third-party support, this can’t be relied on.

But if you have two source elements, for MP4 and WebM, then all browsers which support native video will be able to play one or the other (well, unless you count Firefox 3 which only supports OggVorbis!)

Ah, ok. I was getting faulty information; googling some more has turned up more results - http://diveintohtml5.info/video.html

I always encode in multiple formats just to be safe.

It’s all very confusing … codec chaos!

But yeah, multiple formats is the way.

Sometimes that’s not possible though – e.g. Vimeo Pro can only give you an MP4. So in that case, Flash fallback is useful/necessary, because all browsers (with Flash) can play MP4 through that.

There are services online (and downloadable software) that encodes. I forget what I usually use but I’ve converted file formats in the past via random Google websites advertising their services. Takes a few minutes and I ensure browser compatibility.

Right :slight_smile: I usually use Miro Video Convertor for Mac – http://www.mirovideoconverter.com/

I always find the HTML5 Please site to be a useful reference for this sort of thing:

It mentions both Miro and Vid.ly as handy tools for converting video to the required formats.

1 Like

It seems that Firefox added MP4 support in v35.

Yes, I thought they had, but’s not always clear exactly what is and isn’t supported. http://caniuse.com/#feat=mpeg4

Thanks for your replies

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.