HACKER Q&A
📣 techsin101

How would you design a streaming service like this?


I'm a fullstack developer and would like to learn how to build a streaming service in depth. What I want to create is essentially twitch clone but not really. I want to create a tutoring app where tutor and students would broadcast video. So 1 tutor 10 students in a video chat.

This video chat needs to be recorded as well.

I can get one-on-one video chat work more or less using webrtc + TURN servers. But no way to record it.

Ideally this would be great:

- all users connect to each other using webrtc

- video also gets recorded and saved in S3.

- without anything touching the server.

If not possible, then it has to be the server...

from what i understand about the server is that you..

- take the incoming stream (usually using a software? can't use webrtc to server for this?)

- save it in storage and also broadcast it to others.

- complexity comes in with transcoding and stuff.

all links, suggestions, questions and advises appreciated.


  👤 bosky101 Accepted Answer ✓
Webrtc does have examples for saving video to webm. It's a few lines of code. Then you can convert to avi or MP4 for viewing later or archival. For real time webrtc will suffice.

Ffmpeg can help with conversions through some serverless or queue workflow

Checkout GitHub.com/pion for pushing out content to a browser from a golang based rtcpeerconnection client.

You have done research on the right lines. You can do this, good luck.


👤 rwdim
jitsi.org . use jitsi meet as a platform, and you can broadcast and record.