Centos Linux Installation FFmpeg

Source: Internet
Author: User

1, download ffmpeg.
Download URL: http://www.ffmpeg.org/download.html

2. Decompression
TAR-ZXVF ffmpeg-2.0.1.tar.gz

3, configuration, generate makefile
./configure--enable-shared--disable-yasm--prefix=/usr/local/ffmpeg
If the results are incorrect, you can follow the prompts and review the help to resolve the issue
./configure--help

4. Compile and install
Make
Make install

5, after installation in/usr/local/ffmpeg will see that there are three directories
Bin Execution File directory
lib Static, dynamic link library directory
Header files used in include programming

To prevent the execution of the program from finding the library file,
You can set the/usr/local/ffmpeg/lib directory to the LD_LIBRARY_PATH environment variable,
or view all the links under/usr/local/ffmpeg/lib and establish the same link under/usr/lib. As follows.
Ln-s/usr/local/ffmpeg/lib/libavcodec.so/usr/lib/libavcodec.so
ln-s/usr/local/ffmpeg/lib/libavdevice.so/ usr/lib/libavdevice.so
ln-s/usr/local/ffmpeg/lib/libavfilter.so/usr/lib/libavfilter.so
Ln-s/usr/local/ ffmpeg/lib/libavformat.so/usr/lib/libavformat.so
Ln-s/usr/local/ffmpeg/lib/libavutil.so/usr/lib/ libavutil.so
ln-s/usr/local/ffmpeg/lib/libswresample.so/usr/lib/libswresample.so
Ln-s/usr/local/ffmpeg/ Lib/libswscale.so/usr/lib/libswscale.so

Ln-s/usr/local/ffmpeg/lib/libavcodec.so/usr/lib/libavcodec.so.55
Ln-s/usr/local/ffmpeg/lib/libavdevice.so/usr/lib/libavdevice.so.55
Ln-s/usr/local/ffmpeg/lib/libavfilter.so/usr/lib/libavfilter.so.3
Ln-s/usr/local/ffmpeg/lib/libavformat.so/usr/lib/libavformat.so.55
Ln-s/usr/local/ffmpeg/lib/libavutil.so/usr/lib/libavutil.so.52
Ln-s/usr/local/ffmpeg/lib/libswresample.so/usr/lib/libswresample.so.0
Ln-s/usr/local/ffmpeg/lib/libswscale.so/usr/lib/libswscale.so.2

6. Compiling test program
Gcc-o ffmpegtest Ffmpegtest.c-i/usr/local/ffmpeg/include-l/usr/local/ffmpeg/lib-lavformat-lavcodec-lavtuil

7. Execution procedure
./ffmpegtest
or directly execute the./ffmpeg in the/usr/local/ffmpeg/lib directory for testing.

Centos Linux Installation FFmpeg

Related Article

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.