<html><head>

<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr"><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Cantarell; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">On Mon, 2021-06-14 at 00:13 +0000, Matt Keys wrote:</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Cantarell; font-size: 14.666666984558105px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;"><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">The underlying question being -- which (opus stereo at 48k or uncompressed UDP) is best for lowest latency and highest quality audio while assuming the endpoints are physically distant? As far as I can tell Jacktrip recommends max distance of 250 miles or less between clients, and "Research suggests it's very difficult to perform music with a delay greater than 25 milliseconds". </div></blockquote><br class="Apple-interchange-newline"><div>I would say the main difference is the data size compression Opus offers. Uncompressed audio will always be higher quality, especially if you're doing further processing on the feed. But Opus audio can be less that 1/10th the space. Depending on how fast your network connection is, that can be the difference between it working, or not.</div><div><br></div><div>The trade-off is that Opus needs to work on fixed blocks of audio, while with uncompressed you can in theory send a sample at a time. We recommend 20 ms blocks for general use, and 10 ms for interactive use. But 10 ms (480 samples at 48 kHz) is still much larger than the 64 samples or so jack uses for its buffers. That's almost half of your 25 ms latency budget! Now, Opus goes down to 2.5 ms (120 samples) but going smaller than 10 ms hurts compression efficiency, when means you need to give it more bits. Each network packet also has a fixed overhead, which at very low latencies can be larger than the audio! So in general it's diminishing returns below 10 ms.</div><div><br></div><div>25 ms is a reasonable rule of thumb. That's how long it takes sound to cross a medium-sized concert stage. Larger than that and you'd need to adjust your playing so it sounds in time to audience even in person.</div><div><br></div><div>Inside a local network (e.g. in the same building or campus) where network latencies are below 5 ms, and data limits are usually much higher, using very small frames, whether Opus or PCM, really pays off. Over longer distances congestion and limited data rates often mean you're better off with sending fewer blocks each with more audio, even when you're splitting your latency budget evenly between the packet size and the network. And in that case you might as well use Opus.</div><div><br></div><div>Of course you should also just try both and see how they work for you. We designed Opus with live music in mind, so it's great to hear about successful applications!</div><div><br></div><div>FWIW,</div><div>Ralph</div><div><br></div><div><br></div><div><span></span></div></body></html>