|
|
|
Ask HN: FFmpeg real-time desktop streaming
|
|
30 points
by GabrieleR
1295 days ago
|
|
Hello HN,
In the university I'm working in, they have asked me to produce a remote desktop stream for students to connect to and watch the professor coding on his desktop. I would like to use FFMPEG with the latest AVI1 capabilities since we have some gpus (it would be great to use them). 'They' would like a native solution (testing me). I'm looking for information where I can learn to do that elegantly. Thanks HN, much love |
|
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 :)