On 06/02/2021 22:29, Luis Héctor Chávez wrote:
>
> Which brings me to the actual question that I want to ask: if, as an
> embedder of noVNC, I were to add encoded audio support to noVNC in the
> least intrusive / most palatable way possible, what would be the way to go?
> Some alternatives I've considered so far:
>
> ...
>
> 5. Some other approach I did not consider?
>
We'd like to handle it cleanly, so that means a protocol extension.
Either building on the QEMU one, or something new.
Compression is not the only thing missing in the QEMU extension, so a
fresh start with a more complete audio protocol could be interesting.
You'd also need server support for this. Do you have one in mind you
intend to add support for this to?
On Mon, Feb 8, 2021, 1:38 AM Pierre Ossman <oss...@cendio.com> wrote:On 06/02/2021 22:29, Luis Héctor Chávez wrote:
>
> Which brings me to the actual question that I want to ask: if, as an
> embedder of noVNC, I were to add encoded audio support to noVNC in the
> least intrusive / most palatable way possible, what would be the way to go?
> Some alternatives I've considered so far:
>
> ...
>
> 5. Some other approach I did not consider?
>
We'd like to handle it cleanly, so that means a protocol extension.
Either building on the QEMU one, or something new.i am not opposed to building a new one. how does someone go about this?
Compression is not the only thing missing in the QEMU extension, so a
fresh start with a more complete audio protocol could be interesting.
On 08/02/2021 13:31, Luis Héctor Chávez wrote:
> On Mon, Feb 8, 2021, 1:38 AM Pierre Ossman <oss...@cendio.com> wrote:
>> We'd like to handle it cleanly, so that means a protocol extension.
>> Either building on the QEMU one, or something new.
>>
>
> i am not opposed to building a new one. how does someone go about this?
>
Just start hacking, that's usually the best way forward. :)
What we'd like is working code, and documentation for rfbproto.
> Forgot to ask, what else is missing from your POV? The only other thing
> that I could think of was some sort of mechanism to let the server know the
> client is lagging behind too much to drop some packets, but I may need to
> go educate myself how other protocols do it.
Primarily the buffer handling, yes. Normally audio should be "pull", not
"push". I.e. the playing sound card should own the clock and control the
data rate.
In a use case like this you also want low latency, and latency feedback,
since you want graphics and user actions to be in sync with the audio.
However low latency usually means low buffering, which could result in
stuttering.
Audio is unfortunately a complex beast since it is a real time problem.
Ideally we'd piggy back on something existing. Perhaps there is an
existing protocol we can encapsulate in VNC to handle things?
We here at Cendio use PulseAudio, and we handle it separately and not
embedded in the VNC stream. It is very capable, but it is also a very
complex beast. So something simpler should hopefully exist.
On 09/02/2021 03:59, Luis Héctor Chávez wrote:
>
> hmm although having a pull model for audio might introduce a lot of latency
> due to all the extra roundtrips (I was thinking about this since WebRTC
> also uses a push model, as opposed to DASH/LL-DASH, which are pull models
> and have 1-40s worth of latency). folks the other side of the earth might
> appreciate a latency reduction of 200-300msec by avoiding these.
>
That must be an implementation issue. All the professional stuff is pull
AFAIK. I've mostly seen DASH used for video, and not interactive stuff.
So latency was likely less important there than stuttering.
On Monday, February 8, 2021 at 11:06:14 PM UTC-8 oss...@cendio.com wrote:On 09/02/2021 03:59, Luis Héctor Chávez wrote:
>
> hmm although having a pull model for audio might introduce a lot of latency
> due to all the extra roundtrips (I was thinking about this since WebRTC
> also uses a push model, as opposed to DASH/LL-DASH, which are pull models
> and have 1-40s worth of latency). folks the other side of the earth might
> appreciate a latency reduction of 200-300msec by avoiding these.
>
That must be an implementation issue. All the professional stuff is pull
AFAIK. I've mostly seen DASH used for video, and not interactive stuff.
So latency was likely less important there than stuttering.
On 22/02/2021 05:12, Luis Héctor Chávez wrote:
> Sorry for the delay, I was cleaning stuff up. Here's the protocol extension
> docs: https://github.com/replit/rfbproxy#replit-audio-rfb-extension, it
Could you submit that as a PR to rfbproto so we can sort out the details
and get it officially documented?
And have you allocated those numbers with IANA?
> supports both pull and push models, although I got terrible results with
> the pull model due to the extra latency and the jitter introduced by the
> browser and the underlying AudioBuffer's state machinery, which doesn't
> allow chunks to be appended at arbitrary times. With the push model the
> audio was consistently smooth and was able to cap it to an acceptable
> ~500ms of total latency (could go as low as 300msec, but depending on where
> on the internet this was hosted it started tearing up).
>
That's a huge latency. For things to feel synchronised you generally
need to go under 100 ms.
On Mon, Feb 22, 2021, 12:37 AM Pierre Ossman <oss...@cendio.com> wrote:On 22/02/2021 05:12, Luis Héctor Chávez wrote:
> Sorry for the delay, I was cleaning stuff up. Here's the protocol extension
> docs: https://github.com/replit/rfbproxy#replit-audio-rfb-extension, it
Could you submit that as a PR to rfbproto so we can sort out the details
and get it officially documented?will do!
And have you allocated those numbers with IANA?i haven't. how does one do that?