Jitter when using anything other than Brave browser on Linux (Fedora)

Hello !

I have a JackTrip v1.3.0 client running on a Raspberry Pi 3 Model B, itself attached to a DAC and speakers, and JackTrip v1.5.1 running as server on my Linux laptop (Fedora 35 KDE Spin, using PipeWire for audio server).

I’m very impressed with the performance with the Brave browser, but when I use Firefox, the audio gets extremely jittery. The strange thing is, when I open OBS Studio or play audio through Brave, there is no more jitter…

I’m using a bash script I wrote that creates a pipewire sink using the following command :

pw-cli create-node adapter \
        "{ 
                factory.name                    = support.null-audio-sink 
                node.name                               = \"JackTrip Stream \"
                media.class                     = Audio/Sink 
                object.linger                   = true 
                monitor.channel-volumes = 1
        }"

The sink then send audio to the JackTrip server input, which streams it to my Pi.

I’ve tried changing the niceness value of the jacktrip server, the pipewire audio server, to no avail.

Does anybody know how to fix this issue ?

This might be a dumb question, but how is the browser involved at all? What are you trying to do in the browser itself?

Not a dumb question ! I’m streaming audio from sources such as YouTube for example, my use case for JackTrip is to connect my laptop to a set of speakers for a budget home theater experience.

It does seem likely related to scheduling priority, IMHO. It’s extremely important to run jacktrip (and jack) with not only a very un-nice value (-19), but also to ensure they are “real-time.”

If you are using systemd to run them, you’d want to add lines like these:

IOSchedulingClass=realtime
IOSchedulingPriority=0
LimitMEMLOCK=infinity
LimitRTPRIO=99
LimitNOFILE=200000
LimitNPROC=200000

Otherwise, I suggest man chrt and using that to ensure the processes are running using --fifo or --rr