DirectShow - 它是什么?

发布于 2024-10-16 11:39:51 字数 176 浏览 5 评论 0原文

什么是 Microsoft 的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蒗幽 2024-10-23 11:39:51

简而言之:

编解码器是一段算法和/或代码,用于将音频或视频从原始格式转换为编码格式并返回;编码器和解码器。

对于视频,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.

血之狂魔 2024-10-23 11:39:51

第 1 部分:DirectShow

DirectShow 是 Microsoft 开发的基于 COM 的多媒体框架。 DirectShow 架构的过滤器方面类似于 Unix Pipes 通过可配置的管道发送多媒体内容来处理多媒体内容,其中包括:

  1. 源过滤器(必需)
  2. 转换过滤器(可选)
  3. 渲染器过滤器(必需)

一般而言,DirectShow 框架支持以下功能:

  • 音频/视频播放
  • 音频/视频捕获
  • 视频、编辑
  • 视频混合
  • DVD 相关功能

过去,软件开发人员使用 C++ 和 DirectShow SDK 来开发解决方案。尽管如此,也可以使用 COM 兼容的编程语言。

第 2 部分:格式、容器、压缩和编解码器

在阅读了有关该主题的大量文章后,我可以肯定地说的一件事是,这些术语在整个行业中的使用并不一致!据我了解...

容器{格式}

容器或容器格式可以被视为信封 - 不同类型的内容(例如音频、视频、元数据等)可以是保存在同一个信封内。例如:去年夏天,您可能收到了一个信封,其中包含您叔叔鲍勃关于他最近钓鱼之旅的一封信和照片。

正如信封独立于其中所含内容一样,容器也是如此。例如:H.264 编码的视频和 AAC 编码的音频可以存储在同一个 *.MP4 容器文件中。或者,*.MP4 容器文件可以保存 MP3 编码的音频。”

压缩{格式}(又名压缩方案)

从软件开发的角度来看,压缩格式可以被认为是描述数据如何持久化的规范,换句话说,用于表示序列化数据的数据结构

将是无损压缩格式 。 em>lossey

编解码器(又名压缩器-解压缩器、编码器-解码器)

编解码器是一种硬件设备或软件应用程序,它使用复杂的算法来编码或解码多媒体内容(例如音频、视频、隐藏式字幕等)。

请注意:术语编解码器经常被误用来指代压缩格式(例如 H.264)或容器格式(例如 MP4)。

示例

  • 容器格式

    • AVI、FLV、F4V、MOV、MP4、MKV 等
  • 压缩格式

    • JPEG、PNG、MP3、AAC、H.264、H.262、MPEG2 第 2 部分、MPEG4 第 2 部分等。
  • 编解码器

    • DivX H.264 编解码器和 Xvid H.264 编解码器均使用不同的算法以 H.264 压缩格式对视频进行编码。

附加说明

  • DirectX 是指恰好包含 DirectShow API 的 Microsoft API 组或集合(例如 Direct3D、DirectDraw、DirectSound 等)。也就是说,直到 2005 年 4 月 DirectShow 被转移到Microsoft Platform SDK

参考

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:

  1. source filter (required)
  2. transform filter (optional)
  3. renderer filter (required)

Generally speaking, DirectShow framework supports the following features:

  • audio/video playback
  • audio/video capture
  • video editing
  • video mixing
  • DVD related 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

    • AVI, FLV, F4V, MOV, MP4, MKV, etc.
  • Compression formats

    • JPEG, PNG, MP3, AAC, H.264, H.262, MPEG2 part 2, MPEG4 part 2, etc.
  • Codec

    • The DivX H.264 codec and the Xvid H.264 codec both use different algorithms to encode video in the H.264 compression format.

ADDITIONAL NOTES

  • DirectX refers to a group or collection of Microsoft APIs (e.g. Direct3D, DirectDraw, DirectSound, etc.) that happens to include the DirectShow API. That is, until DirectShow was moved to the Microsoft Platform SDK in April 2005.

REFERENCES

单身狗的梦 2024-10-23 11:39:51

来自 维基百科

DirectShow(有时缩写为 DS 或 DShow),代号 Quartz,是 Microsoft 为软件开发人员提供的多媒体框架和 API,用于对媒体文件或流执行各种操作。

它是一个API和框架。不是编解码器或容器。

From wikipedia:

DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams.

It is an API and framework. Not codecs or containers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文