Technical comparison with Sonobus #1313
Replies: 15 comments 29 replies
-
Thanks for this information. My use of Sonobus has been pretty limited because every time I used it it crashed after a while, but I did notice that with the better sound quality settings one is quickly over 1Mb/s for each user connected. For big groups that will be very limiting as every user needs to provide that speed at their connection. But my problem with peer-to-peer programs such is Sonobus is another. That is that there is no synchronization between the users. Everyone hears something else depending on the ping times they see to the other users. If there are few users and they have very low ping times all will be well. But for bigger groups and more widely varying ping times that will make playing synchronization impossible as what one person hears as synchronous will not be what another hears as synchronous. In any case, please continue to inform us about your experiences. We can certainly learn from each other, the more the better. (As an aside: I find it interesting that I have rarely heard groups playing music on Sonobus, I hear just groups talking about Jamulus. But maybe all the music making is happening on private groups, I don't know.) |
Beta Was this translation helpful? Give feedback.
-
In theory you could even talk to the SonoBus developer/point him to this thread since it's also FLOSS as far as I know |
Beta Was this translation helpful? Give feedback.
-
I play drums and tried Sonobus. The issue for me was lag (latency) and the inability to stay on beat. There is a metronome built-in to Sonobus and tried using it but it didn't really help. The situation was similar to joining a Jamulus server with a very high ping time, anything over about 20ms ping and 40ms total connection latency is not good. So I run my own server over my home fiber-optic internet and that works great for me and my other band mates. If someone with a high-latency connection joins the server, it doesn't ruin the whole jam for me, where in Sonobus, that was the opposite of my experience, if someone with high latency joins it immediately ruins the session. Now granted I don't have a tone of experience just a couple hours of trial and error. But at this point Jamulus provides the better, more predictable experience. |
Beta Was this translation helpful? Give feedback.
-
I didn't try using it over wifi, but my sense is that Sonobus tends to trade-off higher latency for better sound quality relative to Jamulus. |
Beta Was this translation helpful? Give feedback.
-
I am intrigued by the comments that Sonobus is easier to set up. |
Beta Was this translation helpful? Give feedback.
-
I play drums and tested JamKazam, Sonobus and Jamulus. My experience was similiar to @RobVM1. A for Sonobus I tested with my band mates because the audio quality seems better, you don't usually get pops and waverly sounds. The problem for us with Sonobus was latency. In my case I was hearing almost every member in different times, first guitar, then bass and finally the singer...It was difficult to play in time. We used PCM 16 quality audio to decrease in 5ms (roundtrip) the latency (decompression takes about 2.5ms). We live in the same town so I really did not understand why the experience was so bad. So happily we stick to Jamulus :). I agree with @dcorson-ticino-com about configuration...for me is the same thing in Sonobus and Jamulus, select Device and inputs/outputs, configure ASIO... As a general rule with peer to peer the least members in a group the better. But you can have a good session with 10 members and bad session with 5 members, I guess because the way peer to peer works. You can find just a few public groups in Sonobus, so almost everything is happening in private groups (at least when I connect, I live in Barcelona, Spain). |
Beta Was this translation helpful? Give feedback.
-
One of the things that can explain "quality of sound" seems to be better in Sonobus is about how you are hearing yourself. I mean, the first time I tested Sonobus (JamKazam too) I was alone in a private test group and the first thing I noticed was "I hear myself better". In my opinion it was because of two things a) the quality of sound b) no latency. |
Beta Was this translation helpful? Give feedback.
-
I'm really pleased that j-santander has started this discussion. I would like to use Jamulus more, as I am currently paying for a privately-hosted server subscription, however the audio quality of SonoBus is superior in my experience. It's most-noticeable when using a stereo microphone and acoustic guitar. Jamulus seems to have trouble keeping the left and right channels time-aligned after dropouts resulting in what sounds like a constantly changing frequency response due to the phase shifts. Pluck a single string and just let it decay; repeat. The D or G string is best. Hopefully you'll hear what I'm describing. It sounds like the low frequencies "pop" in and out of a flat, full-spectrum response. This phase shifting can also be heard with client and server on the same box although with fewer dropouts it's harder to reproduce. It happens for me on Windows, Apple and Linux OSs. I experience none of this with Sonobus; recording at PCM 24 bit with another local guitarist feels like being in different iso booths at the same studio. I was hoping the Jamulus team knew about this issue and was working on a remedy for the 3.7.0 release. |
Beta Was this translation helpful? Give feedback.
-
This made me think of a question for the Jamulus developers in particular: Edit: |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm the main developer of SonoBus. Since Jamulus and SB both use Opus, I too am curious why people seem to hear SonoBus as having higher audio quality overall, and I have a few theories. First, currently SonoBus (via AOO) is using the standard multichannel opus encoder and not the custom encoder that Jamulus uses. Here is a section of the Opus docs from the Custom section: https://www.opus-codec.org/docs/html_api-1.0.2/group__opus__custom.html
Since SonoBus doesn't use the custom encoder, it will only use the minimum 2.5ms (120 samples) frame size when the native processing block size is low, thus incurring a small buffering delay when other frame sizes are used for audio processing. But I bolded the sentence that I wonder is part of the issue... it's unclear exactly what "chunk of the codec" is disabled, and what quality losses occur when using the custom encoder. The other aspect of P2P vs server based, is that with P2P each party gets separate opus encoded stream from each player, vs one mixed audio stream for the server-based... the encoder has a bit of an easier job because the content is less complex (single instrument vs full mix, etc). Also, there is one less encode-decode step in the chain. I don't know how much this affects it. The third thing, is due to the potentially larger jitter buffers that SB needs due to implementation issues, there are probably fewer network underruns and thus fewer disruptions to the audio (where opus has to go into drop mitigation mode, etc). Going forward, I'll be working with the AOO developer to see if we can make some improvements to low-latency performance... and some of that may be attempting to use the same custom encoder options that Jamulus is... and maybe then we'll see if that is a source of the quality differences. |
Beta Was this translation helpful? Give feedback.
-
essej ***@***.***> writes:
Hello, I'm the main developer of SonoBus. Since we both use Opus, I
too am curious why people seem to hear SonoBus as having higher audio
quality overall, and I have a few theories.
First, currently SonoBus (via AOO) is using the standard multichannel
opus encoder and not the custom encoder that Jamulus uses. Here is a
section of the Opus docs from the Custom section:
https://www.opus-codec.org/docs/html_api-1.0.2/group__opus__custom.html
> Opus Custom is an optional part of the Opus specification and
> reference implementation which uses a distinct API from the regular
> API and supports frame sizes that are not normally supported. Use of
> Opus Custom is discouraged for all but very special applications for
> which a frame size different from 2.5, 5, 10, or 20 ms is needed
> (for either complexity or latency reasons) and where
> interoperability is less important.
>
> **In addition to the interoperability limitations the use of Opus
> custom disables a substantial chunk of the codec and generally
> lowers the quality available at a given bitrate**. Normally when an
> application needs a different frame size from the codec it should
> buffer to match the sizes but this adds a small amount of delay
> which may be important in some very low latency applications. Some
> transports (especially constant rate RF transports) may also work
> best with frames of particular durations.
Since SonoBus doesn't use the custom encoder, it will only use the
minimum 2.5ms (120 samples) frame size when the native processing
block size is low, thus incurring a small buffering delay when other
frame sizes are used for audio processing. But I bolded the sentence
that I wonder is part of the issue... it's unclear exactly what "chunk
of the codec" is disabled, and what quality losses occur when using
the custom encoder.
Maybe custom tables?
Going forward, I'll be working with the AOO developer to see if we can
make some improvements to low-latency performance... and some of that
may be attempting to use the same custom encoder options that Jamulus
is... and maybe then we'll see if that is a source of the quality
differences.
Jamulus uses either 128 sample or 64 sample Opus. The main point it
tries to achieve is matching the buffer size of the soundcard I think.
My personal opinion is that this is a mistake. Here's why:
a) 64/48kHz = 4/3 ms which is a bad unit for a timer, and the server
runs by timer loop. In contrast, 120/48kHz = 2.5 ms .
b) Packets are not self-describing which means that any change in
parameters has to be synchronised with the transmission of such
parameters. On the plus side, packet _size_ is one such parameter that
could be implicitly used. Jamulus, however, only uses it for deciding
whether arriving packets are data packets or signaling packets and drops
anything of unexpected size, making it unsuitable for VBR. The Opus
self-description is not actually costly.
c) Jamulus has an option to record input. It records it as WAV. Using
a standard Opus frame would mean it could just dump the Opus frames,
being faster, and not wasting storage on information that wasn't there
before unpacking into WAV.
d) soundcard drivers (at least the ASIO ones) actually tend to go for
(power of 2) multiples of 24 samples (0.5 ms)
e) (forward-looking:) WebRTC is recognised Internet infrastructure and
packages standard Opus. Using the protocol would likely make Jamulus
packets be transported more consistently. Whether it makes sense to use
the libraries, too, depends on whether one can configure them well
enough to make them increase latencies only in emergency situations.
The amount of effort Jamulus invests into squeezing out milliseconds is
not matched by the quality of the code base and the programmer power
available for maintaining it. That makes the advantages more
theoretical than actually available in a dependable manner.
I've not dabbled all that long with Jamulus, so my opinion may be
comparatively unqualified or untainted (pick your favorite
characterisation).
…--
David Kastrup
|
Beta Was this translation helpful? Give feedback.
-
Noam Postavsky ***@***.***> writes:
> d) soundcard drivers (at least the ASIO ones) actually tend to go
for (power of 2) multiples of 24 samples (0.5 ms)
I agree with most of your points, but I don't think this one is
true. The docs for `ASIOGetBufferSize` say "Usually, the buffer size
will be a power of 2", with nothing about multiples of 24. My Motu M2
allows these sizes:
![image](https://user-images.githubusercontent.com/287742/115159429-0d479900-a061-11eb-88b1-57333bf4727d.png)
OK. I'll admit that my sample size had been 2, so I might have been a
bit too eager in overgeneralising it :)
…--
David Kastrup
|
Beta Was this translation helpful? Give feedback.
-
Not 100% related, but I thinking could be worth publishing an article on the KB how to link SonoBus and Jamulus. This might allow people to listen/join by phone. |
Beta Was this translation helpful? Give feedback.
-
Just a quick mention of this wikipedia page if anyone interested in comparative information between Jamulus, Sonobus or other systems wants to make sure it's up to date. |
Beta Was this translation helpful? Give feedback.
-
Martin Schönfeld ***@***.***> writes:
> a) 64/48kHz = 4/3 ms which is a bad unit for a timer, and the server
> runs by timer loop. In contrast, 120/48kHz = 2.5 ms .
I think you meant **128**/48kHz and not **120** which doesnt change
the fraction problem you mentioned because the denominator stays
3. Its for every power of 2 the same
I meant exactly what I wrote. Obviously if you nilly-willy change the
numbers, the results become wrong and my post wouldn't have made sense
in the first place.
> The docs for ASIOGetBufferSize say "Usually, the buffer size will be
> a power of 2", with nothing about multiples of 24.
My ZOOM UAC-2 uses buffersizes by the row 32*n (32, 64, 96, 96,
192...). Here with 96 it even goes 96 samples / 48kHz = 2.0 ms
The sound card buffer size has comparatively little to do with the timer
loop shuffling data to and from the network (and the server) since there
is intermediate buffering.
…--
David Kastrup
|
Beta Was this translation helpful? Give feedback.
-
To give a bit of context. I'm part of a choir which is using jamulus for some of its rehearsal sessions.
Most of the people is non technical, but, so far and after some rough starts, we're doing mostly ok and it is starting to feel like singing in a choir.
Perhaps the key learning point is that a session success depends critically on the absence of "bad participants" (people with bad connections, bad headphones/microphone or simply insufficient knowledge of what we're singing). To minimize those problems we had to resort to limiting the number of people per session (as more people involved increases the possibility of a "bad participant" presence).
We're now trialing Sonobus. So far the observations (consensus of the people participating) are:
Technically and on the surface, the main difference seem to be that Sonobus uses All-to-All connections (i.e. there's no mix server, all participants connect to everyone and the mix you hear is created locally).
I guess this peer-to-peer connection works towards the simplicity of the setup. In jamulus we spent a lot of time solving issues with the servers until we finally settled on an externally hosted server on Internet.
However, this use of peer-to-peer connections means that there seems to be a number of people in the session that cannot connect to others. I suspect that trying to roll it out for the whole choir could mean a support nightmare of network operators/router vendors and setup combinations and trying to explain people how to do port forwarding.
The thing that intrigues me more is the "better quality" and "working well over wifi", in case there's something to learn and include back into Jamulus.
I don't have hard numbers or measurements to back up those affirmations and it might be simply people deluding themselves with a new toy.
From what I gather, both Jamulus and Sonobus use fundamentally the same approach:
In the case of Jamulus is its own protocol. In the case of Sonobus they use this Audio over OSC (forked). From what I've gathered, OSC is something in the same space as MIDI, but AOO seems to have hijacked some formats and syntaxis of OSC to create a protocol for audio transmission.
There seem to be some "resampling" that works towards hiding timing differences. Messages have sequence numbers and it seems that they could overlap (i.e. sending half a block in one packet and repeating it in the next).
Not sure, overall there seems to be few detailed technical information.
Beta Was this translation helpful? Give feedback.
All reactions