以低延迟将屏幕捕获直播到前端网站

Livestream screen capture to frontend website with low latency

对于一个项目,我想将我在 Ubuntu 服务器上的桌面直播到前端网站(运行 在同一服务器上使用 Node/Express)。

这与用OBS/ffmpeg到Youtube/Twitch直播并嵌入到我自己的网站是一样的效果。 它必须是低延迟(<1 秒)

任何人都可以指出 protocols/applications/tutorials 用作大纲的内容吗?

要实现小于 1 秒的延迟,您将不得不使用 WebRTC(如 Brad 所述)。这将限制其他参与者使用您的流的数量,但可以将其扩展到 100 秒或 1000 秒,具体取决于您的操作方式。

如果您对稍高的延迟(~2-3 秒)感到满意,那么 Amazon IVS 可能适合您。请记住,您仍然需要一些东西来 将流 流发送到 IVS,例如 OBS 或支持实时流的 WebRTC 实现。您需要将他们的播放器嵌入您的前端。

虽然您可以从头开始完成所有这些工作,但使用服务来处理棘手的部分可能会更容易。

Daily (who I work for) can handle all things WebRTC for you and also lets you send a live stream to the provider of your choice. It's easy to get started and out of the box will allow you to share your screen with hundreds of participants. Here's a sample chrome extension 我们正是为此而构建的。

Twilio、Agora 或 Vonage(以及更多)等公司提供了很多具有类似功能的出色服务。

如果您想从头开始构建它,请查看 https://webrtc.org/