Replies: 4 comments 13 replies
-
This is interesting research. I think it is good to keep this optional because there may be Pros and Cons depending on the situation. There may be other similar methods that work also. I 'just thought now' that the server could assign different unchanging ports for different clients for a similar effect. Note that Jamulus needs to be a good internet citizen, and not look menacing either, to avoid negative attention. |
Beta Was this translation helpful? Give feedback.
-
That requires at least a 15 packet buffer length, to allow for out of sequence arrivals, to avoid loss, though, doesn't it? If there's, say, three packets of random jitter on each queue additional buffering for that fifteen lots of jitter will get added on top of the 15 packets inherently required for sequencing. So that adds up to more latency, surely? |
Beta Was this translation helpful? Give feedback.
-
@pljones : I just use 3x1ms HPSJAM packets for out of sequence arrivals. There are some magic constants in there. It has something to do with statistics and randomness. It's not directly logical. HPSJAM allows 1/3 of packets to dissappear, unlike Jamulus. Which means HPSJAM takes the first 10 packets out of 15, before it starts producing sound. If the 10 best links out of 15 have similar latency, it adds no more than 3 ms of delay on RX. For example a 3 ms HPSJAM frame looks like this: Supposedly the three packets go on different links and we pick the 2 first packets (any of the 3) which allows for full audio reconstruction. This repeats 5 times for the 15 ports. --HPS |
Beta Was this translation helpful? Give feedback.
-
During the last few days I've made a slew of changes to HpsJAM w.r.t. multi-path UDP routing. If Jamulus could do something similar audioquality would improve instantly w/o having to sacrifice any bandwidth. I think you can use my techniques even without redundancy packets. Please give HpsJAM a spin and you'll see the difference. Sorry I don't have time to make patches for Jamulus. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm the author of HPSJAM, See https://github.com/hselasky/hpsjam . I recently made an interesting discovery, that the biggest enemy for low latency audio is Jitter and not packet loss.
The internet is connected not only using one physical connection, but many. The IPv4- and IPv6- address and UDP port numbers are used to select on which physical fiber your application traffic is put. Also inside routers, traffic is split up into multiple so-called per-CPU queues, using the exact same principles. When using fixed address information it is called a stream and packets are processed in sequence. When using variable address information it is called a multi-stream.
When many applications output data at the same time, the streams that end up on the same packet queues and physical fiber links may overflow at random points in time causing random Jitter. But not for all queues at the same time.
By using multi-UDP streams (15-ports) allowing up to one of three packets to get delayed or lost, low latency applications end up with much higher overall quality and stability I've found. In HPSJAM there is now a GUI button to select single- or multi- port and the difference is quite noticable.
I was wondering if Jamulus could do something similar? I've used 15 ports, because the sequence number spins around 255, because that makes sense for the 1/3 packet loss too.
Packet 1 goes to port+0, packet 2 goes to port+1 and so on, until it repeats.
Any comments?
--HPS
Beta Was this translation helpful? Give feedback.
All reactions