FFmpeg user manual-FFmpeg encoding support and customization

Source: Internet
Author: User
Tags webp wiki software

FFmpeg user manual-FFmpeg encoding support and customization
3.1 FFmpeg supports some encoding, encapsulation, and protocols, but its support is still limited. Some are licence, and some are relatively large. FFmpeg provides a basic framework, these encoding, encapsulation, and protocols can be attached to FFmpeg as a FFmpeg module. These modules are supported by third-party external libraries, you can view the encoding, encapsulation, and Protocol Support supported by FFmpeg by default through configure of FFmpeg source code. If not, you can view the supported third-party external libraries when configure-help is used, the corresponding parameter options are supported:


As you can see, FFmpeg supports a relatively large number of external libraries, mainly including the following list:
Bzip2 1.0.6
Fontconfig 2.11.94
Frei0r 20130909-git-10d8360
GnuTLS 3.3.15
Libiconv 1.14
Libass 0.12.2
Libbluray 0.8.1
Libbs2b 3.1.0
Libcaca 0.99.beta18
Dcadec 20150506-git-98fb3b6
FreeType 2.5.5
Game Music Emu 0.6.0
GSM 1.0.13-4
ILBC 20141214-git-ef04ebe
Modplug-XMMS 0.8.8.5
LAME 3.99.5
OpenCORE AMR 0.1.3
OpenJPEG 1.5.2
Opus 1, 1.1
RTMPDump 20140707-git-a1900c3
Schroedinger 1.0.11
Libsoxr 0.1.1
Speex 1.2rc2
Theora 1.1.1
TwoLAME 0.3.13
Vid. stab 0.98
VisualOn AAC 0.1.3
VisualOn AMR-WB 0.1.2
Vorbis 1.3.5
Vpx 1.4.0
WavPack 4.75.0
WebP 0.4.3
X264 20150223-git-121396c
X265 1.7
XAVS svn-r55
Xvid 1.3.3
XZ Utils 5.2.1
Zlib 1.2.8
These external libraries can be customized through configure. The command line is as follows:

If you do not need so many configuration options, but want to support H264 video and AAC audio encoding, You can simplify the configuration to the following:

To support H264 and AAC, you need to support third-party libraries including libx264 and libfaac in the system. Otherwise, an error occurs:

Libfaac error prompt not found

Libx264 error prompt not found
If you need to support H265 encoding, it can be basically similar to supporting h265, as you can see from the help information above, you only need to add-enable-libx265 to support h265 encoding, other corresponding encoding is similar.
FFmpeg supports many encoding, encapsulation, and Protocols by default. Therefore, the compiled FFmpeg is large in size and does not need some encoding, encapsulation, or protocols supported by FFmpeg in some application scenarios, you can view some useful cropping operations through configure -- help:

You can use these options to disable unnecessary encoding, encapsulation, and Protocols. The verification method is as follows:

After disable all modules, the output information of the ffmpeg compilation configuration item is almost empty:

After Disable all modules, you can customize them to support the modules you need. For example, you want to support h264 video encoding, aac audio encoding, and encapsulation as mp4, you can perform the following operations:

The compilation configuration information output after configuration is as follows:

Supports FFmpeg compilation configuration parameters for h264, aac encoding, and mp4 encapsulation.
As you can see, FFmpeg supports h264 encoding, aac encoding, and mp4 encapsulation formats. In this way, the generated ffmpeg after compilation is the configured cropped ffmpeg, which is much smaller than the default compiled ffmpeg.
3.2 FFmpeg encoder support
The FFmpeg source code can contain a lot of codes. Common and uncommon codes can be seen in the compilation configuration list. You can view the code by using the configure -- list-encoders parameter of the compilation configuration command:

It can be seen that ffmpeg supports more comprehensive encoder, such as aac, ac3, h264, h265, mpeg4, mpeg2video, pcm, and flv encoder support.
3.3 FFmpeg decoder support
The FFmpeg source code contains a lot of decoding support, which is mainly used for decoding input. It can also be understood as decompressing the compressed encoding. For decoding support, you can use. /configure-list-decoders command to view:

The decoders module supported by ffmpeg supports mpeg4, h264, h265 (HEVC), and mp3.
3.4 FFmpeg multiplexing (Muxing) Support
The reuse of FFmpeg is to encapsulate the compressed encoding into a container format (also known as Muxing). If you want to view the container formats supported in the FFmpeg source code, you can use commands. /configure -- list-muxers:

As you can see, ffmpeg supports generating bare stream files, such as h264, aac, and pcm. It also supports some common formats, such as mp3, mp4, flv, hls, and webm.

3.5FFmpeg support for Demuxing
FFmpeg is used to split the container format to extract the compressed audio streams, video streams, subtitle streams, and data streams (also called Demuxing ), to view the input container formats supported in the FFmpeg source code, run the command. /configure -- list-demuxers:

As you can see, ffmpeg source code supports a lot of demuxer, including image, mp3, flv, MP4, mov, avi, etc.

3.6 FFmpeg communication protocol support
FFmpeg not only supports local multimedia processing, but also supports the processing of network streaming media. The supported network streaming media protocols are relatively comprehensive. You can view them using the command./configure -- list-protocols:

Ffmpeg supports many streaming media protocols, including mms, http, hls (M3U8), rtmp, rtp, tcp and udp, and local file protocols, concat is supported for splicing multiple files and streaming files. The details will be detailed in the following sections.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.