libdatachannel icon indicating copy to clipboard operation
libdatachannel copied to clipboard

Bandwidth estimation

Open mateusz-osojca opened this issue 2 years ago • 8 comments

(Sorry if that is a duplicate but couldnt find it)

Are You guys supporting dynamic bandwidth estimation? Meaning that whenever bandwidth drops we have automatic adjustment of resolution / frame rate?

mateusz-osojca avatar Aug 23 '22 07:08 mateusz-osojca

libdatachannel doesn't perform video encoding and decoding by itself, so the user has to handle externally anything related to encoding, like bitrate, resolution, and framerate.

Also, for now there is no proper congestion control algorithm implemented in the library, only basic mechanisms like REMB, but GCC might be implemented in the future.

So the short answer is no, you have to do it on the application side.

paullouisageneau avatar Aug 26 '22 11:08 paullouisageneau

Can I use datachannel transport the data insteal of that media-sender. what is the different between them in the lower level code. I want to transport some sensor information from my toy car to my client. I want to try its best to use the network bandwidth.

fengmao31 avatar Feb 22 '23 15:02 fengmao31

@fengmao31 It's not a matter of bandwidth usage but a matter of traffic properties and constraints. If you want to transmit real-time video or audio (either already packetized as RTP or raw samples with a packetizer), then use a media track, otherwise for anything else use a data channel.

paullouisageneau avatar Feb 28 '23 11:02 paullouisageneau

I donnot want to send the media data. I want to transprot the lidar data.

fengmao31 avatar Mar 02 '23 00:03 fengmao31

I donnot want to send the media data. I want to transprot the lidar data.

Then you should use a data channel.

paullouisageneau avatar Mar 02 '23 08:03 paullouisageneau

yes. but I try to set different collect level to control the size of lidar data. I need the rtcp package to know the situation of network change the level of collect to send more or less data. So I donnot know start from the media channel or data channel to finish this expriment.

I think it is a good idea. Even I can both lower the collect size of lidar and add some disks to store the data in the bad network.

fengmao31 avatar Mar 02 '23 13:03 fengmao31

Hey @fengmao31

I plan on porting the Google Congestion Controller implementation from Pion soon. I am still learning libdatachannel, but I think it will all fit very nicely.

Essentially it takes the RTCP feedback (TWCC or RFC8888) and will returns an estimate. As the sender it will be your responsibility to send what it recommends (more/less)

Sean-Der avatar Mar 11 '23 05:03 Sean-Der

@Sean-Der That's great, actually @kuzux and @ognkrmms have been working on adding TWCC support and GCC in libdatachannel, so you might want to synchronize with them!

paullouisageneau avatar Mar 11 '23 07:03 paullouisageneau