First download ffmpeg-2.4.3.tar.bz2 and last_x264.tar.bz2, you can see the attachment.
CD ~
mkdir ffmpeg && CD ffmpeg
libx264 needs yasm, so install Yasm first
sudo apt-get install yasm
Then install libx264
sudo aptitude-y install Libx264-dev
Copy two attachments to the current path and unzip
Go to x264-snapshot-20141130-2245 (last_x264.tar.bz2 extracted to the folder)
./configure--enable-shared--enable-pic
Make
sudo make install
Then install ffmpeg,ffmpeg there are many dependent packages that require a first install
1.libfaac
sudo aptitude install Libfaac-dev
2.libmp3lame
sudo aptitude install Libmp3lame-dev
3. Libtheora
sudo aptitude install Libtheora-dev
4. Libvorbis
sudo aptitude install Libvorbis-dev
5. Libxvid
sudo aptitude install Libxvidcore-dev
6. Libxext
sudo aptitude install Libxext-dev
7. Libxfixes
sudo aptitude install Libxfixes-dev
After the dependency pack is installed, install FFmpeg
./configure--prefix=/usr/local/ffmpeg--ENABLE-GPL--enable-version3--enable-nonfree--enable-postproc-- Enable-pthreads--enable-libfaac--enable-libmp3lame--enable-libtheora--enable-libx264--enable-libxvid-- Enable-x11grab--enable-libvorbis
Make
Make install
Finally, for ease of use, path processing is possible
After the installation is complete, three directories appear in/usr/local/ffmpeg:
- Bin: Executable file directory
- LIB: Dynamic link library Directory
- Include: Header file directory for programming
Whether the execution of programming or executable program needs to rely on the dynamic library under LIB, you can copy the so file inside to/usr/lib, but you can modify the configuration file directly. By looking at the/etc/ld.so.conf file, we found that there was only one sentence:
Include ld.so.conf.d/*.conf
Indicates that it contains all the Conf files under LD.SO.CONF.D, so you can create a new file ffmpeg.conf in/etc/ld.so.conf.d/, which contains a sentence, which is the ffmpeg lib directory:
/usr/local/ffmpeg/lib
Execute the sudo ldconfig again, update the Ld.so.cache, and make the changes effective.
In order to be able to run directly with FFmpeg in any place, instead of running the program in the same way as./ffmpeg or/usr/local/ffmpeg/bin/ffmpeg, you can copy the executable to the Bin directory and choose to create a soft link in the bin directory. A soft link is similar to a shortcut under Windows, and if the original executable is deleted, the soft link is not allowed to continue, and the hard link continues to work. The Create Link command is as follows:
sudo ln-s/usr/local/ffmpeg/bin/ffmpeg/usr/local/bin/
sudo ln-s/usr/local/ffmpeg/bin/ffprobe/usr/local/bin/
sudo ln-s/usr/local/ffmpeg/bin/ffserver/usr/local/bin/
In addition, if it becomes a header file that needs to contain ffmpeg, it is best to copy the FFmpeg from the Include directory into/usr/include.
Thank you for the following link author = = = "
Http://noalgo.info/874.html
http://blog.csdn.net/redstarofsleep/article/details/45092145
Attachment link Address
http://download.csdn.net/detail/wangyimm01/8399899 = = = "last_x264.tar.bz2 Source code
http://download.csdn.net/download/tonylllz/8130313 ===== "ffmpeg-2.4.3.tar.bz2
About compiling the installation under ubuntu14.04 ffmpeg