
nvcoder-python
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
NvCoder-Python是一款专为Python编程学习者设计的交互式在线教程平台。它提供了丰富的课程资源和实践项目,帮助用户从基础语法到高级应用全面掌握Python语言技能,适用于不同水平的学习者。
NvCodec-Python 要求 CUDA >= 11.2, numpy >= 1.7 和 python >= 3.6,并且需要 gcc >= 7.5 和 swig >= 4.1 安装。使用 pip install pynvcodec 进行安装。
用法:
0. 初始化 PyNvCodec:
```python
from nvcodec import VideoSource, VideoDecoder, VideoEncoder
```
1. 使用 `VideoSource`:
```python
source = VideoSource(rtmp://RTMP_URL)
h264_data = source.read()
```
2. 使用 `VideoDecoder`:
```python
decoder = VideoDecoder()
frames = decoder.decode(h264_data)
# frames 可能为 NULL 或 List
```
全部评论 (0)
还没有任何评论哟~


