unzip Video_Codec_SDK_9.0.20.zip
cd Video_Codec_SDK_9.0.20/Samples/AppDecode/AppDecImageProvider
vi Makefile
#增加
CCFLAGS += -g
LDFLAGS += -L$(CUDA_PATH)/lib64 -lcudart -lnvcuvid
LDFLAGS += -L/usr/local/ffmpeg/lib/ -lavcodec -lavutil -lavformat
#LDFLAGS += $(shell pkg-config --libs libavcodec libavutil libavformat)
LDFLAGS += -L/usr/lib64/ -lcuda
LDFLAGS += -pthread
make
#执行
./AppDecImageProvider -i ./stand_input.mp4 -o ./test1.bin -of rgba -gpu 3
#出现错误
[INFO ][10:57:36] GPU in use: Tesla P40
[INFO ][10:57:36] Media format: QuickTime / MOV (mov,mp4,m4a,3gp,3g2,mj2)
Session Initialization Time: 46 ms
./AppDecImageProvider: symbol lookup error: ./AppDecImageProvider: undefined symbol: cuvidGetDecodeStatus
搜索一下发现这篇文章:https://devtalk.nvidia.com/default/topic/1038289/symbol-lookup-error-with-cuvidgetdecodestatus/
原来是驱动的版本的问题:
执行 nvidia-smi发现驱动版本是 Driver Version: 390.30
在这里找到了最新的驱动: https://www.nvidia.com/Download/driverResults.aspx/144595/en-us
待续