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

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

问题描述

维基,我看到


FFmpeg是一个免费软件项目,用于生成用于处理多媒体数据的图书馆和程序
。 FFmpeg最显着的部分是
libavcodec,其他几个
项目使用的音频/视频编解码器库,libavformat,音频/视频容器多路复用器和解码器库,
和ffmpeg命令行程序用于转码多媒体文件。


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



他们是如何相关的?

解决方案>

首先,要清除一些条款:




  • FFmpeg是一个涉及很多人的软件项目,一个维基,一个错误跟踪器,一些资金等。

  • ffmpeg 是他们提供的工具之一(其他都是例如,ffplay qt-faststart

  • Libav 是FFmpeg项目的分支,它提供 avconv 二进制文件。他们都是独立发展的,但是FFmpeg通常将Libav的承诺并不是相反的。 (有些人可能会说Libav遭受 NIH 的影响)。一些分配决定运送Libav而不是FFmpeg程序,特别是Ubuntu,这在Libav命令仍被命名为 ffmpeg 的过渡期间造成了一些混乱。现在Ubuntu再次使用真实的 ffmpeg



ffmpeg 工具就像您所说的一样,用于处理多媒体内容的多个库的命令行包装器。这些包括:





尽管FFmpeg开发人员经常提供自己的编码器和解码器,您可以启用在libavcodec中包含封装的第三方库,以便将胶合在一起FFmpeg, x264 ,这是最受欢迎的H.264编码器。这通常是在重新发明车轮根本没有意义的情况下完成的,如果决定编写一个新的H.264编码器,目标是要比x264更好,那就是这种情况。在其他情况下,由于许可证原因,某些库可能不会附带 ffmpeg build,例如libfaac,在这种情况下, ffmpeg


    li> libx264

  • libvpx(适用于VP8和VP9视频)

  • libfaac,libfdk-aac,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 is a fork of the FFmpeg project, which supplies the avconv binary. They both develop independently, but FFmpeg usually merges commits from Libav—not the other way 'round. (Some might say Libav suffers from NIH). Some distributions decided to ship Libav instead of FFmpeg programs, notably Ubuntu, which caused a bit of confusion in the transition period where the Libav command was still named ffmpeg. Now 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天全站免登陆