jacktrip-webrtc / jacktrip-webrtc

JackTrip meets WebRTC
GNU General Public License v3.0
390 stars 29 forks source link

WebTransport and Jacktrip-webrtc #20

Open ROBERT-MCDOWELL opened 3 years ago

ROBERT-MCDOWELL commented 3 years ago

Hi folks, is there any plans to implement http/3 webtransport?\ it will allow to create low level socket and put on top any kind of protocol, tcp or udp. thanks

matteosacchetto commented 3 years ago

Hi @ROBERT-MCDOWELL, thank you for the interest shown towards this project. Sorry for answering this late, but I've been a bit busy in the last month and I didn't had also time to check this repo.

Answering your question: at the moment we have other priorities. In particular we are having mainly issues related to acquisition latencies and stability/scalability and for the moment the transmission over the network does not seem to be the issue.

So, I do not see implementing the http/3 webtransport in the near future, but, I'm not excluding that, once we solve the issues we have, we won't try to see if it helps us with our goal 😃

Thank you again

Cheers, Matteo

ROBERT-MCDOWELL commented 3 years ago

some good info about it https://web.dev/webtransport/ https://github.com/w3c/webrtc-nv-use-cases/issues/62 webtransport can is I think the best way to relay client/server streams with low latency in case of peer2peer latency is too high

ROBERT-MCDOWELL commented 3 years ago

alos this pdf is interesting https://www.w3.org/2018/12/games-workshop/slides/21-webtransport-webcodecs.pdf

matteosacchetto commented 3 years ago

Thank you very much for the infos! I will check them as soon as I can!

I think we will definitely consider it for future improvements, just not right now. This is mainly due to the above mentioned issues 😅, since, at least for now, network does not seem to be the source of latency.

We are having issues in reducing the latency in the first step of the chain, so between when the mic records the audio, and when we have that audio available in the web page, since it seems that there is where the most amount of latency is introduced

Matteo

ROBERT-MCDOWELL commented 3 years ago

ha ok I see, I kind of ASIO management right? hardware create always problems indeed.

matteosacchetto commented 3 years ago

As of right now the configuration of the JS part (so AudioContext and getUserMedia) is the one which should give the lowest latency...

The problem is that any OS and any HW is different and so we what I would like to focus on is trying to figure out if and how could we reduce that latency of that first part in a way which is easy to implement for the user, if they need to change some settings in their OS, and which works with different web browsers, OS and HW

ROBERT-MCDOWELL commented 3 years ago

is the issue coming from the sound card sample buffer settings or the browser itself?

matteosacchetto commented 3 years ago

Well, we actually don't know... It's what we are trying to figure out 😅

I guess is more related to the configuration of the audio card/the driver/the audio server rather than the browser itself, but it's something which we will investigate for sure

ROBERT-MCDOWELL commented 3 years ago

ok, what I can say is for me the key of audio latency is the settings from the audio card, which is very often larger than 4096 samples which is around 100ms at 44.1khz right? on windows xp,vista,7, ASIO4ALL, win10 WASAPI API can fix the sample buffer to the lowest possible, depending of course of the sound card quality https://www.asio4all.org/ https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio on OSX and IOS https://developer.apple.com/documentation/audiounit and Safari browser https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackSettings/latency on Android https://developer.android.com/ndk/guides/audio/audio-latency