Ask HN: FFmpeg real-time desktop streaming

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • galene

    The Galène videoconference server

  • What latency are you trying to do? Will the professor being communicating with the students while doing this? Will the students all have the same bandwidth, or will you want multiple renditions (low, med, high quality levels)?

    If you want AV1 you will not be able to use RTMP. The protocol is orphaned/deprecated, so avoid if possible!

    If I was building it this is what I would do, and my reasoning.

    * For capture + encoding I would use OBS. You will want to use something that is easy for users to install configure. Professors will also have lots of custom requirements when it comes to layout etc... it will be tempting to do a ffmpeg command directly, but it will fall apart quick I believe.

    * To get AV1 out of OBS I would use FFMPEG output. I would have it send RTP. RTP is used to carry video in a sub-second manner. This is the same protocol that WebRTC uses. You know have AV1 + low latency.

    * Then for users to watch I would use WebRTC. That will allow them to watch in their web browser. Conceptually it will be like this https://github.com/pion/webrtc/tree/master/examples/rtp-to-w... this takes the RTP packets and puts them in the browser.

    Lots of great projects exist that you could use for 'RTP -> WebRTC' like https://galene.org/ and https://livekit.io/ I would suggest checking them all out!

    If you have more questions/want to talk to people in the video space always happy to chat on https://pion.ly/slack :)

  • obs-studio

    OBS Studio - Free and open source software for live streaming and screen recording

  • I'm not sure if this is what you are looking for, but have you tired https://obsproject.com/ Warning: It has too many options, so it takes a while to get the correct configuration. Also, the difference between "Stopped" and "Recording" is too subtle, so I had to modify the layout style to make it foolproof for me.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • fauxstream

    ffmpeg wrapper to facilitate screencasting/recording on OpenBSD

  • I was able to use fauxstream as a starting point for part of my streaming project.

    My experiment was streaming via a ipfs transport layer.

    fauxstream is a very thin wrapper around ffmpeg, it proved invaluable in providing a reference command I could iterate off of to get my stream working.

    https://github.com/rfht/fauxstream

  • OvenMediaEngine

    OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS

  • OME [1] is a RTMP server for sub-second WebRTP streaming. Profiles allow for specific encodes if needed. I have a repository hosting an exemplary configuration and a frontend using their player [2].

    Another server is SRS [3], but IMO it is more difficult to use, lacks features and the delay is about 1-3s — it requires far less bandwidth though.

    [1] https://github.com/AirenSoft/OvenMediaEngine

  • simple-ome

    Simple configuration and frontend for OvenMediaEngine (OME)

  • srs

    SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

  • ffmpeg-streamcast

    ffmpeg-based script for streaming services with video/audio/webcam features

  • I had been doing Twitch streaming seven years ago (so, RTSP, if I recall correctly) with an ffmpeg script I wrote.

    https://github.com/tcarrio/ffmpeg-streamcast/blob/master/bas...

    Also, seven years, and I eventually ended up moving to OBS instead of diving even further, but that was working at the time.

    However, it won't give you any pointers for using AV1, and this is just the streaming source, you'll still need an RTSP server and clients to access them.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • nginx-rtmp-module

    NGINX-based Media Streaming Server

  • If stuck for a server I've used this in the past. nginx with an RTMP module.

    Also linking a config file I commented. Unsure if it'll still work and you can definitely simplify it for OP's needs. It was a proof of concept for a streaming service I was thinking up before realising how much money I don't have, haha

    https://github.com/arut/nginx-rtmp-module

    https://gist.github.com/cohan/7f676d3f561be62d0550785c015f00...

  • Pion WebRTC

    Pure Go implementation of the WebRTC API

  • What latency are you trying to do? Will the professor being communicating with the students while doing this? Will the students all have the same bandwidth, or will you want multiple renditions (low, med, high quality levels)?

    If you want AV1 you will not be able to use RTMP. The protocol is orphaned/deprecated, so avoid if possible!

    If I was building it this is what I would do, and my reasoning.

    * For capture + encoding I would use OBS. You will want to use something that is easy for users to install configure. Professors will also have lots of custom requirements when it comes to layout etc... it will be tempting to do a ffmpeg command directly, but it will fall apart quick I believe.

    * To get AV1 out of OBS I would use FFMPEG output. I would have it send RTP. RTP is used to carry video in a sub-second manner. This is the same protocol that WebRTC uses. You know have AV1 + low latency.

    * Then for users to watch I would use WebRTC. That will allow them to watch in their web browser. Conceptually it will be like this https://github.com/pion/webrtc/tree/master/examples/rtp-to-w... this takes the RTP packets and puts them in the browser.

    Lots of great projects exist that you could use for 'RTP -> WebRTC' like https://galene.org/ and https://livekit.io/ I would suggest checking them all out!

    If you have more questions/want to talk to people in the video space always happy to chat on https://pion.ly/slack :)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts