@acidsound
VIDEO
streamer
transcoding
Content Delivery Network
viewer
Huge computation cost/time
RTMP
HLS
HLS
streamer
viewer
webRTC
VP8
H264
VP8
H264
SFU
* SFU: selective forwarding unit
SFU
SFU
SFU
SFU
SFU
webRTC
Traditional | CASTO | |
---|---|---|
Transcoding | SAAS Transcoding Media Server |
x |
Storage | AWS, Azure, GCP | x (delivery only) |
Delivery | CDN | P2P |
$ ipfs object get QmR45FmbVVrixReBwJkhEKde2qwHYaQzGxu4ZoDeswuF9w
{“Links”: [{
“Name”: “”,
“Hash”: “QmYSK2JyM3RyDyB52caZCTKFR3HKniEcMnNJYdk8DQ6KKB”,
“Size”: 262158},
{“Name”: “”,
“Hash”: “QmQeUqdjFmaxuJewStqCLUoKrR9khqb4Edw9TfRQQdfWz3”,
“Size”: 262158},
{“Name”: “”,
“Hash”: “Qma98bk1hjiRZDTmYmfiUXDj8hXXt7uGA5roU5mfUb3sVG”,
“Size”: 178947}],
“Data”: “\u0008\u0002\u0018* \u0010 \u0010 \n”}
/* peer의 생성 */
peerInfo = await new Promise((resolve, reject)=>PeerInfo.create((err,peerInfo)=>err && reject(err) || resolve(peerInfo)));
/* peer가 가질 수 있는 복수의 multiaddr 추가 */
peerInfo.multiaddrs.add(multiaddr(`/dns4/star-signal.cloud.ipfs.team/wss/p2p-webrtc-star/ipfs/${peerInfo.id.toB58String()}`));
Streamer
Relay
Viewer
Star (libp2p)
STUN/TURN (webRTC)
discover
streaming
CASTO Architecture
dial
dial
peerConnection
peerConnection
streamer
viewer
webRTC
VP8
H264
VP8
H264
SFU
* SFU: selective forwarding unit
SFU
SFU
SFU
SFU
SFU
webRTC
peer
* libp2p POV
peer
peer
peer
peer
peer
peer
peer
discovery
const casto = new CASTO();
media.srcObject = await casto.start();
Issues
What if they are under the same Public IP, but different router? (NAT-NAT)
What is one is on WIFI, but the other is using LTE?
What if the router bans UDP port for webRTC?
STUN/TURN server gets centralized!
Issues
Time solves the problem most of the time (Safari sucks..)
Safari started supporting webRTC Video just a year ago
New SDP Format - Possibility of flexible effective relay
Audio compatibility issues different browsers
Issues
Various Peer Discovery methods
Apply mDNS in a private Network
Peer/Content Routing using kadDHT
Performance tuning for different browsers
Next CASTO