Rendered at 20:19:49 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
steelbrain 2 hours ago [-]
Hi HN!
I'm excited to show case an update to a personal project of mine. Its called ffmpeg-over-ip and it allows you connect to remote ffmpeg servers, so if you have one machine with a GPU (could be your windows gaming laptop, gaming PC, a macbook?) and a machine (or VM, docker container etc) without a GPU, you could use the remote GPU to do GPU-accelerated video conversion.
The way it works is pretty neat, there are two components, a server and a client.
- The server (has the GPU) comes with a patched up ffmpeg and listens on a specified port
- The client (without the GPU) connects to the server, takes the file IO requests from the server and runs them locally.
ffmpeg doesn't know that its not dealing with a local filesystem, so this approach works with multiple inputs or outputs like HLS, and is perfect for home media servers like Plex or Jellyfin or Emby.
One server can offer up its GPU to as many clients as needed, all clients offer up their own filesystems for their requests, the server also comes with a static build of ffmpeg bundled (built from jellyfin-ffmpeg scripts) so all you have to do is create a config file, set a password and you're good to go!
It's been about a year and half since this was last submitted (https://news.ycombinator.com/item?id=41743780). The feedback at the time was around the difficulty of sharing a filesystem between the machines so that should no longer be a problem.
This has been really useful in my local setup, I hope you find it useful. If you have any further questions, the website has some FAQs (linked in github repo), or you could post them here and I'll answer them for you!
I built this macOS app that allows you to use any off the shelf wifi camera as your webcam with Zoom, Microsoft Teams, etc. It has lower latency than OBS, VLC etc based on my testing, its Swift-Native and pretty lightweight.
It was built mainly for my own team so they don't have to run long wires of USB cameras or pay a lot of money for a "wireless webcam". I hope you find it useful!
tonymet 55 minutes ago [-]
cool idea. can you elaborate on IO and how the ffmpeg-server reads blocks from the client? that would seem to be a big blocker
steelbrain 40 minutes ago [-]
> cool idea. can you elaborate on IO and how the ffmpeg-server reads blocks from the client? that would seem to be a big blocker
ffmpeg-server runs a patched version of ffmpeg locally, ffmpeg requests to read some chunks (ie give me video.mp4) through our patched filesystem (https://github.com/steelbrain/ffmpeg-over-ip/blob/main/fio/f...), which gets sent over the same socket that the client established, client receives the request, does the file operations locally and sends the results back over the socket to the server, and server then sends them to ffmpeg.
ffmpeg has no idea its not interacting with a local file system
tonymet 31 minutes ago [-]
very clever and thanks for explaining. for gpu-bound processes, which are common ffmpeg use cases, this is a great approach
ffmpeg-over-ip patches ffmpeg and only needs one port open for the server, then you just run the binary, no mounts needed at all.
naikrovek 37 minutes ago [-]
This is software which basically replicates what Plan9 gives you out of the box.
Dammit I really wish Plan9 had taken off. It isn’t perfect but it does a much, much better job of helping me run my applications in ways that I want.
If anyone doesn’t already know, one method of Plan9 remote access is to “cpu” into a remote machine which has the hardware you need. Your local filesystems go with you, and your environment on the remote machine consists of your local filesystems mounted to the remote machine, but only for you, and all applications you run in this context execute on the cpu of the remote machine and have access to the remote machines hardware, but your local filesystems. Imagine SSHing into a remote machine and your entire environment goes with you, development tools and all. That’s what Plan9 does for you.
So if I “cpu” into a machine without ffmpeg, but with a GPU and I run ffmpeg, not only will it work, but I can tell ffmpeg to use a hardware encoder with a simple command line flag, and it’ll work.
toomuchtodo 47 minutes ago [-]
Thanks for the update and continuing to share this project. What does the roadmap look like into the future?
pastescreenshot 14 minutes ago [-]
This is neat. The thing I would most want in the README is a benchmark section showing where it wins and where it does not. My guess is long GPU bound transcodes look great and tiny file churn workloads probably do not. Having that boundary spelled out would make adoption a lot easier.
steelbrain 39 minutes ago [-]
I am thinking of adding a Windows application with an installer and a tray icon that you can use for some basic settings like changing port or password, or toggling automatic startup.
For linux, I am thinking of adding convenience helpers around systemd service installation
toomuchtodo 34 minutes ago [-]
Very cool. Peertube supports remote runners [1] [2], might take a look for inspiration. As a distributed compute enthusiast, big fan of of this model for media processing.
I'm excited to show case an update to a personal project of mine. Its called ffmpeg-over-ip and it allows you connect to remote ffmpeg servers, so if you have one machine with a GPU (could be your windows gaming laptop, gaming PC, a macbook?) and a machine (or VM, docker container etc) without a GPU, you could use the remote GPU to do GPU-accelerated video conversion.
The way it works is pretty neat, there are two components, a server and a client.
- The server (has the GPU) comes with a patched up ffmpeg and listens on a specified port - The client (without the GPU) connects to the server, takes the file IO requests from the server and runs them locally.
ffmpeg doesn't know that its not dealing with a local filesystem, so this approach works with multiple inputs or outputs like HLS, and is perfect for home media servers like Plex or Jellyfin or Emby.
One server can offer up its GPU to as many clients as needed, all clients offer up their own filesystems for their requests, the server also comes with a static build of ffmpeg bundled (built from jellyfin-ffmpeg scripts) so all you have to do is create a config file, set a password and you're good to go!
It's been about a year and half since this was last submitted (https://news.ycombinator.com/item?id=41743780). The feedback at the time was around the difficulty of sharing a filesystem between the machines so that should no longer be a problem.
This has been really useful in my local setup, I hope you find it useful. If you have any further questions, the website has some FAQs (linked in github repo), or you could post them here and I'll answer them for you!
Thanks!
I built this macOS app that allows you to use any off the shelf wifi camera as your webcam with Zoom, Microsoft Teams, etc. It has lower latency than OBS, VLC etc based on my testing, its Swift-Native and pretty lightweight.
It was built mainly for my own team so they don't have to run long wires of USB cameras or pay a lot of money for a "wireless webcam". I hope you find it useful!
ffmpeg-server runs a patched version of ffmpeg locally, ffmpeg requests to read some chunks (ie give me video.mp4) through our patched filesystem (https://github.com/steelbrain/ffmpeg-over-ip/blob/main/fio/f...), which gets sent over the same socket that the client established, client receives the request, does the file operations locally and sends the results back over the socket to the server, and server then sends them to ffmpeg.
ffmpeg has no idea its not interacting with a local file system
https://github.com/joshuaboniface/rffmpeg
You can mix and match operating systems, macOS, Windows, Linux, you do not need sudo privileges.
rffmpeg needs a shared file system which could be a huge pain to setup: https://github.com/joshuaboniface/rffmpeg/blob/master/docs/S...
ffmpeg-over-ip patches ffmpeg and only needs one port open for the server, then you just run the binary, no mounts needed at all.
Dammit I really wish Plan9 had taken off. It isn’t perfect but it does a much, much better job of helping me run my applications in ways that I want.
If anyone doesn’t already know, one method of Plan9 remote access is to “cpu” into a remote machine which has the hardware you need. Your local filesystems go with you, and your environment on the remote machine consists of your local filesystems mounted to the remote machine, but only for you, and all applications you run in this context execute on the cpu of the remote machine and have access to the remote machines hardware, but your local filesystems. Imagine SSHing into a remote machine and your entire environment goes with you, development tools and all. That’s what Plan9 does for you.
So if I “cpu” into a machine without ffmpeg, but with a GPU and I run ffmpeg, not only will it work, but I can tell ffmpeg to use a hardware encoder with a simple command line flag, and it’ll work.
For linux, I am thinking of adding convenience helpers around systemd service installation
[1] https://docs.joinpeertube.org/maintain/tools#peertube-runner
[2] https://docs.joinpeertube.org/admin/remote-runners
My usecase is just-in-time media transcoding, I'll see if PeerTube remote runners support it