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.