Install any skill in seconds. Free to start, no credit card required.
Get Started Free →yangge521/hw-codec-adapt
跨平台 GPU 硬件编解码适配,支持 NVIDIA NVENC/摩尔线程 mtenc/Intel VA-API 自动切换
Passed 21 of 22 test cases with the skill, and 14 of 22 without it.
and 6 more in the full report
7 fixed14 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
When offloading H.264 stream decoding to a MTT GPU card, what decoder name string must be supplied to FFmpeg?
| Checked | Without skill | With skill |
|---|---|---|
| Supplies h264_mtdec as the hardware decoder name | Missed | Passed |
The instructions your model reads when the skill loads.
实现视频编解码在不同 GPU 平台间的自动适配,支持 NVIDIA NVENC、摩尔线程 mtenc、Intel VA-API,通过统一接口屏蔽底层差异。
通过检测 nvidia-smi/mthreads-gmi/vainfo 命令是否可用来判断 GPU 类型。根据类型返回对应编码器(h264_nvenc/h264_mtenc/h264_vaapi/libx264)和解码器。
GPUStreamer 类封装统一逻辑:构造时自动检测 GPU,build_push_command 生成 FFmpeg 命令。NVIDIA 用 p1/ull,摩尔线程用 fast,Intel 用 veryfast。
使用 FFmpeg 硬件解码器(h264_cuvid/h264_mtdec/h264_vaapi)替代 CPU 解码,输出 rawvideo/bgr24 供推理处理。
| 编码器 | 平台 | 1080p@60fps CPU 占用 | 延迟 |
|---|---|---|---|
| libx264 | CPU | ~80% | ~50ms |
| h264_nvenc | NVIDIA | ~5% | ~10ms |
| h264_mtenc | 摩尔线程 | ~8% | ~15ms |
| h264_vaapi | Intel | ~10% | ~12ms |
test cases passed, vs 14 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.