DirectShow - 它是什么?
What is Microsoft's DirectShow, and how does it relate to:
- codecs?
- containers?
And what is the exact difference between codecs and containers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
简而言之:
编解码器是一段算法和/或代码,用于将音频或视频从原始格式转换为编码格式并返回;编码器和解码器。
对于视频,RAW 格式将是内存中的像素,对于音频,它将是样本。
容器是一种将编码数据写入硬盘驱动器上的文件的方法。或者将编码数据写入流中以进行互联网传输的方法。
In plain English:
Codec is a piece of algorithm and/or code that will transform audio or video from RAW format to coded format and back; encoder and decoder.
In case of video, RAW format will be pixels in the memory, and in case of audio it will be samples.
Containers are a way to write encoded data into a file on the hard drive. Or a way to write encoded data into the stream for internet transmission.
第 1 部分:DirectShow
DirectShow 是 Microsoft 开发的基于 COM 的多媒体框架。 DirectShow 架构的过滤器方面类似于 Unix Pipes 通过可配置的管道发送多媒体内容来处理多媒体内容,其中包括:
一般而言,DirectShow 框架支持以下功能:
过去,软件开发人员使用 C++ 和 DirectShow SDK 来开发解决方案。尽管如此,也可以使用 COM 兼容的编程语言。
第 2 部分:格式、容器、压缩和编解码器
在阅读了有关该主题的大量文章后,我可以肯定地说的一件事是,这些术语在整个行业中的使用并不一致!据我了解...
容器{格式}
容器或容器格式可以被视为信封 - 不同类型的内容(例如音频、视频、元数据等)可以是保存在同一个信封内。例如:去年夏天,您可能收到了一个信封,其中包含您叔叔鲍勃关于他最近钓鱼之旅的一封信和照片。
正如信封独立于其中所含内容一样,容器也是如此。例如:H.264 编码的视频和 AAC 编码的音频可以存储在同一个 *.MP4 容器文件中。或者,*.MP4 容器文件可以保存 MP3 编码的音频。”
压缩{格式}(又名压缩方案)
从软件开发的角度来看,压缩格式可以被认为是描述数据如何持久化的规范,换句话说,用于表示序列化数据的数据结构
将是无损或压缩格式 。 em>lossey
编解码器(又名压缩器-解压缩器、编码器-解码器)
编解码器是一种硬件设备或软件应用程序,它使用复杂的算法来编码或解码多媒体内容(例如音频、视频、隐藏式字幕等)。
请注意:术语编解码器经常被误用来指代压缩格式(例如 H.264)或容器格式(例如 MP4)。
示例
容器格式
压缩格式
编解码器
附加说明
参考
PART 1: DirectShow
DirectShow is a COM based multimedia framework developed by Microsoft. The filter aspect of the DirectShow architecture is similar to Unix Pipes in that you process multimedia content by sending it through a configurable pipeline which includes:
Generally speaking, DirectShow framework supports the following features:
In the past, software developers used C++ and the DirectShow SDK to develop solutions. With that said, COM compatible programming languages can also be used.
PART 2: Formats, Containers, Compression and Codecs
Having read numerous articles on the subject, the one thing I can say for certain is that these terms are not used consistently throughout the industry! It is my understanding that...
container {format}
A container or container format could be thought of as an envelope - different types of content (e.g. audio, video, meta data, etc.) can be stored within the same envelope. For example: last summer you may have received an envelope which included a letter and photographs from your uncle Bob about his latest fishing trip.
Just as an envelop is independent of the content contained within it, so too is the container. For example: H.264 encoded video and AAC encoded audio could be stored within the same *.MP4 container file. Alternatively an *.MP4 container file could hold MP3 encoded audio."
compression {format} (a.k.a.compression scheme)
From a software development perspective, the compression format can be thought of as the specification that describes how the data is being persisted. In other words, the data structure that is being used to represent the serialized data.
Depending on a number of factors, compression formats will either by lossless or lossey.
codec (a.k.a. compressor-decompressor, coder-decoder)
A codec is a hardware device or software application that uses a complex algorithm to encode or decode multimedia content (e.g. audio, video, closed captioning, etc.).
Be advised: the term codec is frequently misused to refer to either the compression format (e.g. H.264) or a container format (e.g. MP4).
Examples
Container formats
Compression formats
Codec
ADDITIONAL NOTES
REFERENCES
来自 维基百科:
它是一个API和框架。不是编解码器或容器。
From wikipedia:
It is an API and framework. Not codecs or containers.