View Single Post
Old 11-17-2018, 01:43 AM   #2
pljones
Human being with feelings
 
pljones's Avatar
 
Join Date: Aug 2007
Location: London, UK
Posts: 597
Default

Loss of synchronisation can occur at many points.

For a start, the capture of audio and video will usually be separate devices and there can be different processing delays introduced here.

Then there is the encoding process: video and audio use different encoders, which have different amount of CPU time needed and hence will definitely take (markedly) different amounts of time. If either becomes "too slow", you'll get a definite loss of synchronisation happening unless the processes "know" how to maintain any established synchronisation.

Next, transmission to the server will require an amount of time proportional to the amount of data -- which will be larger for video. Once more, the transmission could separate the streams. However, the NINJAM protocol is designed to prevent this if a supported format is used - it has to do this for audio streams already.

Then the above get handled, in reverse order, by each client: receive, decode, present.

You need a system that will first remove any capture delay as much as possible, then ensures that the data is encoded in a way that NINJAM will transport without loss of synchronisation.

The NINJAM client software, of course, adds further delays to any signal it receives to align all remote clients with its time base. However, of itself, this shouldn't cause separation between two signals from the same client: if it did, that would cause issues for audio as well as mixed audio and video (and I'm not aware of that happening).

Of course, if the video signal is "too slow", then it's going to cause problems - it will cause the "slow" peer to fall out sync with the time base by an interval or more to allow it to catch up (or get kicked, possibly) - but that's not sync between audio and video.
__________________
Quote:
Originally Posted by Tony Williams
...Playing fast around the drums is one thing. But to play with people for others, to listen to, that's something else. That's a whole other world.

Last edited by pljones; 11-17-2018 at 01:55 AM.
pljones is offline   Reply With Quote