Hacker News new | past | comments | ask | show | jobs | submit login

> Media via Datachannels is being chosen more and more (can be HW accelerated)

That piqued my curiosity. Could you please expand on this? What kind of hw accel can be applied to video when it is sent through DataChannels instead of the standard video channel?




The encryption for DataChannels is HW accelerated while video is not. I was able to convince people to change this one! So a developer can opt-in to the accelerated profile.

https://bugs.chromium.org/p/chromium/issues/detail?id=713701...


Dude, thank you for this. My team has been trying to figure this out - we know we will eventually need a way to utilize in a low-level context, but couldn't dig up any cases of such an implementation. In addition, we were constantly frustrated by the lack of HW acceleration that created a performance bottleneck. Great work!


Nice speedup! However it seems that AES-GCM comes at a cost of considerable increases in packet sizes, from what I could read in the link. Have you observed an increase of packet loss and latencies in real-world networks? (esp. with third world connections)

The improvements in CPU usage are clear for the server, but the choice doesn't seem so obvious to me

EDIT: I meant that, for the quality of end-user experience (who doesn't care about server load), it doesn't seem like an immediately obvious better choice to just use GCM, until some empiric testing shows if the potential increase of packet loss causes noticeable problems, or on the contrary, doesn't. It would be very cool reading any observations in this regard.


Sorry I haven't done any measurements myself. Agree, it is a trade-off for sure, if you are doing video and packets are already ~1300 bytes it probably makes sense. For Opus only you are really blowing up your payload.

You might see CPU improvements on the client side as well though! If you have a fixed set of clients it might be something worth evaluating.

I personally don't have any real-word deploys I can measure. The AES-GCM work came around because a Pion user mentioned it me, so then I added it/tried to push the issue in the IETF/W3C.


There's a proposal that would let video encoding be accelerated without going through the entire WebRTC pipeline: https://github.com/WICG/web-codecs/blob/master/explainer.md

Somewhat tangentially related, for cases when P2P connectivity is not needed, there's also a proposal that lets you send data unreliably, but in a client-server setting: https://github.com/WICG/web-transport/blob/master/explainer....

Both are currently being actively prototyped in Chromium (full disclosure: I've been working on the latter).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: