Compilation of this item is really tangled and hard, but it is quite a pleasure to be successful. The following content is for a blog on the website. I will add it according to my practice: ffmpeg is a powerful codec library that can codec videos and audios. In general, it can be used as a player. My website is UbuntuLinux11.04 (I think the Linux version does not matter, but the SDL library is very important for generating ffplay). The following is the installation procedure: we download FFmpeg0.8.7 "L from the official website.
Compilation of this item is really tangled and hard, but it is quite a pleasure to be successful. The following content is for a blog on the website. I will add it according to my practice:
Ffmpeg is a powerful codec library that can codec videos and audios. In general, it can be used as a player. I use Ubuntu Linux 11.04 (I think the Linux version does not matter, but it is very important for the SDL library to generate ffplay)
The installation steps are as follows:
We download FFmpeg 0.8.7 "Love" from official: http://ffmpeg.org/releases/ffmpeg-0.8.7.tar.gz
(Other ffplay video and audio versions earlier than ffmpeg are not synchronized .)
Follow these steps:
1. install the SDL Library (no ffplay will be installed) (if you download the SDL source code and make install the installed library, compile ffmpeg to generate ffplay, however, the generated ffplay video has no sound. And audio cannot be played ). And other libraries.
$ Sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libMP3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev
(Subversion and git-core are software management tools. After they are installed, you can easily download the source code. They are the corresponding svn and git)
2. Install x264 (source code is required)
$ Git clone git: // git.videolan.org/x264.git
$ Cd x264
$./Configure
$ Make
$ Sudo make install
3、decompress ffmpeg-0.8.7.tar.gz
$ Ffmpeg-0.8.7 cd
$./Configure -- enable-memalign-hack -- enable-static (if not, try $./configure -- enable-memalign-hack -- enable-ffplay)
Problems:
View the config. mak file and find the CONFIG_FFPLAY line. It is found that there is always a line above!
An error occurred while making the result. The ffplay. c compilation error is reported.
Solution: reinstall SDL
Ubuntu's new establishment already contains the SDL library, so you can install it by using a few simple commands, which is more stupid than windows!
Sudo apt-get install libsdl1.2-dev (relatively large, about 10 MB)
Additional package:
Sudo apt-get install libsdl-image1.2-dev
Sudo apt-get install libsdl-mixer1.2-dev
Sudo apt-get install libsdl-ttf2.0-dev
Sudo apt-get install libsdl-gfx1.2-dev
After the installation is complete, an SDL folder in the directory/usr/include contains the required header file.
4. Compile
$ Make
$ Sudo make install
Now it's okay!
5. Test
$./Ffplay hello. mpg
Can you see the video clip? What can I hear?
Hey, you can!
Reference
Http://www.linuxidc.com/Linux/2012-07/66243.htm
Http://www.linuxidc.com/Linux/2010-07/26965.htm