X264 download and compile
Introduction
H.264 is a video coding standard jointly developed by ITU (International Telecommunication Union) and MPEG (Motion Picture Experts Group). And x264 is an open source H.264/MPEG-4 AVC video coding function library, which is one of the best lossy video codecs.
download
Before downloading, first create an av folder for all subsequent storage related to audio and video. Boge puts this folder in the home directory.
Use git to get the x264 library source code in the terminal
cd ~/av
git clone http://git.videolan.org/git/x264.git
The downloaded file is as follows:
Compile
(1) Create build.sh under x264, the file content is as follows:
cur_dir=$(cd "$(dirname "$0")"; pwd)
echo $cur_dir
x264_build_dir=$cur_dir/../x264_install
x264_bin_dir=$x264_build_dir/bin
./configure --prefix="$x264_build_dir" --enable-static --disable-opencl --bindir="$x264_bin_dir" --disable-asm
(2) Create x264_install path under the av path
(3) Execute compilation
cd ~/av/x264
sh build.sh
make;make install
(4) View compilation results