`
jubincn
  • 浏览: 242468 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
文章分类
社区版块
存档分类
最新评论

An Overview of Audio and Video Transcoding 转自:http://www.longtailvideo.com

阅读更多

转自:http://www.longtailvideo.com/support/blog/12633/an-overview-of-audio-and-video-transcoding

 

This post will try to peel away some of the layers of confusion surrounding media conversion by describing how media are stored, why you might want to convert from one format to another, and tools you can use to do it.

What Is Transcoding?

Transcoding is usually something that happens behind the scenes. For example, when you take a video with a Flip or other handheld video camera and upload it to YouTube, the file is transcoded by YouTube into various formats for distributing and displaying to viewers. You don't see this happening, but it is why videos are not immediately viewable on the site after uploading them. Once the transcoding has finished, you are able to show the video to your users or friends.

To understand what transcoding is, you need to first understand how digital media are stored. A digital media file generally consists of a container with metadata information like the dimensions and duration of the file, along with any number of tracks. Commonly a media file contains an audio track, a video track, and sometimes a subtitle track. Each of these tracks has been encoded (using a codec) into a format that tries to maximize quality while minimizing file size. These encoded tracks are interleaved (or multiplexed) into the container, meaning that they are stored as something like this: a chunk of audio, a chunk of video, the next chunk of audio, the next chunk of video, and so on.

Transcoding is the process of taking digital media, extracting the tracks from the container, decoding those tracks, filtering (e.g. remove noise, scale dimensions, sharpen, etc), encoding the tracks, and multiplexing the new tracks into a new container. Transcoding is most commonly done to convert from one format to another, e.g. converting a DivX AVI file to H.264/AAC in MP4 for delivery to mobile devices, set-top devices, and computers. The basic pipeline looks like the following:

/ decode audio -> filter -> encode \ demultiplex -> decode video -> filter -> encode -> multiplex \ decode subtitles -> filter -> encode /

Why Transcode?

There are a number of reasons for transcoding your media. You may want to convert a high-quality original edit to a digital distribution format easily sent to customers over the Internet, like H.264/AAC in an MP4 container. Or you may want to convert your high-quality music library, stored in AAC or Vorbis, for your music player that only supports MP3 files. Often, you may want to target a specific platform or device, like Adobe Flash, that supports a limited set of formats and thus need to convert your media library to a suitable format for proper delivery. You may even have old MPEG2 HDV tapes that you want to transcode to H.264 High Profile to save 40% of the storage space while losing no noticeable quality.

Some things to keep in mind about transcoding:

  • Transcoding always lowers quality*
  • Transcoding can take a long time, depending on formats and settings
  • The newest formats and codecs are not always best
  • Remember your intended audience and their decoding ability (e.g. phones)

* Quality is not lost with lossless formats, but the vast majority of formats are not lossless!

Common Formats and Codecs

You will undoubtedly run into many new and confusing terms as you explore the digital media landscape. It's probably best to try and familiarize yourself with some of the more popular containers and codecs.

Containers

MP4
MPEG4 system container, used by Quicktime and Adobe Flash. This container is quite versatile and has excellent support almost everywhere (from phones to computers).
Extensions: mp4, mov, m4v, m4a, m4b, m4p, f4v, 3gp, 3g2
SynonymsMPEG4 Part 14, ISO/IEC 14496-14
WebM / Matroska
A versatile container similar in concept to the MPEG4 system container. WebM uses a subset of Matroska to create a container optimized for web media and HTML5. Adobe has also recently announced plans to support WebM in the Flash player.
Extensions: webm, mkv
AVI
Microsoft's generic container format. This can generally store anything and everything. It has excellent support on most computers.
Extensions: avi
FLV
Adobe Flash media container which is useful for storing legacy Flash content and for low-latency live streaming. Adobe's newer format is F4V, a subset of the MPEG4 system container.
Extensions: flv

Video Codecs

H.264
Widely considered the best video codec in the world. This video codec is what powers YouTube, Bits on the Run, and more.
SynonymsMPEG4 Part 10, MPEG4-AVCAVC, ISO/IEC 14496-10
VP8
A new video codec for web media, completely free and comparable to H.264 in quality. It was originally developed by On2 but then bought and released for free by Google. This codec is part of the WebM Project.
MPEG4 Video
Last-generation video codec, still widely used in the piracy and home DVD player scene. It requires more file space than H.264 for the same quality, but encodes and decodes faster.
Synonyms: DivX, Xvid, MPEG4-ASP, MPEG4 Part 2, ISO/IEC 14496-2
MPEG2 Video
Video codec generally used on DVDs. It is a few generations old, but given a sufficiently high bitrate the quality is quite good. MPEG2 is also one of the official video codecs for Blu-ray.
SynonymsMPEG2 Part 2, ISO/IEC 13818-2
Flash Video
Sorenson H.263 for Flash, used before Flash supported H.264. This is also an older generation codec, but is useful for low-power devices that cannot support H.264 or VP8.

Audio Codecs

AAC
Advanced audio codec, widely used by Apple and many portable devices. It can support mono, stereo, and surround sound. Currently the highest quality widely-used lossy audio codec.
SynonymsMPEG2 Part 3, MPEG4 Part 3, ISO/IEC 13818-3, ISO/IEC 14496-3
Vorbis
Completely free and open audio codec comparable to AAC. Widely used by game developers and Linux/BSD users, this codec is now also part of WebM which will probably mean wider adoption.
MP3
Older but still extremely widely used audio codec. It has the advantage of being supported everywhere and by most every device in existence.
SynonymsMPEG1 Layer 3 Audio, MPEG1 Part 3, MPEG2 Part 3, ISO/IEC 11172-3, ISO/IEC 13818-3

How to Transcode

There are literally dozens of commonly used formats and many, many software packages that can handle converting between different formats for you, though the speed, quality, and supported input and output formats differ between much of the software. There are even online services setup specifically to transcode media for a fee. If you are willing to get your hands dirty it is quite easy to get free and open source tools that will handle most any format you throw at them.

There exist many third party services online that will transcode files (many for a small fee), such as Movavi Online ConverterMedia ConvertZamzar, and more. These services require that you upload the media file to them, then later download the transcoded result back to your system.

It is also possible to convert media files on your own computer, using both free / open source and proprietary software. Free tools such as Media CoderHandbrake, and VirtualDub will let you convert and even do some basic editing. QuicktimeAny Video Converter, and many other software packages that can be bought offer these features as well. If you are more interested in getting your hands dirty, you can go right to the source of the tools most of these products use to do the actual transcoding: FFmpegFAACx264, and WebM.

If you're comfortable with the advanced tools, then using Free and Open Source software like FFmpeg andlibx264 is highly recommended. You get a community of video experts helping you, and they can be very friendly when you try to help back. You save money by not licensing large proprietary tools and you get some of the best quality output in the industry.

Hopefully you found this brief overview helpful. Watch this space for more in-depth discussion on this subject including: transcoding your first video, selecting the optimal formats & codecs, choosing the right tools, and more.   Learn more about Transcoding Best Practices here.


 

分享到:
评论

相关推荐

    ionic cordova android安装教程

    - 访问Oracle官方网站:[http://www.oracle.com/technetwork/java/javase/downloads/index.html](http://www.oracle.com/technetwork/java/javase/downloads/index.html),下载适用于您操作系统的JDK版本。...

    Udemy-TensorFlowComPython:研究资料:https://www.udemy.comcoursetensorflow-machine-learning-deep-learning-pythonlearnlecture12670278#overview

    TensorFlow:机器学习和深度学习com Python TensorFlow:使用Python的机器学习和深度学习... 入门资料: ://www.udemy.com/course/tensorflow-machine-learning-deep-learning-python/learn/lecture/12670278#overview

    使用pcs api往免费的百度网盘上传下载文件的方法

    百度官方pcs api文档:http://developer.baidu.com/wiki/index.php?title=docs/pcs/overview,上面有各种语言的SDK,我用的laravel5,直接导里面的php SDK还用不了,稍做了修改才能用的。 看完上面两篇文章,基本就...

    HLS-WWWDC-2017

    - **MPEG-2 Transport Streams**: This format is commonly used for broadcasting and supports multiple audio and video streams within a single file. - **Fragmented MPEG-4**: Suitable for streaming ...

    Java可执行文件

    详情见官网:[http://www.ej-technologies.com/products/exe4j/overview.html](http://www.ej-technologies.com/products/exe4j/overview.html) - **NativeJ**:提供了一种简单的方法将Java应用程序转换为本机可...

    打造ThinkPHP最好的OSS Storage扩展.rar

    2. 开通对象存储OSS:https://www.aliyun.com/product/oss?userCode=uajcixh1 3. 创建Bucket:https://oss.console.aliyun.com/overview 4. 获取AccessKeys:https://usercenter.console.aliyun.com/#/manage/ak ...

    C#学习网址总结

    2. **Telerik Silverlight控件文档**:[http://www.telerik.com/help/silverlight/raddocking-overview2.html](http://www.telerik.com/help/silverlight/raddocking-overview2.html) 此链接提供了Telerik公司针对...

    AB资料下载PLC

    - **AB Firmware下载**:[http://www.rockwellautomation.com/rockwellautomation/support/firmware/overview.page](http://www.rockwellautomation.com/rockwellautomation/support/firmware/overview.page) - 提供...

    MTK AOSP Kernel Overview

    MTK AOSP Kernel Overview文档详细介绍了基于MediaTek芯片的安卓开源项目(AOSP)内核开发相关的内容。本文档是MTK Android固件开发中的重要参考资料,为开发者提供了关于内核驱动结构调整、Kconfig配置和驱动程序...

    BD:https://www.udemy.comcourseoracle-administracion-de-base-de-datoslearnlecture20191180#overview

    Oracle:达托斯基地管理https://www.udemy.com/course/oracle-administracion-de-base-de-datos/learn/lecture/20191180#overview第1节:简介1级 1. Introducción al curso2类 2. Contenido del curso3级 3. Nota ...

    Steema TeeChart Pro VCL FMX Source Code 2017.20

    TeeChart v2017 ... All Rights Reserved. http://www.steema.com ...For an overview of new functionality and properties implemented please visit http://www.steema.com/linkIn/WhatsNewVCL

    Firmware-master.zip

    [Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview) [![Gitter](https://badges.gitter.im/Join Chat.svg)]...

    数据集-目标检测系列- 推土机 检测数据集 bulldozer >> DataBall

    解析脚本地址:https://gitcode.com/DataBall/DataBall-detections-100s/overview 脚本运行方式: * 设置脚本数据路径 path_data * 运行脚本:python demo.py 样本量: 130 目前数据集暂时在该网址进行更新: ...

    一个简单的WebGL的demo,软件Chrome,硬件Google cardboard

    It uses WebGL and #Three.js# to handle the 3D graphics and camera controls. See inline comments for tips. This code is purely experimental, so please keep that in mind when developing. Want to ...

    Steema TeeChart Pro VCL FMX 2023.39 For Delphi 12

    For an overview of new functionality and properties implemented please visit http://www.steema.com/linkIn/WhatsNewVCL Bugfixes/changes: ------------------------- For a full list of all new features...

    NDK Camera

    Please reference the [test codes](./android/test/ndcam/). ```console $ gradle connectedAndroidTest # Run test ``` ### Use The following code shows working with `SurfaceView` class. ```java package...

    将Java程序作成exe文件的几种方法

    更多关于 Exe4j 的信息可以参考其官方网站:[http://www.ej-technologies.com/products/exe4j/overview.html](http://www.ej-technologies.com/products/exe4j/overview.html)。 #### 2. JBuilder JBuilder 是一个...

    Android代码-学习RxJava操作符的APP

    > app中用到的数据来自:https://github.com/jiang111/RxDocs fork自: https://github.com/mcxiaoke/RxDocs > 介绍的操作符并不是全部操作符,大都是我们常用的,想要看全部操作符,请移步:...

    Ebay API技术开发白皮书

    - **Product Overview**:提供了一个总体的产品概览,可访问链接:[http://developer.ebay.com/products/overview/Default.aspx](http://developer.ebay.com/products/overview/Default.aspx)。 - **API by feature*...

Global site tag (gtag.js) - Google Analytics