H.264/AAC supports in Flash Player 9

来源:互联网 发布:java判断是不是小数 编辑:程序博客网 时间:2024/05/18 22:43
H.264/AAC supports in Flash Player 9

It's well known that the H.264 and AACdecoding has been supported by the new Flash Player 9 Update3(9.0.115), which may mean a whole new era for high-definition video tobegin. In order to witness the great power of new Flash player, I didsome experiments on H.264 encoding and compared their results with thetraditional FLV videos(a variant of H.263). Generally speaking, the comparing result isreally impressive: Both videos of FLV and H.264 (within an encapsulatedform of .mp4) could be progressively downloaded and played online. With some fine-tuning of the H.264 encoding parameters, it’spossible to shrink the video size by half and while at the same time togain equivalent or even much better graphical quality than the FLV one! Really awesome, isn’t it?:)

Below is one of my prelimentary tests, a 9.8MB demo for starcraft 2.As you can see, the quality of this H.264 video is practically quiteclose to a FLV equivalent with a fairly high bit-rate of 1200 kbps, butin the matter of fact, its average bit-rate has only 550 kbps, whichcould be affordable for most of the typical users on Internet I think.

 

 

 

At the end of this article I packed up some troubles that I'dcounted before, and  I also provided their answers for convenience.Hope that they may also be useful for you.

= Concise F.A.Q for working with H.264 in Flash Player =

Q: Why can’t I play the demo in my browser!?
A: Adobe Flash Player 9 Update 3 (9.0.115 or above) and related plug-in are required. Plz refer to here for further information.

Q: How can I encode my video clips with H.264 codec?
A: x264 is my personal favors to do that job. It's open-source and totally free.

Q: How can I place the H.264 video clips in my web pages?
A: You‘ll need some Flash video player and embed themin your page just like a normal .swf object. As far as I know, thereare 3 typical online players to choose: Vcastr (light-weight), JW Flv Player (moderate) and FlowPlayer (comprehensive). They're all free. You can also use the SWFObject library to facilitate the configuration of these embedded players.

Q: Why is my progressive H.264 video not playing in the player until entire file is downloaded?
A: One important thing about playing an H.264 video file as progressive download is that the moov atom forindexing needs to be located at the beginning of the file, or else theentire file will have to be downloaded before it begins playing.Unfortunately, tools such as FFmpeg place this information at the end of the file by default. You should use qt-faststart to fix this annoying problem.