readme.md 899 Bytes
Newer Older
zhyh2010's avatar
zhyh2010 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# FFmpeg DCU python测试用例

这是一个简单的 DCU视频编解码Python demo用例。

## 环境要求

- **驱动**: 与MacCodecSDK版本一致

### 软件
- **FFmpeg**: 
  - `MacCodecSDK`
- **Python 依赖**:
  - `ffmpeg-python`
- **docker环境**:
  - `基于DTK2504镜像即可,本sample使用harbor.sourcefind.cn:5443/dcu/admin/base/vllm:0.9.2-ubuntu22.04-dtk26.04-0130-py3.10-20260202`

## 安装步骤

### 1. 安装系统级 MacCodecSDK
确保 FFmpeg 已安装,可通过ffmpeg指令验证

### 2. 安装 Python 依赖

```bash
pip install ffmpeg-python
```

## 使用方法
运行脚本:
```bash
python benchmark_cuda.py
```

## 输出示例

### 成功情况
```text
--- Starting CUDA Benchmark for ./sample_1920x1080_30fps_8bit.h264 ---

[1] Testing CUDA Decode...
    Decode Success

[2] Testing CUDA Encode (H264 NVENC)...
    Encode Success

--- Benchmark Finished ---
```