MP4 videos with FLV fallback Scripting - Demo 6 / 7
The Goal
We want to show high quality videos for Flash clients whose version is greater than 9.115. Older versions will see normal FLV videos. This info box will display your situation and below is a working example and its configuration.
</head>
<body>
<!-- setup player container -->
<div id="player" style="width:400px;height:300px"></div>
<!-- flowplayer configuration -->
<script>
$f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf", {
clip: {
baseUrl: 'http://blip.tv/file/get',
// play M4V with Flash 9.115+ versions, otherwise play FLV
url: flashembed.isSupported([9, 115]) ?
'KimAronson-TwentySeconds6421.m4v' : 'KimAronson-TwentySeconds6421.flv'
}
});
</script>
The trick here was to use flashembed's isSupported method. All of flashembed's static methods are available because this tool is included in the Flowplayer script.
M4V encoding is used on the video which provides the best video quality you can have on the web today together with a relatively small file size. Typical video formats such as MPG or MOV does not work with Flash and they must first be converted to MP4, M4V or FLV. Take a look at this forum post about MP4 (or H.264) video conversion.
FLV fallback is used to provide a regular FLV video for those Flash clients that do not support support MP4. MP4 support was added to Flash in version 9.115 and lower versions can only play FLV files. You should note that the FLV format is not a bad format. It provides a small file size with relatively good quality. the FLV format can be optimized with a technology called "ON2" and you can find more information about it here.