Can you use webtorrent for distributed live video broadcasting

3.2k Views Asked by At

I want to use p2p webrtc for live video streaming through webtorrent.

https://github.com/feross/webtorrent

It can apparently stream video but can it take as input webcams and other sources?

How would you do that?

Thanks.

1

There are 1 best solutions below

4
On

Torrents are immutable, meaning that they can't change over time. You can built live streaming on top of torrents, though. You just need to pick a time interval (say 15 seconds), and create a torrent for each interval. The broadcaster should publish the .torrent files, or at least the magnet links to a central server somewhere that the clients can keep checking to get the latest content.

See https://github.com/feross/webtorrent/issues/448#issuecomment-159147568 for some discussion about how this might work.

As the creator of WebTorrent, I will say this. Live video streaming is out-of-scope for WebTorrent and should be built as a separate package on top of WebTorrent.