Hacker News new | ask | show | jobs
by throwawaybbqed 2226 days ago
I've looked at WebRTC a few times, and every time I've been overwhelmed by the complexity of the protocol. I understand video streaming is hampered by codec patents, etc. but in 2020, the situation seems to be getting better with open source codecs unencumbered of patents (VP8,VP9, AV1, etc.) Why is the best we have still WebRTC? Seems it could be simplified as a protocol .. is this inherently hard or just a result of being designed in a committee?
4 comments

It's way too complicated. I suspect it's some design by committee with large backer interests interfering.

WebRTC is a collection of underlying protocols, SDP, STUN, DTLS, RTP, SCTP. A superficial glance it seems to make sense, each of these RFCs provide some aspect needed in WebRTC.

However. These standards are from a naive happy time when the internet was open and routable, which means it's only some subset of said standards needed. The main WebRTC RFC fails at pinning down which, so it's down to the implementations to find some happy subset that works.

Trying to implement it is so frustrating. At every corner you follow links to some underlying RFC, start reading and coding only to realize "is this even used?!"

SDP is maybe the single worst thing in this mess. It's a terrible flat file description of structured data organized differently depending on "plan-b" or "unified". It would be super easy to convey what SDP tries to convey in any purpose built format.

On a conceptual level there are too many abstractions in the API. MediaStream and RTPTransceiver are my two pet peeves. MediaStream is maybe nice in client code to group some tracks together into a player, but the abstraction should stay on that level. RTPTransceiver is just beyond me. Why do I want it? How does this help?

It looks like RIPT[0] is people's answer to WebRTC's complexity.

I personally like WebRTC. Maybe just Stockholm syndrome though :) I see everyone saying QUIC is the answer, but all the complexity scares me. I imagine in 5 years everyone will miss how WebRTC is built with small building blocks.

WebRTC also bridges with a lot existing telephony stuff, which is nice! Since it talks RTP/SRTP I see a lot of people wiring it up to their older systems which is kind of cool!

[0] https://tools.ietf.org/html/draft-rosenbergjennings-dispatch...

You complain about SDP and about RPTTransceiver. But RTPTransceiver comes from ORTC, which was exactly introduced to avoid messing with SDP all the time. And you need it to specifiy simulcast layers. You don't need to use it.
I think you're misunderstanding what WebRTC is. It's only loosely related to specific video codecs. It can carry H.264, VP8, and VP9.
I think the main problem is that webRTC started from VOIP standards. That's why we're stuck with SIP and thousands of RFC's that seem very daunting for a newcomer to webRTC. I guess that's also why so many webRTC developers seem to come from spain (they were always big in the VOIP world with companies like telefonica).

It's getting slowly better since the standard introduced concepts from ORTC.

I thought that this news was about mediasoup, not about generic WebRTC questions.