|
|
Subscribe / Log in / New account

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 9, 2020 16:46 UTC (Mon) by smurf (subscriber, #17840)
In reply to: Bouzas: PipeWire, the media service transforming the Linux multimedia landscape by intgr
Parent article: Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Well, it is. Open pavucontrol and the thing goes from 5% to 50% CPU if your setup is sufficiently interesting. I reported that years ago. Yes it's reproducible.

PA is not high-latency per se, but it doesn't have hard bounds on its latency either. You add a sink that delays for half a second? fine, that's your new channel latency, and your video player needs to notice the change and deal with it. That's fine if your source is in fact a video player, not so if it's a live phone call. Add a multi-microphone setup with a DSP that's supposed to isolate the driver's voice from all the other noises in and around the car (not to mention the other side of the phone call) and you're in trouble.


to post comments

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 9, 2020 19:37 UTC (Mon) by flussence (guest, #85566) [Link] (2 responses)

pavucontrol creates ~30Hz taps for all sources/sinks in order to show the fancy VU meters. It could capture the raw streams and pay the CPU cost in its own process, but then someone else would probably complain that PA stops working over their wifi when it's open.

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 9, 2020 21:03 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

Could it change the strategy based on whether the networking support is loaded or not?

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 9, 2020 21:32 UTC (Mon) by smurf (subscriber, #17840) [Link]

Yeah, I know. But that's not a good-enough excuse for 50% load. That 5% is caused by one or two application sources going to one hardware sink. Everything else is dormant. Thus PA's pavucontrol would only have to enable my three hardware sources, preferably with suitably lowered bitrate. Thus, 15% at most. Everything above that is bad design (and would kill audio on a system that does actual multi-channel processing).

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 10, 2020 5:12 UTC (Tue) by foom (subscriber, #14868) [Link] (2 responses)

But if I _do_ have a sink that delays by half a second (eg Bluetooth sometimes), what's the audio system gonna do better than to report it?

Sure, that's an extremely obnoxious delay, but isn't it good if it can deal with that reality as best as possible, instead of falling over?

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 10, 2020 6:50 UTC (Tue) by smurf (subscriber, #17840) [Link]

There's a number of things you can do. Like blocking the connection of a new sink if it introduces a delay of more than .1 second or whatever, or keeping it out of the loop.

For instance, a phone call on Bluetooth with that kind of delay is annoying but survivable, while he same thing on speaker is not. Also, a phone call shouldn't suddenly goes from .05 to .5 seconds latency because Pop's hearing aid also wants to listen in.

Decisions like these (do you *want* Pop to listen? should his microphone be cross-connected? or should the call switch to him entirely?) should be under the purvey of a policy manager, not any single application. PA doesn't have that.

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 10, 2020 9:55 UTC (Tue) by abo (subscriber, #77288) [Link]

If the audio system is also the video system it can delay the video to match.

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 10, 2020 10:42 UTC (Tue) by intgr (subscriber, #39733) [Link] (5 responses)

> Open pavucontrol and the thing goes from 5% to 50% CPU
That may be true but it's a red herring; I'm interested in behavior under normal circumstances. The pavucontrol UI is deprecated and normal users don't keep it open for long periods of time. pavucontrol is not compatible with PipeWire so it's not like PipeWire can improve over that anyway.

> but it doesn't have hard bounds on its latency either. You add a sink that delays for half a second? fine, that's your new channel latency
In normal circumstances you output to a single sink at a time. If your sink has high latency, well, there's nothing that PipeWire can do to improve that either, right?

Please, let's stop the hand-waving and anecdotes and concentrate on what PipeWire actually TECHNICALLY does (or even theoretically could do) that's so much better.

My issue is that TFA and other official PipeWire sources make sweeping claims suggesting that PulseAudio is high-latency, resource-intensive etc and then do nothing to back those claims up, nor explain how they improve over it. And this comment thread is just another example of that.

For comparison, PulseAudio has technical explanation about how they implement a *low-latency* and low-wakeups (i.e. not resource intensive) sound server: http://0pointer.de/blog/projects/pulse-glitch-free.html and it seems to me it does everything it can within the constraints of the hardware.

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 13, 2020 11:50 UTC (Fri) by jschrod (subscriber, #1646) [Link] (1 responses)

> The pavucontrol UI is deprecated

Could you please elaborate what should be used instead?

https://www.freedesktop.org/wiki/Software/PulseAudio/About/ doesn't list pavucontrol as deprecated; i.e., it's not in the section "obsolete or out-of-date UI tools".

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 13, 2020 21:15 UTC (Fri) by intgr (subscriber, #39733) [Link]

> doesn't list pavucontrol as deprecated

Sorry you are right, it's not deprecated. I may be confusing it with "paman".

But it's my understanding that pavucontrol was not intended to be the primary UI, in favor of tools integrated into the desktop system, such as "gnome-control-center sound". This sentiment is already present in a 2007 post by Poettering about integrating PulseAudio with Gnome. [1] So I don't consider CPU usage of a specialist UI to reflect badly on PulseAudio itself.

[1] https://mail.gnome.org/archives/desktop-devel-list/2007-O...

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 14, 2020 6:53 UTC (Sat) by wtay (guest, #55923) [Link]

> Please, let's stop the hand-waving and anecdotes and concentrate on what PipeWire actually >TECHNICALLY does (or even theoretically could do) that's so much better.
>
>My issue is that TFA and other official PipeWire sources make sweeping claims suggesting that >PulseAudio is high-latency, resource-intensive etc and then do nothing to back those claims up, >nor explain how they improve over it. And this comment thread is just another example of that.

I have posted some Performance measurements between PipeWire, PulseAudio and JACK2 on the Wiki now: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/...

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 14, 2020 13:15 UTC (Sat) by wtay (guest, #55923) [Link] (1 responses)

>pavucontrol is not compatible with PipeWire so it's not like PipeWire can improve over that anyway.

You can run pavucontrol under pipewire just fine and I often do to check signals and change volumes etc.

Pipewire runs the peaks resamplers in the pavucontrol process. The effect is that the load is shifted from the server to the client. I don't have numbers to compare but I remember pavucontrol uses approximately the same CPU while the Daemon much much less in the case of pipewire.

Bouzas: PipeWire, the media service transforming the Linux multimedia landscape

Posted Mar 14, 2020 16:58 UTC (Sat) by smurf (subscriber, #17840) [Link]

The flip side is that under PipeWire pavucontrol needs a whole lot more network bandwidth. Not an issue locally but a potential problem when we're talking about a larger network of servers.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds