-->
Save your FREE seat for 流媒体 Connect this August. 现在注册!

生产H.264 Video

文章特色图片
文章特色图片

H.264是目前使用最广泛的编解码器, whether for streaming via Flash or Silverlight or for the Apple iPod, iPhone, 和iPad产品线. 如果你和H.264 before, the format is old hat for you. But if you're cutting over from VP6 or Windows Media or expanding distribution to H.264-compatible devices, you're faced with a learning curve.

我们是来帮忙的. In this article, I'll detail what you need to know to produce H.264 files for streaming or device playback. Our target reader is the novice working with encoding tools such as Adobe Media Encoder, 苹果公司的压缩机, 索伦森挤压, 和Telestream Episode Pro. If you're looking for help with more advanced tools, they simply provide too many options to address in an introductory article.

你的个人资料是什么??
与H.264, it's critical to adopt Stephen Covey's advice: "Begin with the end in mind.对于设备来说尤其如此 ozer264f1playback, because if you produce a file incorrectly, it won't load or play on your target device.

From a compatibility standpoint, the most important encoding parameter compatibility is profile. 这 defines a set of encoding techniques that can be used to create the encoded file. H.264 standard defines 17 different profiles, with the three most relevant to streaming shown in 图1, a table adapted from one presented by Wikipedia (http://en.wikipedia.org/wiki/The H.264). 如你所见, the encoding techniques are presented on the left, and each successive profile deploys additional techniques to produce the encoded file. 这 produces a higher-quality file but also one that's harder to decode.

为什么是17个配置文件? Because they serve as convenient compatibility points for hardware developers and video producers. For example, Apple designed the iPod to play H.264 video produced using the Baseline profile, balancing factors such as CPU and memory cost as well as LCD resolution. 如果你在为iPod制作视频, so long as you encode using the Baseline profile (and the appropriate level, 稍后讨论), the file will load and play on the iPod.

因此,规则No. 1代表H.264 encoding is to know the highest profile supported by the playback device you're targeting. 幸运的是, 多数制造商, 特别是苹果, do a nice job laying out these specs in their product materials, 所以先查看他们的网站.

另一个H.264-related parameter that you'll typically see on these spec pages is the "level." For example, according to Apple's website, the iPad will play "H.264 video up to 720p, 30 frames per second, Main Profile level 3.1.“作为解释, levels further subdivide the profile regarding parameters such as resolution and data rate. 如果你访问H.264 page on Wikipedia, you'll learn that level 3.1 for the Main Profile has a maximum bitrate of 14Mbps and maximum resolution of 1280x720p. If you exceed these specs on a file destined for the iPod, you run the risk that iTunes will kick the file back out during the syncing process.

So, 为设备生产时, 一旦你知道了档案和等级, you have a pretty good idea how to encode your video. 如果是为电脑制作呢?

制作Flash和Silverlight
Both the Flash and Silverlight players can play H.264 files encoded using all three profiles, so unless you're attempting to produce a file that plays on both computers and other devices, 高调行事. 通常, 当你为电脑生产时, 水平无关紧要, since the relevant player doesn't check the level before attempting to play the file. 而不是, the most relevant considerations for computers are the resolution and data rate of the actual video file, which will determine whether that computer can play the file smoothly.

来解释, if you try to play a 1080p file produced at 12Mbps on a Pentium 4-based computer, chances are the file won't play smoothly. 这, 当然, has nothing to do with profile or level; there are simply too many pixels for the older computer to push. So, where producing for devices is all about meeting the designated profile and level, producing for computers is all about the configuration of the compressed video file, 我稍后会详细讨论这个问题.

出于这个原因, most encoding tools don't let you select a level, 和一些, 比如Telestream Episode Pro, let you click a check box to automatically adjust the level to match the selected encoding parameters. 偶尔, 使用Adobe Media Encoder等工具, which does allow you to restrict encoding to a designated level, you may get an error message if you attempt to encode using parameters that exceed that level.

例如,如果您将级别设置为3.1 for the High Profile and attempt to encode at 1080p, Adobe Media Encoder will let you know that you've exceeded the parameters for level 3.1. 如果你真的想生成那个文件, you simply boost the level setting to level 4, and Adobe Media Encoder will produce the file.

流媒体覆盖
免费的
合资格订户
现在就订阅 最新一期 过去的问题