Web多媒体:编解码器和容器

In my experience, many web developers have a poor understanding of digital video technologies; as a result, the file size of the video they produce tends to be huge, and completely inappropriate for the web. Thus, my attempt at a guide.

以我的经验,许多Web开发人员对数字视频技术了解甚少。 结果,他们制作的视频的文件大小往往很大,并且完全不适合网络使用。 因此,我尝试进行指导。

In general, people trying to optimize video suffer from the same ignorance as those trying to optimize bitmap images: they do not understand appropriate format and compression. In video this is complicated by a common confusion between codec and container.

通常,尝试优化视频的人们与试图优化位图图像的人们一样无知:他们不了解适当的格式和压缩方式。 在视频中, 编解码器容器之间的常见混淆使情况变得复杂

编解码器 (codec)

A codec (for compressor-decompressor) is the algorithm used to lower file size. JPEG is a codec that is primarily used for still images; the MPEG codec is the equivalent for video.

编解码器 (用于压缩器/解压缩器)是用于减小文件大小的算法。 JPEG是主要用于静止图像的编解码器。 MPEG编解码器与视频等效。

Some typical video codecs include:

一些典型的视频编解码器包括:

codec NameRelease dateDescriptionUses
MPEG-11993

One of the oldest video standards, released in 1993 and now widely deployed. Its goal was to enable video playback from CD’s. Relatively low visual quality coupled with high file sizes meant that video standards quickly moved to MPEG 2. Layer 3 of the MPEG 1 codec is the basis for the popular .mp3 audio format

Video CD, SVCD, some low-quality DVD.
MPEG-21995

The world’s most popular codec, in terms of market penetration: every commercial DVD-video uses MPEG-2, as do most commercial digital cable and OTA television stations.

DVD, television. Some web video.
MPEG-41998

Significantly improved and more efficient codec. Actually contains two families of codecs (MPEG-4 Part 2 and MPEG-4 AVC / H.264.

MPEG-4 Part 2 codecs include: DivX, Xvid, FFmpeg MPEG-4 and 3ivx.

H.264 includes the eponymous codec, as well as x264 (an open-source encoder-only version of H.264), Divx Pro and Apple’s implementation of H.264.

Blu-Ray and HD-DVD; some web video.
WMV1999

Windows Media Video. Comes in several versions (WMV 7 – 9). WMV9 is standardized as the VC-1 codec.

Windows Media Files, limited use in Blu-Ray and HD-DVD
VP6 ~ VP82003

Proprietary codec by On2 Technologies; the most recent version (VP8) has been open-sourced by Google.

Limited use in web video.
Sorenson 32001

A codec made popular by its association with QuickTime; essentially the ancestor to H.264.

Web video, particularly movie trailers, but now superseded by H.264
编解码器名称 发布日期 描述 用途
MPEG-1 1993年

最古老的视频标准之一,于1993年发布,现已广泛部署。 其目标是启用CD的视频播放。 相对较低的视觉质量以及较高的文件大小,意味着视频标准Swift转向了MPEG2。MPEG1编解码器的第3层是流行的.mp3音频格式的基础

视频CD,SVCD和一些低质量的DVD。
MPEG-2 1995年

就市场渗透率而言,这是世界上最受欢迎的编解码器:每个商业DVD视频都使用MPEG-2,大多数商业数字有线电视和OTA电视台也是如此。

DVD,电视。 一些网络视频。
MPEG-4 1998年

显着改进和更有效的编解码器。 实际上包含两个编解码器系列(MPEG-4第2部分和MPEG-4 AVC / H.264。

MPEG-4第2部分编解码器包括:DivX,Xvid,FFmpeg MPEG-4和3ivx。

H.264包括同名的编解码器,以及x264(H.264的仅开源编码器版本),Divx Pro和Apple的H.264实施。

蓝光和高清DVD; 一些网络视频。
WMV 1999年

Windows Media视频。 有几种版本(WMV 7 – 9)。 WMV9被标准化为VC-1编解码器。

Windows Media文件,仅限在Blu-Ray和HD-DVD中使用
VP6〜VP8 2003年

On2 Technologies的专有编解码器; 最新版本(VP8)已由Google开源。

网络视频使用有限。
索伦森3 2001

通过与QuickTime结合而流行的编解码器; 本质上是H.264的始祖。

网络视频,特别是电影预告片,但现在已被H.264取代

Generally speaking the more recent the codec the better the compression, bandwidth use and image quality, and thus the smaller the file size; H.264 is better than MPEG-2 on almost all counts. On the other hand, older codecs tend to have a wider range of support: almost every piece of digital AV equipment made in the last fifteen years understands MPEG2; fewer understand H.264. As always, choices are a tradeoff between ubiquity and efficiency.

一般来说,编解码器越新,压缩,带宽使用和图像质量越好,因此文件大小越小; 在几乎所有方面,H.264都比MPEG-2更好。 另一方面,较旧的编解码器往往具有更广泛的支持:在过去的15年中,几乎所有的数字AV设备都可以理解MPEG2;而在过去的15年中,几乎所有的数字AV设备都可以理解MPEG2。 很少了解H.264。 与往常一样,选择是普遍存在和效率之间的权衡。

容器 (container)

A container is a “wrapper” format around encoded media. A container format, in and of itself, does not say anything about the type of media inside of it, or the codec used to compress that media, although there may be strong associations between certain codecs and containers.

容器是围绕编码媒体的“包装”格式。 一种容器格式,和其本身的,并没有说明用于压缩该介质,虽然可能有一定的编解码器和容器之间的强关联的它的内部介质类型,或编解码器什么

Some examples of containers used for video are: Quicktime (.mov), Windows Media Video (.wmv), Audio Video Interleave (.avi), Real Media (.rm), Matroska (.mkv) and Flash Video (.flv or .f4v).

用于视频的容器的一些示例包括:Quicktime( .mov ),Windows Media Video( .wmv ),Audio Video Interleave( .avi ),Real Media( .rm ),Matroska( .mkv )和Flash Video( .flv.f4v )。

Again, it is very important to distinguish between container and codec. The codec is the method with which media is encoded; the container is the wrapper around the content. The container format often implies that a particular application should be used for playing back the content (QuickTime for .mov, Flash Player for .flv, etc).

同样,区分容器编解码器非常重要。 编解码器是对媒体进行编码的方法。 容器是内容的包装。 容器格式通常意味着应使用特定的应用程序来播放内容( .mov的 QuickTime, .flv的 Flash Player等)。

One reason that many people get confused between containers and codecs is that either may be used as the suffix of a file. For example, test-movie.mov is a container file that could contain anything at all; test.mp4 is a video file encoded in H.264 MPEG-4.

许多人在容器和编解码器之间感到困惑的原因之一是,两者都可以用作文件的后缀。 例如, test-movie.mov是一个容器文件,可以包含所有内容。 test.mp4是以H.264 MPEG-4编码的视频文件。

翻译自: https://thenewcode.com/104/Web-Multimedia-codecs-and-containers

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值