H264 primer - A layman’s guide - by KUSH AMERASINGHE

来源:互联网 发布:游戏社交软件是什么 编辑:程序博客网 时间:2024/06/05 02:16

原文pdf版下载地址: http://download.csdn.net/detail/coloriy/8996231


H.264 is taking the web video world by storm. This relatively new technology is as intriguing as it is mystifying. As a person who didn’t have the patience to understand all the intricacies of how this marvel actually works, yet who was keen to get the best it has to offer, I had my own awkward share of learning experiences (that made me feel like a teenager again).But, seeing how hard it is to get the rundown on this subject (at the time of this writing),I thought there might be other people out there who might benefit if I shared what I have learned so far.

The aim of this text is not to go into a comprehensive explanation of how H.264 works or all its possible applications. Rather, I’ll try to explain the underlying parameters in a less less technical fashion so that the average web video publisher can make more informed decisions when choosing various options and determining the optimal values to critical parameters of H.264 specifically applied to Adobe® Flash® Player.


The main components of this text include:

• A layman’s guide to video compression and F4V

• Explanation of F4V-specific Adobe Media Encoder and Adobe Flash Media EncodingServer settings

• A case study of estimating an acceptable bit rate for a given video.

The versatility of H.264


H.264 is a highly sophisticated, yet versatile technology intended to serve a wide variety of applications ranging from highly compressed, low-frame-size teleconferencing to large- format,  cinema-quality  file  encoding.  Using  a  technology  with  such  a  vast  usage  range for  the  relatively  narrow  field  of  web-based  video  (which  is  constantly  being  redefined regarding  where  in  the  quality  spectrum  it  falls  as  Internet  bandwidth  and  technology adaptation improves) can be challenging. The degree of control H.264 offers coupled with the complexity of the compression methods themselves can be overwhelming to newcomers and seasoned web video producers alike.

The suitcase metaphor

旅行比喻

I like to think of video compression as somewhat similar to packing suitcases for a trip. I hope this is something most of you can relate to. Even if you are not a globe-trotter, at some point you must have faced with the challenge of getting the most amount of cloths you can carry in a given suitcase while preserving the best condition of the cloths when you get to your destination. I will keep coming back to this analogy to describe several aspects of video compression where applicable.

视频压缩比喻成打包旅行

Codecs

A codec is a particular technology or method used to compress an electronic signal, such as a video or audio recording. The various codecs are often simply different ways of doing the same thing, yet one codec may have no direct relation to another. Each codec has its advantages and disadvantages. Usually newer codecs provide better efficiency and quality,while older codecs reach a wider audience. The most commonly used video codecs to compress video for Adobe Flash are H.264, On2 VP6, and Sorenson Spark. H.264 was introduced in Adobe Flash Player 9.0.r115. On2 VP6 was the older codec introduced in Flash Player 8. Sorenson Spark is the oldest of the codecs supported in Flash Player,introduced in Flash Player 6.

Codec是一种压缩数据信号的技术,不同的codec使用不同的方法达到相同的目的。每个codec都有优点和缺点。通常,一种新的codec会提供更加良好的性能与压缩质量。

Compatibility

At the time of this writing, some version of Flash Player was installed in approximately 98% of the computers connected to the Internet in the world. Out of this, the proportion of users still using Flash Player 6 or older is negligible in most geographies. The adoption of new Flash Player versions capable of playing the latest H.264 codec is about 90% of this user base. This makes H.264-encoded video for Flash the most attractive option for general video distribution applications.

兼容性使得基于H264编码的视频成为一般视频发布的首选。因为Flash Player被安装在全世界98%的电脑上,而Flash Player能够支持90%的基于H264压缩的视频内容。

Choosing a codec

There are other factors to consider when choosing a codec. While some users have the software capability to play back H.264, their practical CPU capabilities and available network bandwidth, along with the particular settings (or range of settings in case of multi-bit encoding) actually used to serve the videos, could greatly affect the quality of the experience these users receive. If your target audience is a highly specialized group (say,from a particular country or region, age group, or other such group), the proportion of such users in such a group may (or may not) be different from that in the general audience.For example, the relative higher quality-to-data rate ratio of H.264 generally comes at the price of relatively higher demands of processing power; such processing power may not be affordable by the audience for which you intend your video.Also, since codecs are simply different ways of compressing the signal, rather than a linear series of incrementally improving specifications, some methods may better suit specific needs than others. For example, an FLV file encoded using On2 VP6 can contain an alpha channel that could be used to create interactive transparent video to be used in a Flash application, while H.264 in Flash currently doesn’t support alpha channels.Yet, I believe that H.264 is the overall winner so far in terms of its advantages and the ability to efficiently distribute high-quality, large-format video (even compared to current competing codecs not available in Adobe Flash Player). For this reason, I will focus mainly on the use of this technology specifically applied to Flash Player.

0 0
原创粉丝点击