Python硬解码并AI推理——PyNvVideoCodec使用记录
PyNvVideoCodec替换VPF
原来的VPF不能用了,现在变成了了PyNvVideoCodec。直接通过pip安装但是Python版本要大于3.10,但也比之前安装友多了。
GitHub – NVIDIA/VideoProcessingFramework: Set of Python bindings to C++ libraries which provides full HW acceleration for video decoding, encoding and GPU-accelerated color space and pixel format conversions
PyNvVideoCodec 安装
pip install PyNvVideoCodec
注意:python版本需要大于3.10。
PyNvVideoCodec 不支持指定GPU
虽然在CreateDecoder中有gpuid这个参数,但指定不生效。
参考:
PyNvVideoCodec API Programming Guide – NVIDIA Docs
GitHub – jxiaof/PyNvVideoCodec-example: PyNvVideoCodec example
作者:小南橙