Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: pipewire audio output driver #9462

Closed
laichiaheng opened this issue Nov 16, 2021 · 19 comments
Closed

feature request: pipewire audio output driver #9462

laichiaheng opened this issue Nov 16, 2021 · 19 comments

Comments

@laichiaheng
Copy link

There is a PKGBUILD script in AUR which is mpv-pipewire, it allows pipewire to be the audio backend of MPV player.
Is there any way to do that with mpv-build-git in AUR?

Log file

Even if you think it's not necessary at first, it might help us later to find
possible issues. Make a log file made with -v -v or --log-file=output.txt, paste
it to https://0x0.st/ or attach it to the github issue, and replace this text
with a link to it.

@CounterPillow
Copy link
Contributor

Why are you asking questions about how to use Arch Linux packaging scripts on the mpv bug tracker?

If this is some patch file, just apply it during the appropriate step.

@laichiaheng
Copy link
Author

laichiaheng commented Nov 16, 2021

So MPV hasn't officially supported pipewire yet?
I though I only need to enable some options.

@CounterPillow
Copy link
Contributor

No, there is no pipewire AO in master.

@LaserEyess
Copy link
Contributor

LaserEyess commented Nov 16, 2021

If you read this package https://aur.archlinux.org/packages/mpv-pipewire/ you can see it adds its own patch. You can use that package or simply do as suggested and build mpv yourself. Keep in mind though, that this patch is experimental and mpv can already use pipewire through pipewire-pulse, with 0 configuration or changes needed on your end. This is how I use mpv.

@laichiaheng
Copy link
Author

laichiaheng commented Nov 17, 2021

@LaserEyess Because I see lots of mistimed and delayed when playing videos with pipewire-pulse in Gnome, so I think maybe directly output to pipewire can have better result.
The delayed and mistimed issue seems will never be fixed by Gnome.

@LaserEyess
Copy link
Contributor

I don't think that has anything to do with gnome, you should report that to pipewire with reproduction steps. Regardless you can still build mpv with that patch if you want, YMMV.

@laichiaheng
Copy link
Author

I don't think that has anything to do with gnome, you should report that to pipewire with reproduction steps. Regardless you can still build mpv with that patch if you want, YMMV.

It's not pipewire specific issue, it happens to PulseAudio too.

@LaserEyess
Copy link
Contributor

There are a couple of issues open about pulseaudio and stuttering see https://github.com/mpv-player/mpv/issues?q=is%3Aissue+label%3Aao%3Apulse+is%3Aopen. If none of these fit what you're seeing then open a new issue about it. Considering this happens with native pulse and pipewire-pulse it is likely a bug in mpv's pulse backend.

@laichiaheng
Copy link
Author

laichiaheng commented Nov 19, 2021

There are a couple of issues open about pulseaudio and stuttering see https://github.com/mpv-player/mpv/issues?q=is%3Aissue+label%3Aao%3Apulse+is%3Aopen. If none of these fit what you're seeing then open a new issue about it. Considering this happens with native pulse and pipewire-pulse it is likely a bug in mpv's pulse backend.

I forgot to disable my config profile, here is the

In Gnome:

mpv with pipewire-pulse: frame delayed and mistimed.
mpv with pipewire patch: no vsync jitter and frame delayed and mistimed.

In Plasma:

mpv with pipewire-pulse: frame mistimed.
mpv with pipewire patch: everything works fine.

In pure Mutter:

mpv with pipewire-pulse: no jitter, slowly increase frame mistimed.
mpv with pipewire patch: no frame delayed, mistimed and jitter.

So It really seems to be PulseAudio issue?
Maybe I should open a new issue.

@laichiaheng
Copy link
Author

Does MPV have any plan to support PipeWire directly in the near future?

@LaserEyess
Copy link
Contributor

See #8569 and the PR I linked earlier. Someone will have to implement it but it is a known feature request.

@laichiaheng
Copy link
Author

See #8569 and the PR I linked earlier. Someone will have to implement it but it is a known feature request.

He seems have no plan for submitting the pull request.

@etircopyh
Copy link
Contributor

As you can see in the linked issue, some people are happy to use pulse or ALSA (lmao).
Anyway, I'm sure it won't be long before PipeWire support comes to mpv.

As for the issue matter: you can build mpv yourself, using your own PKGBUILD which you can customize however you wan't.

@monarc99
Copy link

i added the pipewire patches myself to mpv-full-build-git aur build file. pipewire ao works really good.

I use paru as aur helper. Simple add the patches to the PKGBUILD file.
(~/.cache/paru/clone/mpv-full-build-git/PKGBUILD)
https://paste.aachen.ccc.de/?b2008594662fab09#AVjKR0iOt6Bvy3nyUd8kU1SNo3ffxouOD2rnVRvb4wI=
and commit the changes local (git add and commit, no push)

Every mpv update paru will rebase your local commits to the PKGBUILD.

@laichiaheng
Copy link
Author

@monarc99 I have a question, what is the difference between mpv-full-build-git and mpv-build-git and mpv-full-git, I'm really confused.

@monarc99
Copy link

i think:

full: all codecs activated (and many dependencies)
build: compile ffmpeg + mpv
without build: only compile mpv against system ffmpeg

@Traneptora Traneptora changed the title Is there any way to add pipewire audio backend for mpv-build-git in AUR? feature request: pipewire audio output driver Nov 19, 2021
@Dudemanguy
Copy link
Member

Added in #9587.

@aufkrawall
Copy link

How is your experience with ao=pipewire and BT audio? For me, it sometimes seems to put the whole PipeWire audio server into a bad state that causes seconds of delay in all applications. It happens e.g. when mpv playback is running and I open the Plasma audio applet or start Firefox (but not 100% reproducible). Might of course also be an issue in PW itself, but it seems only mpv PW triggers it (ALSA and OpenAL are fine).

@laichiaheng
Copy link
Author

@aufkrawall I rarely play videos and do other things with sound effect at the same time.
By the way, I use Gnome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants