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.
WebTorrent is a streaming torrent client for the web browser and the desktop. WebTorrent is written completely in JavaScript – the language of the web – and uses WebRTC for peer-to-peer transport whenever possible. No browser plugins, extensions, or installation is required to use WebTorrent in your browser.
If you need to remain somewhat anonymous, then yes. But if you don't mind your IP being displayed to practically anyone, then it's not necessary. No, a VPN is not required to torrent files. The BitTorrent protocol will work regardless if you're using a VPN, proxy, or just your normal connection.
A BitTorrent tracker is a web service which responds to requests from BitTorrent clients. The requests include metrics from clients that help the tracker keep overall statistics about the torrent. The response includes a peer list that helps the client participate in the torrent swarm.
WebTorrent allows direct browser-to-browser Bittorrent downloads by utilizing a WebSocket based tracker protocol and WebRTC peer connections.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With