TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: FFmpeg-over-IP – Connect to remote FFmpeg servers

147 点作者 steelbrain8 个月前
Dear HN,<p>I’m excited to show case a personal project. It has helped me quite a bit with my home lab, I hope it can help you with yours too! ffmpeg-over-ip has two components, a server and a client. You can run the server in an environment with access to a GPU and a locally installed version of ffmpeg, the client only needs network access to the server and no GPU or ffmpeg locally.<p>Both and client and the server need a shared filesystem for this to work (so the server can write output to it, and client can read from it). In my usecase, smb works well if your (GPU) server is a windows machine, nfs works really well for linux setups.<p>This utility can be useful in a number of scenarios:<p>- You find passing through a (v)GPU to your virtual machines complicated<p>- You want to use the same GPU for ffmpeg in multiple virtual machines<p>- Your server has a weak GPU so you want to use the GPU from your gaming machine<p>- Your GPU drivers in one OS are not as good as another (AMD RX6400 never worked for me in linux, but did so in windows)<p>I’ve posted some instructions in the Github package README, please let me know if they are unclear in any way and I’ll try to help!<p>Here&#x27;s the link: <a href="https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip">https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip</a>

17 条评论

NavinF8 个月前
&gt; need a shared filesystem for this to work<p>Oh oof. I thought removing that requirement would be the whole point of something named &quot;FFmpeg-over-IP&quot;. Shared filesystem usually involves full trust between machines, bad network error handling, and setting things up by hand (different config on every distro)
评论 #41745893 未加载
评论 #41746451 未加载
steelbrain8 个月前
There is an existing solution in the community called rffmpeg[1] but that did not work for me. It seems too heavy weight for what I was trying to do. It requires access to sudo, global configuration files (&#x2F;etc&#x2F;) and most importantly, this, which is a deal-breaker for me:<p>&gt; Note that if hardware acceleration is configured in the calling application, the exact same hardware acceleration modes must be available on all configured hosts, and, for fallback to work, the local host as well, or the ffmpeg commands will fail.<p>I wanted to mix and match windows and linux, and it was clear rffmpeg wasn&#x27;t going to work for me.<p>One plus rffmpeg does have is that it supports multiple target hosts, so it&#x27;s useful if you want some load balancing action. Although you could do the same with ffmpeg-over-ip, just selecting the servers dynamically but rffmpeg does make it easier out of the box.<p>[1]:<a href="https:&#x2F;&#x2F;github.com&#x2F;joshuaboniface&#x2F;rffmpeg">https:&#x2F;&#x2F;github.com&#x2F;joshuaboniface&#x2F;rffmpeg</a>
qwertox8 个月前
IDK, this lacks a lot of examples and explaining what exactly it is for. Is it for remote transcoding only?<p>Because if so, the word <i>transcoding</i> does not appear neither in this Show HN nor in the GitHub README.<p>And I can&#x27;t think of any other use for this than to perform hardware-assisted transcoding on a remote machine.<p>Apparently it has nothing to do with OpenGL or CUDA, which are the primary uses for a GPU. And ffmpeg itself has more use cases than just transcoding files.
评论 #41746425 未加载
maxlin8 个月前
I wrote something similar to this. Instead of requiring a shared network drive, dependent files are automatically detected and transferred over with HTTP, and as an advanced feature, it splits the video to chunks to allow 20x+ encode speeds, concurrently utilizing multiple machines to encode a single input file and utilizing NVENC. Video is then concatenated together and API for that mode is identical.<p>Wrote it in C# and it runs both on Windows and Linux. The original need for this actually was to accelerate encodes a system I run on a cloud VM needs when I have either my desktop or laptop available, who then work as encode slaves and pick up jobs, run them and send the output files back. If no slaves are available, the system falls back to local CPU encode. Later I ended up using this using a local Windows server machine as the &quot;client&quot; the slaves also connect to to ask for jobs (actually the system runs inside a Unity project in that case because C# is awesome).<p>Probably a bit of a rare problem I hit with this is that different NVENC generations generate different enough bitstreams that they can&#x27;t be concatenated together. From my pool of machines I found out only my RTX 2070 and RTX 3080 Mobile are compatible. GTX 970 and Quadro P5000 that I had laying around both were incompatible with that pool and with each other.<p>Interestingly I found no similar software to the chunked encoding in my system, but am chalking it up on me not searching hard enough or these being integrated deep in to commercial&#x2F;private systems. It would make sense that big players like YouTube have something like this in place, as reducing latency for individual upload transcodes finishing is beneficial instead of limiting their speed to a single hardware encoding &#x2F; software encoding node. It&#x27;s the same amount of processing that needs to be done in the end anyway, so might as well use 10 nodes to complete single jobs really quickly one after another
jauntywundrkind8 个月前
Not to steal thunder (nice! Well done!) but also this reminded me to go check in on <a href="https:&#x2F;&#x2F;kyber.media" rel="nofollow">https:&#x2F;&#x2F;kyber.media</a> (currently a landing page), a ffmpeg streaming project from me ffmmpeg himself (I think?) Jean-Baptiste Kempf. He had a LinkedIn update two weeks ago, mentioning the effort! Yay! <a href="https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;jbkempf_playruo-the-worlds-first-click-and-play-activity-7241806921547005952-wruW" rel="nofollow">https:&#x2F;&#x2F;www.linkedin.com&#x2F;posts&#x2F;jbkempf_playruo-the-worlds-fi...</a><p>Submission from 6 months ago, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39929602">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39929602</a> <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=0RvosCplkCc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=0RvosCplkCc</a>
评论 #41745650 未加载
slt20218 个月前
this is really not much different from ssh-ing to your GPU server and running ffmpeg. Very roundabout way to execute remote bash command on a server<p>I dont meant to discourage you, but it is possible to replace your entire repo with a simple bash alias:<p><pre><code> alias ffmpeg-over-ip=&#x27;ssh myserver &quot;ffmpeg \&quot;\$@\&quot;&quot;&#x27;</code></pre>
评论 #41745500 未加载
评论 #41745921 未加载
评论 #41745538 未加载
steelbrain8 个月前
The latest release[1] on Github should have binaries combinations for almost everybody here. If you don&#x27;t find a binary for your environment, you can probably just run the javascript files and it&#x27;ll be fine.<p>If you are wondering why the binaries are so large, it&#x27;s because they are packaged-up node.js binaries. I tried to learn a compile-to-native language to rewrite this in so you won&#x27;t have to download such bloated binaries but didn&#x27;t get far. I learned Swift and still have a WIP branch up for it[2]. I gave up after learning that there&#x27;s no well maintained windows http server for swift.<p>I&#x27;m currently on my journey to learn Rust. So maybe one day when I do, you&#x27;ll see the binary sizes drop.<p>[1]:<a href="https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip&#x2F;releases&#x2F;tag&#x2F;v3.0.0">https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip&#x2F;releases&#x2F;tag&#x2F;v3...</a> [2]:<a href="https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip&#x2F;tree&#x2F;swift-lang">https:&#x2F;&#x2F;github.com&#x2F;steelbrain&#x2F;ffmpeg-over-ip&#x2F;tree&#x2F;swift-lang</a>
评论 #41745574 未加载
评论 #41748842 未加载
VWWHFSfQ8 个月前
I used to use dvd::rip [1] (written in perl) that was sort of a similar concept. Deploy transcode jobs onto a cluster of servers accessing a shared filesystem (nfs, smb, etc.). worked really well. I think it used gstreamer though. I set up a homelab of a bunch of pentium 3s that I salvaged from a PC recycler behind my work. They just had a big pile of obsolete computers covered by a tarp. I grabbed a few chassis with working motherboards, and then scrounged around for the best intel CPUs I could find. and memory sticks. I put together a fun little DVD-ripping factory with those machines.<p>[1] <a href="https:&#x2F;&#x2F;www.exit1.org&#x2F;dvdrip&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.exit1.org&#x2F;dvdrip&#x2F;</a>
wwalexander8 个月前
How does this compare with the built-in ffserver? <a href="https:&#x2F;&#x2F;trac.ffmpeg.org&#x2F;wiki&#x2F;ffserver" rel="nofollow">https:&#x2F;&#x2F;trac.ffmpeg.org&#x2F;wiki&#x2F;ffserver</a>
评论 #41748391 未加载
LeoPanthera8 个月前
As other comments have suggested it&#x27;s difficult to imagine that this has a lot of advantages to simply using pipes over ssh. And pipes don&#x27;t need a shared filesystem either.<p>I suppose ssh would be tricky if you&#x27;re combining multiple input files.
评论 #41747198 未加载
leshokunin8 个月前
Sounds super interesting. Maybe the people currently using Tdarr would prefer something like this. I could also imagine something like Plex or Jellyfin making use of this tech and offloading transcoding. Hope this takes off.
评论 #41745280 未加载
seltzered_8 个月前
Can this possibly be helpful for second-screen (aka extended display) scenarios between a PC and a tablet&#x2F;phone?<p>Thinking of <a href="https:&#x2F;&#x2F;tuxphones.com&#x2F;howto-linux-as-second-wireless-display-for-linux&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tuxphones.com&#x2F;howto-linux-as-second-wireless-display...</a> -&gt; <a href="https:&#x2F;&#x2F;gitlab.com&#x2F;tuxphones&#x2F;side-displays" rel="nofollow">https:&#x2F;&#x2F;gitlab.com&#x2F;tuxphones&#x2F;side-displays</a> but for those running android or ios
steelbrain8 个月前
Here[1] is the original HN comment that inspired me to do a Show HN :)<p>[1]:<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41205253">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=41205253</a>
评论 #41745445 未加载
mdrzn8 个月前
&quot;Your server has a weak GPU so you want to use the GPU from your gaming machine&quot; would be my usecase for this, but it seems overly complicated, having to setup a shared filesystem.<p>I have a VPS on OVH which uses ffmpeg to convert mp3 files from 320kbps to 128kbps, it runs at 32x real speed on the server, but it could run 100x faster on my desktop pc. If there was an <i>easy</i> way to let the VPS &quot;run&quot; ffmpeg from my machine, that&#x27;d be great.
评论 #41748556 未加载
评论 #41748614 未加载
mrkramer8 个月前
I was exploring running FFmpeg in the cloud and I stumbled upon this: <a href="https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;transcoding-on-aws-lambda&#x2F;" rel="nofollow">https:&#x2F;&#x2F;intoli.com&#x2F;blog&#x2F;transcoding-on-aws-lambda&#x2F;</a><p>What would be great is FFmpeg in the cloud with GUI for easier use.
Am4TIfIsER0ppos8 个月前
I can encode faster than I can upload. Might be useful if you have gigabit to a computer more powerful than one in your home.
ptspts8 个月前
What problem does it solve?<p>How to use it? Do you have example commands?<p>How is video data transferred between the client and the server?<p>Would it be possible to connect with SSH to a Linux server, using SFTP with FUSE or Samba with port forwarding for file sharing? This way the server could be zero-configuration (except that ffmpeg has to be installed, but the executable can also be transferred over SSH).
评论 #41745350 未加载
评论 #41745414 未加载