FFMPEG/LIBAV to streamline unwanted modules

Source: Internet
Author: User

When using FFmpeg or LIBAV for development, most of the time the function needs to be relatively single, such as the player only need to de-reuse and decoding module, or even only need an audio or video decoder, or need to use FFMPEG for the specified format encoding, transcoding, etc. At this time if the ffmpeg is not customized, and directly from the official Web download, it may take dozens of m of hard disk space, in order to help the product of thin, need to compile a ffmpeg to meet their needs.

For example, compile FFmpeg's configure parameter (MinGW) under Windows:

./configure--enable-shared--ENABLE-GPL--enable-version3--disable-doc--disable-ffplay--disable-ffprobe-- Disable-ffserver--disable-network--disable-avfilter--enable-memalign-hack--disable-everything -- Enable-decoder=h264--enable-decoder=mp3--ENABLE-DECODER=AAC --disable-debug-- Enable-pthreads--disable-filters--extra-cflags= "-i/c/mingw/include"--extra-ldflags= "-L/C/MinGW/lib"

I only need three decoders for H, MP3 and AAC here, so I use--enable-decoder=h264--enable-decoder=mp3--ENABLE-DECODER=AAC for activation, while the others are all Disbale, In this way, I compiled my own ffmpeg dynamic library is very small, such as:

In fact, through the Configure parameter, you can also compile a smaller dynamic library, but the current size is enough for us to use.

This article is from the "Big bro" blog, make sure to keep this source http://cto521.blog.51cto.com/9652841/1630946

FFMPEG/LIBAV to streamline unwanted modules

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.