How to fix error while compiling libx264: “AVComponentDescriptor” has no member named “depth”


When you compile libx264 follow this tutorial: How to compile FFmpeg on CentOS (Step 4) and get error:

filters/video/resize.c: In function ‘pick_closest_supported_csp’:
filters/video/resize.c:215:30: error: ‘AVComponentDescriptor’ has no member named ‘depth’
         if( pix_desc->comp[i].depth > 8 )
                              ^
make: *** [filters/video/resize.o] Error 1

How to fix this error:

Step 1:

cd ~/ffmpeg_sources

Step 2: You can choose other version in here: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/

[root@tutorialspots ffmpeg_sources]# rm x264 -Rf
[root@tutorialspots ffmpeg_sources]# wget ftp://ftp.videolan.org/pub/videolan/x264/snaps
hots/x264-snapshot-20180224-2245-stable.tar.bz2
--2018-04-22 15:07:48--  ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264
-snapshot-20180224-2245-stable.tar.bz2
           => `x264-snapshot-20180224-2245-stable.tar.bz2'
Resolving ftp.videolan.org (ftp.videolan.org)... 88.191.250.2, 2a01:e0d:1:3:58bf
:fa02:c0de:20
Connecting to ftp.videolan.org (ftp.videolan.org)|88.191.250.2|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/videolan/x264/snapshots ... done.
==> SIZE x264-snapshot-20180224-2245-stable.tar.bz2 ... 750878
==> PASV ... done.    ==> RETR x264-snapshot-20180224-2245-stable.tar.bz2 ... do
ne.
Length: 750878 (733K) (unauthoritative)

100%[======================================>] 750,878      701KB/s   in 1.0s

2018-04-22 15:07:53 (701 KB/s) - `x264-snapshot-20180224-2245-stable.tar.bz2' sa
ved [750878]

Step 3:

tar vxf x264-snapshot-20180224-2245-stable.tar.bz2

Step 4:

[root@tutorialspots ffmpeg_sources]# mkdir x264
[root@tutorialspots ffmpeg_sources]# mv -f x264-snapshot-20180224-2245-stable/* x264/

Now you can install libx264

cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
make
make install
cd ..

Recent search terms:

  • magnetmoh

1 Comment

Leave a Reply