Installation
The Kunpeng Image Library optimizes the color space conversion performance of the sws_scale function of libswscale in FFmpeg. You can use this library after applying the optimization patch and compiling and installing the library.
Downloading and Installing x264
- Save the x264-master.tar.bz2 package obtained in Software Packages to /home/software and decompress it.
- Perform compilation and installation.
1 2 3 4
cd /home/software/x264-master/ mkdir build && cd build ../configure --enable-static --enable-shared --prefix=/home/x264install --disable-asm make -j && make install
- Configure the environment variable.
1export PKG_CONFIG_PATH=/home/x264install/lib/pkgconfig
Downloading and Installing FFmpeg
- Save the ffmpeg-7.1.1.tar.xz package obtained in Software Packages to /home/software and decompress it.
- Apply huawei_ffmpeg-7.1.1_opt.patch. huawei_ffmpeg-7.1.1_opt.patch is extracted from ffmpe-master.zip. The patch contains code for optimizing FFmpeg.
1 2 3 4 5 6 7 8
cd /home/software/ffmpeg-7.1.1 git config --global --add safe.directory /home/software/ffmpeg-7.1.1 git init && git add . && git commit -m "init" cp /home/software/ffmpeg-master/huawei_ffmpeg-7.1.1_opt.patch ./ git apply huawei_ffmpeg-7.1.1_opt.patch mkdir build && cd build ../configure --prefix=/home/ffmpeg/ --enable-shared --enable-pthreads --enable-gpl --enable-libx264 --disable-stripping --extra-cflags="-fopenmp" --extra-ldflags="-fopenmp" make -j && make install
- Check whether the installation is successful.
1 2
export LD_LIBRARY_PATH=/home/ffmpeg/lib/:/home/x264install/lib/:$LD_LIBRARY_PATH /home/ffmpeg/bin/ffmpeg -version
If the FFmpeg version is displayed, FFmpeg has been installed.
Parent topic: Installing and Using FFmpeg