Skip to content

Commit ba9f968

Browse files
committed
Enable libx264/libx265 in the ffmpeg configure in README file
Signed-off-by: Xiaoxia Liang <xiaoxia.liang@intel.com>
1 parent 3b5c0f5 commit ba9f968

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,34 @@ Add below line to `~/.bash_profile` which sets IPP env. \
1818
`source /opt/intel/oneapi/ipp/latest/env/vars.sh` \
1919
Then `source ~/.bash_profile`
2020

21+
## Install dependent libraries x264 and x265
22+
The x264/x265 libraries can be installed via apt on Ubuntu OS or built and installed from source code.
23+
24+
### Install x264/x265 via apt on Ubuntu OS(Option-1)
25+
`apt-get update && apt-get install -y libx264-dev libx265-dev nasm`
26+
27+
### Build and install x264/x265 from source code(Option-2)
28+
29+
#### Build and install x264
30+
31+
`git clone https://github.com/mirror/x264 -b stable --depth 1` \
32+
`cd x264` \
33+
`./configure --prefix=/usr/local --libdir=/usr/local/lib --enable-shared` \
34+
`make -j$(nproc)` \
35+
`sudo make install`
36+
37+
#### Build and install x265
38+
39+
`wget -O - https://github.com/videolan/x265/archive/3.4.tar.gz | tar xz` \
40+
`cd x265-3.4/build/linux` \
41+
`cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DLIB_INSTALL_DIR=/usr/local/lib ../../source` \
42+
`make -j$(nproc)` \
43+
`sudo make install`
44+
45+
#### Set PKG_CONFIG_PATH enviroment variable
46+
The `.pc` files of x264 and x265 libraries are in `/usr/local/lib/pkgconfig`, add the path to the `PKG_CONFIG_PATH` environment variable. \
47+
`export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH`
48+
2149
# Use FFmpeg RAISR plugin
2250

2351
## Build and install the Intel® Library for VSR with Docker
@@ -63,12 +91,12 @@ To build the library without building the docker image, run \
6391

6492
### Configure FFmpeg
6593
When `DCMAKE_INSTALL_PREFIX` isn't used, the ffmpeg configure command is as: \
66-
`./configure --enable-libipp --extra-cflags="-fopenmp" --extra-ldflags=-fopenmp --extra-libs='-lraisr -lstdc++ -lippcore -lippvm -lipps -lippi' --enable-cross-compile`
94+
`./configure --enable-libipp --extra-cflags="-fopenmp" --extra-ldflags=-fopenmp --enable-gpl --enable-libx264 --enable-libx265 --extra-libs='-lraisr -lstdc++ -lippcore -lippvm -lipps -lippi' --enable-cross-compile`
6795

6896
When `DCMAKE_INSTALL_PREFIX` is used, please add the below line to the ffmpeg configure command: \
6997
`--extra-cflags=="-fopenmp -I../Video-Super-Resolution-Library/install/include/" --extra-ldflags="-fopenmp -L../Video-Super-Resolution-Library/install/lib/"` \
7098
The ffmmpeg confiure command is as: \
71-
`./configure --enable-libipp --extra-cflags="-fopenmp -I../Video-Super-Resolution-Library/install/include/" --extra-ldflags="-fopenmp -L../Video-Super-Resolution-Library/install/lib/" --extra-libs='-lraisr -lstdc++ -lippcore -lippvm -lipps -lippi' --enable-cross-compile`
99+
`./configure --enable-libipp --extra-cflags="-fopenmp -I../Video-Super-Resolution-Library/install/include/" --extra-ldflags="-fopenmp -L../Video-Super-Resolution-Library/install/lib/" --enable-gpl --enable-libx264 --enable-libx265 --extra-libs='-lraisr -lstdc++ -lippcore -lippvm -lipps -lippi' --enable-cross-compile`
72100

73101
### Build FFmpeg
74102
`make clean` \

0 commit comments

Comments
 (0)