我正在尝试使用dav1d构建ffmpeg。我已经使用以下命令成功构建了davit:
git clone --depth=1 https://code.videolan.org/videolan/dav1d.git && \
cd dav1d && \
mkdir build && cd build && \
meson .. && \
ninja
此后,我正在为FFmpeg运行配置命令并收到错误:
PKG_CONFIG_PATH="/app/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="/app/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I/app/ffmpeg_build/include" \
--extra-ldflags="-L/app/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="/usr/local/bin" \
--enable-gpl \
--enable-libass \
--enable-libmp3lame \
--enable-libfreetype \
--enable-libopus \
--enable-libvorbis \
--enable-libx264 \
--enable-libdav1d \
--enable-nonfree
((所有其他库都已安装,并且FFmpeg使用它们来正确配置和构建,如果我省略了--enable-libdav1d
,但是在上述命令的情况下,我得到了):
ERROR: dav1d >= 0.2.1 not found using pkg-config
我认为原因可能是介子将bin文件放在错误的目录中。谁能帮忙吗?
P.S。我正在使用Ubuntu 18.04。
其他库的构建命令示例:
git -C x264 pull 2> /dev/null || git clone --depth 1 https://code.videolan.org/videolan/x264.git && \
cd x264 && \
PKG_CONFIG_PATH="/app/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/app/ffmpeg_build" --bindir="/usr/local/bin" --enable-static --enable-pic && \
make && \
make install
要通过构建,您必须添加ninja install
:
git clone --depth=1 https://code.videolan.org/videolan/dav1d.git && \
cd dav1d && \
mkdir build && cd build && \
meson --bindir="/usr/local/bin" .. && \
ninja && \
ninja install
但是这还不够,如果您在之后使FFmpeg有趣,您将获得:
ffmpeg: error while loading shared libraries: libdav1d.so.4: cannot open shared object file: No such file or directory
要解决此问题,请将/usr/local/lib/x86_64-linux-gnu
添加到LD_LIBRARY_PATH
:
export LD_LIBRARY_PATH+=":/usr/local/lib/x86_64-linux-gnu"