Files
One-KVM/libs/hwcodec
mofeng-git db9d79554a perf(video): 新增 RKMPP DMA 采集编码通路并完善恢复逻辑
支持原生 HDMI 和 UVC 缓冲区导出,增加同步 RKMPP 编码及可选 MJPEG 硬件转码。
校验帧布局和缓冲区租约,在 DMA 不可用或编码失败时回退到复制通路。
保留自定义码率和 GOP 策略,重开采集时同步 HDMI 源帧率,并区分 UVC 超时状态。

验证:88 个视频测试通过(含 4 个新增回归测试);ARM64 cargo check --tests 通过。
2026-09-05 20:55:30 +08:00
..
2026-07-14 21:01:47 +08:00
2026-07-16 22:59:22 +08:00
2026-07-14 21:01:47 +08:00

A real-time hardware codec library for RustDesk based on FFmpeg

Codec

Windows

GPU FFmpeg ram FFmpeg vram sdk vram
intel encode qsv qsv Y
intel decode d3d11 d3d11 Y
nvidia encode nvenc(nv12->d3d11) nvenc(d3d11) Y
nvidia decode d3d11 d3d11 N
amd encode amf amf Y
amd decode d3d11 d3d11 Y

Notes

  • The reason for discarding the codecs using Cucontext is discussed in the following forum thread: https://forums.developer.nvidia.com/t/cuctxdestroy-causing-system-freeze-and-black-screen/290542/1. Based on the information above, there are several optimizations and changes made to the codec:

    • FFmpeg encoding AV_PIX_FMT_NV12 directly: The codec is modified to transfer AV_PIX_FMT_NV12 to AV_PIX_FMT_D3D11. This is done because FFmpeg doesn't use Cucontext if the device type is AV_HWDEVICE_TYPE_D3D11VA.
    • FFmpeg decoding with AV_HWDEVICE_TYPE_CUDA acceleration: This functionality is disabled and replaced with AV_HWDEVICE_TYPE_D3D11VA. The decoding process now utilizes D3D11VA acceleration instead of CUDA.
    • SDK decoding with CUDA acceleration: The CUDA acceleration support is disabled.
  • amd sdk remove h265 support, https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/432

Linux

GPU FFmpeg ram
intel encode vaapi
intel decode vaapi
nvidia encode vaapi, nvnec
nvidia decode vaapi, nvdec
amd encode vaapi, amf
amd decode vaapi

Issue

System requirements