FFmpeg-over-IP – 连接到远程FFmpeg服务器
FFmpeg-over-IP – Connect to remote FFmpeg servers

原始链接: https://github.com/steelbrain/ffmpeg-over-ip

## GPU转码变得简单:ffmpeg-over-ip ffmpeg-over-ip 提供GPU加速的ffmpeg转码,无需GPU直通、共享文件系统或驱动对齐的复杂性。它允许应用程序通过将`ffmpeg`命令替换为`ffmpeg-over-ip-client`,即可利用远程GPU进行媒体服务器转码等任务。 该系统通过在具有GPU访问权限的服务器上运行,并在包含文件的机器上运行客户端来工作。客户端通过单个TCP端口将命令和文件I/O转发到服务器,服务器执行一个补丁后的ffmpeg。重要的是,文件*从不*驻留在服务器上,从而无需NFS、SMB或复杂的挂载。 包含支持NVENC、QSV和其他硬件加速方法的预构建二进制文件,简化了设置。多个客户端可以同时连接到单个服务器,每个客户端都有自己的ffmpeg进程,并受到HMAC身份验证的保护。它是一种简化解决方案,可在Docker、VM和远程机器等各种环境中利用GPU性能。

## FFmpeg-over-IP:远程GPU加速 Steelbrain发布了“ffmpeg-over-ip”的更新,该项目可以连接到远程FFmpeg服务器。这允许利用配备GPU的机器(如游戏笔记本电脑)来加速没有GPU的机器的视频转换,非常适合Plex或Jellyfin等媒体服务器。 该系统包括一个运行修改版FFmpeg的服务器(配备GPU)和一个处理本地文件I/O请求的客户端,使FFmpeg不知道它没有访问本地文件系统。单个服务器可以为多个客户端提供服务。该项目捆绑了一个静态FFmpeg构建,并使用配置文件和密码保护简化设置。 讨论强调了对类似概念的实验(如rffmpeg和ffmpeg-commander),避免复杂文件系统共享的好处,以及与Plan 9分布式系统方法的比较。虽然有些人质疑在软件转码能力存在的情况下是否有必要,但作者强调了移动设置和利用现有硬件等用例。该项目旨在易于使用和控制,为直接修改FFmpeg以实现网络功能提供了一种方便的替代方案。
相关文章

原文

Use GPU-accelerated ffmpeg from anywhere — a Docker container, a VM, or a remote machine — without GPU passthrough or shared filesystems.

GPU transcoding is powerful, but getting access to the GPU is painful:

  • Docker containers need --runtime=nvidia, device mounts, and driver version alignment between host and container
  • Virtual machines need PCIe passthrough or SR-IOV — complex setup that locks the GPU to one VM
  • Remote machines need shared filesystems (NFS/SMB) with all the path mapping, mount maintenance, and permission headaches that come with them

You just want your media server to use the GPU for transcoding. You shouldn't need to restructure your infrastructure to make that happen.

Run the ffmpeg-over-ip server on the host (or any machine with a GPU). Point your app at the client binary instead of ffmpeg. Done — your app gets GPU-accelerated transcoding without needing direct GPU access.

The client pretends to be ffmpeg. It forwards arguments to the server, which runs a patched ffmpeg that tunnels all file I/O back through the connection. Files are never stored on the server.

CLIENT (has files, no GPU)              SERVER (has GPU)
========================              ===========================

Media server invokes "ffmpeg"         Daemon listening on :5050
        |                                      |
  ffmpeg-over-ip-client               ffmpeg-over-ip-server
        |                                      |
        +--------- TCP connection ------------>+
        |                                      |
  Local filesystem                      patched ffmpeg
  (real files)                    (file I/O tunneled back to client)

No GPU passthrough. No shared filesystem. No NFS. No SMB. Just one TCP port.

Releases include pre-built ffmpeg and ffprobe binaries with broad hardware acceleration support (NVENC, QSV, VAAPI, AMF, VideoToolbox, and more) — built on the jellyfin-ffmpeg pipeline. No need to install ffmpeg separately on either side.

See docs/quick-start.md to get up and running in a few minutes.

See docs/upgrading.md for migration guide and breaking changes.

See docs/configuration.md for full configuration reference (config file search paths, server/client options, rewrites, logging, address formats).

See docs/docker.md for Docker integration, Unix socket setup, and debugging tips.

  1. Your media server calls ffmpeg-over-ip-client with normal ffmpeg arguments
  2. The client connects to the server and sends the command with HMAC authentication
  3. The server launches its patched ffmpeg, which tunnels all file reads and writes back to the client
  4. stdout/stderr are forwarded in real-time; when ffmpeg exits, the client exits with the same code

Multiple clients can connect to the same server simultaneously — each session gets its own ffmpeg process.

Client Server + ffmpeg
Linux x86_64
Linux arm64
macOS arm64
macOS x86_64
Windows x86_64

See docs/troubleshooting.md for common issues and debugging tips.

See CONTRIBUTING.md for build instructions, running tests, and project structure.

  • Authentication: HMAC-SHA256 with a shared secret. Every command is signed.
  • Single port: Only the server listens on a port. The client makes outbound connections only.

Split license — see LICENSE.md. The fio layer and ffmpeg patches (fio/, patches/) are GPL v3 (derived from ffmpeg). Everything else is MIT.

联系我们 contact @ memedata.com