CUDA For WSL官网
设置环境变量

export PATH=/usr/local/cuda-12.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Jan__6_16:45:21_PST_2023
Cuda compilation tools, release 12.0, V12.0.140
Build cuda_12.0.r12.0/compiler.32267302_0

ffmpeg 支持nv编解码

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
make install
git clone https://github.com/FFmpeg/FFmpeg.git
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-cuvid --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --disable-static --enable-shared --prefix=/mywork/install/ --disable-doc  --enable-shared


如果需要Nvidia的编解码可以下载官方SDK
VideoProcessingFramework

歌曲封面
0:00