Live data from Hacker News

3K, 60fps, 130ms: achieving it with Rust

blog.tonari.no

161–170 of 211 posts

Re: 3K, 60fps, 130ms: achieving it with Rust

#162
post #85
post #7

Aside from the Rust aspect (which is cool!), I can't believe we've come this far and still don't have low-latency video conferencing. Maybe I'm overly sensitive, but people talking over each other and the lack of conversational flow drives me crazy with things like hangouts.

Well, all the effort is regularly defeated by poor hardware - you can have 40ms latecy in the video call stack, but when people attach Bluetooth headphones which buffer everything for 300ms there's nothing really to be done. (Be gentle on your coworkers and use cabled headphones.)

LLAC/LHDC LL bluetooth codec adds only 30ms.

AptX low latency codec adds only 40ms max.

Just buy headphones with good low latency support. They aren't even expensive anymore.

Re: 3K, 60fps, 130ms: achieving it with Rust

#164

"we truly don't believe we could have achieved these numbers with this level of stability without Rust" Oh please. This is just rust sensationalism. People don't truly believe rust is faster than C do they?

In some problems Rust is the fastest:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: 3K, 60fps, 130ms: achieving it with Rust

#165

"we truly don't believe we could have achieved these numbers with this level of stability without Rust" Oh please. This is just rust sensationalism. People don't truly believe rust is faster than C do they?

Developing stable complex software in C takes a hell of a lot more effort and skill than it does in Rust IMO.

Re: 3K, 60fps, 130ms: achieving it with Rust

#166
post #76

The bottleneck is not on the CPU. I'm afraid this company may have wasted their time trying to reinvent WebRTC. If you really want to get realtime video, I think the best approach is a custom codec on CUDA or better yet custom hardware (FPGA). You can only go so far on general purpose hardware before you hit a wall and get Zoom/WebEx quality.

Is or is not? I’m confused: if the bottleneck is not on the CPU what does CUDA solve?

The bottleneck is the video encoding/decoding/rendering, which is done on GPUs to begin with. Of course if it were done on CPU instead, then it would be significantly worse, but that's not where we're starting from. Improving stuff on the host side by, say, rewriting WebRTC in Rust won't improve the latency of your video by much or at all.

Re: 3K, 60fps, 130ms: achieving it with Rust

#167
> We just enforce rustfmt.

After interaction with both rustfmt and go fmt, I have concluded that .editorconfig is solving a problem that really shouldn't be solved. We went through the ordeal of defining our C# coding standards where I work and, let me tell you, people (myself included) care very deeply about their way of structuring code. And it's a bloody waste of their time.

Having the language designers say, "here is how our language should be structured" is a breath of fresh air.

Re: 3K, 60fps, 130ms: achieving it with Rust

#168

Earlier quoted context omitted.

But that statement seems at odds with a dependency on the enormous WebRTC AudioProcessing C++ module. But then they also say they don't use WebRTC so maybe I misunderstand what's going on.

My understanding is that the quoted statement was explaining why they moved away from WebRTC.

We moved away from WebRTC completely for video, networking, and some audio. We still use webrtc-audio-processing for acoustic-echo-cancellation and some other niceties. Here is our Rust wrapper for that library:

https://github.com/tonarino/webrtc-audio-processing

Re: 3K, 60fps, 130ms: achieving it with Rust

#169
post #155

I wonder how it compares with apple facetime on two new macbooks with ethernet connections on both sides. They actually work on reducing latency and pushing high res video if your connection supports it.

That's a great idea, I've always preferred facetime at least for the video quality. We'll do a latency test sometime, I suspect it'll be quite good!

Re: 3K, 60fps, 130ms: achieving it with Rust

#170

"we truly don't believe we could have achieved these numbers with this level of stability without Rust" Oh please. This is just rust sensationalism. People don't truly believe rust is faster than C do they?

I don't believe Rust is faster than C, but I would argue it's faster to develop new products in Rust vs. C, and easier to produce programs which don't have data races or invalid memory accesses.
Post reply on HN