当前位置: 首页 > 工具软件 > libav > 使用案例 >

NVIDIA官方指南:libav编译支持Nvidia Codec(结果失败)

周玺
2023-12-01
  • 参考

https://developer.nvidia.com/ffmpeg

  • 下载头文件
git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers
sudo make
sudo make install
  • libav
git clone https://github.com/libav/libav
  • 重新编译 

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

make clean

NV_CODEC=`pwd`/../Video_Codec_SDK_9.1.23

./configure \
    --prefix=/usr/local \
    --enable-shared \
    --enable-gpl \
    --enable-cuda --enable-cuvid --enable-nvenc \
    --enable-nonfree \
     --extra-cflags="-I${NV_CODEC}/include -I/usr/local/include -I/usr/local/cuda/include" \
    --extra-ldflags="-L${NV_CODEC}/Lib/linux/stubs/x86_64 -L/usr/local/lib     -L/usr/local/cuda/lib64"

# --enable-libnpp  \
# --enable-libx264 \

make

sudo make install
  • 测试

没试过。吾是集成到libav再调用。

 类似资料: