什么是 ffmpeg、avcodec、x264? [英] What is ffmpeg, avcodec, x264?

查看:16
本文介绍了什么是 ffmpeg、avcodec、x264?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

wiki,我读到了

<块引用>

FFmpeg 是一个生成库和程序的免费软件项目用于处理多媒体数据.FFmpeg 最值得注意的部分是libavcodec,其他几个使用的音频/视频编解码器库项目,libavformat,一个音频/视频容器复用和解复用库,以及用于转码多媒体文件的 ffmpeg 命令行程序.

那么 ffmpeg 是 avcodec 的包装器吗?而且我经常听到人们使用 ffmpeg 用 x264 编码视频.所以ffmpeg也是x264的封装?

它们有什么关系?

解决方案

首先,澄清一些术语:

  • FFmpeg 是一个涉及很多人的软件项目,包括一个 Wiki、一个错误跟踪器、一些资金等等.
  • ffmpeg 是他们提供的工具之一(例如,其他工具是 ffplayqt-faststart).
  • Libav 是 FFmpeg 项目的分支,该项目提供了 avconv 二进制文件.一些发行版决定在一段时间内发布 Libav 而不是 FFmpeg 程序,特别是 Ubuntu,这在 Libav 命令仍被命名为 ffmpeg 的过渡时期引起了一些混乱.当前的 Ubuntu 使用真实"版本.再次ffmpeg.

ffmpeg 工具,如您所说,是许多用于处理多媒体内容的库的命令行包装器.其中包括:

虽然 FFmpeg 开发人员通常提供他们自己的编码器和解码器,但您可以启用在 libavcodec 中具有包装器的第三方库,以便粘合"它们.FFmpeg 和 x264 一起,这是最流行的 H.264 编码器.当重新发明轮子"根本没有意义时,通常会这样做,如果人们决定编写一个新的 H.264 编码器,目标是比 x264 更好,就会出现这种情况.在其他情况下,由于许可原因,某些库可能不会随 ffmpeg 构建一起提供,例如 libfaac——在这种情况下,ffmpeg 提供了原生 AAC 编码器.>

常见的外部编码器包括:

  • libx264
  • libvpx(用于 VP8 和 VP9 视频)
  • 用于 AAC 音频的 libfaac、libfdk-aac、libvo-aacenc
  • libmp3lame
  • libvorbis
  • libxvid

对于所有这些,您会在 libavcodec 下找到包装器,例如对于 libx264,文件 libx264.c 提供将视频从 FFmpeg 内部格式推送到 x264 编码器的必要代码,然后将其传递给 libavformat 以将其写入文件.实际编码是通过libx264完成的.

如前所述,其他编码器,例如 MPEG-4 是 FFmpeg 原生的,完全不依赖外部库.

最后,有几个程序使用 FFmpeg 工具和库,无论是通过提供ffmpeg 可执行文件,或者通过选择 libavcodec 和 libavformat 库的一部分.这是许可证允许的,并且使 FFmpeg 成为当今最流行的多媒体工具集合.

From wiki, I read that

FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files.

So ffmpeg is a wrapper of avcodec? And I often hear that people encode video with x264 using ffmpeg. So ffmpeg is also a wrapper of x264?

How are they related ?

解决方案

First of all, to clear up some terms:

  • FFmpeg is a software project with lots of people involved, a Wiki, a bug tracker, some funding, etc.
  • ffmpeg is one of the tools they offer (others are ffplay and qt-faststart, for example).
  • Libav was fork of the FFmpeg project, which supplied the avconv binary. Some distributions decided to ship Libav instead of FFmpeg programs for some time, notably Ubuntu, which caused a bit of confusion in the transition period where the Libav command was still named ffmpeg. Current Ubuntu uses the "real" ffmpeg again.

The ffmpeg tool is, like you said, a command line wrapper for a number of libraries designed for handling multimedia content. These include:

While the FFmpeg developers often provide their own encoders and decoders, you can enable third party libraries that have wrappers in libavcodec, in order to "glue" together FFmpeg and, say, x264, which is the most popular H.264 encoder. This is often done when there's simply no point in "reinventing the wheel", which would be the case if one decided to write a new H.264 encoder with the goal to be better than x264. In other cases, some libraries may not be shipped with an ffmpeg build due to licensing reasons, such as libfaac—in that case, ffmpeg offers a native AAC encoder.

Common external encoders include:

  • libx264
  • libvpx (for VP8 and VP9 video)
  • libfaac, libfdk-aac, libvo-aacenc for AAC audio
  • libmp3lame
  • libvorbis
  • libxvid

For all of those you will find the wrappers under libavcodec, e.g. for libx264, the file libx264.c provides the necessary code to push the video from the FFmpeg-internal format to the x264 encoder, and then pass that on to libavformat to write it into a file. The actual encoding is done through libx264.

As mentioned before, other encoders such as the one for MPEG-4 are native to FFmpeg and do not rely on external libraries at all.

Finally, there are several programs that make use of FFmpeg tools and libraries, be it by providing an ffmpeg executable, or by picking parts of the libavcodec and libavformat libraries. This is allowed per the license and makes FFmpeg the most popular collection of multimedia tools today.

这篇关于什么是 ffmpeg、avcodec、x264?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆