Install FFmpeg with the source code in RedHat

Source: Internet
Author: User
Tags svn client freerdp
Recently, due to freerdp, ffmpeg needs to be installed. However, yum cannot be installed and related rpm packages cannot be found for installation. You have to use the source code to install it in RedHat. For details, see the following steps. 1. Download ffmpeg. I am in this region

Recently, due to freerdp, ffmpeg needs to be installed. However, yum cannot be installed and related rpm packages cannot be found for installation. You have to use the source code to install it in RedHat. For details, see the following steps.

1. Download ffmpeg.

I downloaded ffmpeg-1.1.1.tar.gz from http://ffmpeg.org/releases/ffmpeg-1.1.1.tar.gz. someone on the Internet downloaded the svn file, but I didn't have the svn client in my computer, so I downloaded the compressed file on the official website. If svn is used, you can download the latest ffmpeg version.

Svn checkout svn: // svn. mplayerhq. hu/ffmpeg/trunk ffmpeg

2. Decompress

Tar-xzvf ffmpeg-1.1.1.tar.gz

The decompressed directory is ffmpeg-1.1.1, the name is too long, use the mv command to change to ffmpeg

Music ffmpeg-1.1.1 ffmpeg

3. Configuration

./Configure -- enable-shared -- disable-yasm -- prefix =/usr/local/ffmpeg

(Note: In ffmpeg, assembly commands, such as MMX and SSE, are used to improve efficiency. Therefore, the yasm compilation compiler is required. I disable Assembly use here)

Among them: -- enable-shared is to allow it to compile and generate dynamic libraries, which will be used in future programming. -- Prefix specifies the installation directory.

4. Compile and install

Make

Make install

5. After installation, there will be three directories in/usr/local/ffmpeg.

Lib dynamic link library location

Header files are used for include programming.

Bin execution file directory

6. To facilitate programming in the future, copy the Three Link Libraries libavcodec. so libavformat. so libavutil. so in lib to/usr/lib. Copy the ffmpeg directory under the include directory to the/usr/include directory.

Run ffplay in the bin directory to play audio or video files. Example 1. MP3

./Ffplay 1.mp3

In addition, the bin directory contains two files: ffmpeg and ffserver.

Ffmpeg is a good Conversion Tool for video and audio formats. There are many instructions on the Internet. If you do not want to generate ffserver, you only need to add -- disable-ffserver in./configure.

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.