You are not logged in.

#1 2023-12-15 22:30:49

willianholtz
Member
Registered: 2017-09-23
Posts: 42

[Solved] Pipewire and pulse!

Hey guys, how are you?

So, for a while now I've been having problems with pipewire and pulse, because now it seems that pipewire is what controls all Arch sounds, at least that's what I noticed and I could be wrong.

However, as I open a lot of videos in VLC and other players, I need to kill the pipewire and mask it, like this:

systemctl --user disable pipewire pipewire.socket && systemctl --user mask pipewire pipewire.socket

Why do I do this?
Well, pulse is the only one that runs all CODECS as well as AC3 and other codecs, anyway. And by doing this, my videos work fine again... (especially my blurays)

The problem is that when I deactivate, so to speak, the pipewire, the sound with the pulse delays its start, for example, a video starts playing alone, 2 seconds from now, the image freezes and the sound starts.
This delay is not just in the player, but in browsers and anything that produces video and sound.


Is there any way to fix this, or remove the pipewire, or make the pipewire play correctly by recognizing the codecs?

Last edited by willianholtz (2023-12-25 23:44:59)

Offline

#2 2023-12-16 11:14:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [Solved] Pipewire and pulse!

willianholtz wrote:

How are you?

Tired. I keep getting sent to Wales on Friday.

willianholtz wrote:

pulse is the only one that runs all CODECS

Have you tried the pipewire-pulse package? That should allow you to replace PA with PipeWire.

And are you sure that VLC needs pulseaudio for CODECs? I thought CODEC support was part of ALSA. I am fairly ignorant about CODECs though and I don't watch many videos.

I can run VLC and get working audio for AC3 files without Puleaudio or PipeWire installed, if that helps.

Offline

#3 2023-12-18 12:42:58

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

I did a test for a whole day, and with the pipewire-pulse it seems to work again... But I still have some tests to do. I practically redid the entire arch sound scheme and removed some pulse dependencies that I didn't use and even some plugins. I won't close the thread yet, I have to test on some files that are not currently on my PC, however, thanks for now.

PS: I had already done this test a while ago with pipewire-pulse, but I hadn't been successful.

Last edited by willianholtz (2023-12-18 12:44:05)

Offline

#4 2023-12-18 13:40:19

obelisk
Member
Registered: 2021-01-10
Posts: 54

Re: [Solved] Pipewire and pulse!

If you found something, which does not work, please post some information's of the file (ffprobe FOO). Maybe it is just missing Codec or whatever.
You can try for pipewire wireplumber or pipewire-media-session as Session manager.
Other pint with audio:
I once had a problem with missing sound, with an old game which I want to play with wine.  The solution was quite easy... the game was so much old, that I forget to install lib32-pipewire and/or lib32-libpipewire.
Maybe it helps you, when you comparing installed packages with e.g. my system:

> pacman -Qqs pulseaudio
pamixer
paprefs
pavucontrol
pipewire-alsa
pipewire-pulse
qemu-audio-pa
xfce4-pulseaudio-plugin

> pacman -Qqs pipewire
easyeffects
gst-plugin-pipewire
helvum
lib32-libpipewire
lib32-pipewire
libpipewire
libwireplumber
pipewire
pipewire-alsa
pipewire-audio
pipewire-docs
pipewire-jack
pipewire-pulse
pipewire-v4l2
qemu-audio-pipewire
qpwgraph
wireplumber

Offline

#5 2023-12-21 12:19:55

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

It's like I said, the problem still exists... And I can only get around it by masking and disabling the pipewire and leaving pulse as the default

https://uploaddeimagens.com.br/imagens/An5SYSY

obelisk

pacman -Qqs pulseaudio
paprefs
pavucontrol-qt
pipewire-pulse
plasma-pa
pulseaudio-alsa
pulseaudio-equalizer-ladspa


[root@archlinux willian]#  pacman -Qqs pipewire
kpipewire
libpipewire
libwireplumber
pipewire
pipewire-audio
pipewire-media-session
pipewire-pulse

Offline

#6 2023-12-21 14:33:26

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

Well, pulse is the only one that runs all CODECS as well as AC3 and other codecs, anyway.

This is complete and utter nonsense, pulseaudio or pipewire don't decode the audio codec, that's done by libavcodec/ffmpeg or gstreamer or something like that (I think vlc uses its internal plugins)

The problem is that when I deactivate, so to speak, the pipewire, the sound with the pulse delays its start, for example, a video starts playing alone, 2 seconds from now, the image freezes and the sound starts.

Because it's socket activated. Abandon that plan.

Remove pulseaudio again, use pipewire-pulse, play your file w/ mpv, post the mpv output and whether "it worked".
Edit: though vlc keeps logs too, that might be interesting.
What is *way* more likely here wrt "especially my blurays2 is that the surround sound config is somehow botched and you're only playing the read or center channel or something like that.

Last edited by seth (2023-12-21 14:34:01)

Offline

#7 2023-12-21 18:04:40

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

Ok, I removed everything from pulseaudio and was left with just pipewire (I believe) but now I have no sound. What should I use for this, since plasma-pa uses pulseaudio?


EDIT:
OK, after a lot of searching for a solution, I decided to start from scratch and install just a few things, they are:


pacman -S pipewire-alsa pipewire-jack pipewire-v4l2 gst-plugin-pipewire

And that's it, everything went back to normal, including the E-AC3 error stopped... But I'll still leave it open in case there's still a problem.

Last edited by willianholtz (2023-12-21 18:48:44)

Offline

#8 2023-12-21 18:51:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,904

Re: [Solved] Pipewire and pulse!

pipewire-pulse which generally works just the same and install wireplumber instead of pipewire-media-session and reboot.

If it still doesn't work post

systemctl --user status pipewire{,-pulse} wireplumber
sudo fuser -v /dev/snd/*
pactl list cards
pactl list sinks

Offline

#9 2023-12-21 23:34:47

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

From what I could tell, the problem was with the channels, 5.1, 7.1 surround, etc. I did several tests here, and it seems stable. I tested some newer Blurays, and also some downloaded from the internet, and all of them have worked so far.

Offline

#10 2023-12-22 08:45:50

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

seth wrote:

What is *way* more likely here wrt "especially my blurays2 is that the surround sound config is somehow botched and you're only playing the read or center channel or something like that.

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

You should probably still heed V1del's advice reg. pipewire-pulse (I assume you have) and wireplumber (unclear)

Offline

#11 2023-12-25 22:38:49

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

https://freeimage.host/i/JR5XV49

It hasn't been resolved yet... it seems impossible to continue with pipewire!

Offline

#12 2023-12-25 22:45:35

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

1. Don't post images of text, post the text
2. LC_ALL=C, i've no idea what that screenshot says and I can't copyaste it into a translation service…
3. Again: this has absolutely nothing to do with the sound server. Neither pipewire nor pulseaudio decode ac3 (unless we're maybe talking about passthrough to an AC3 capable DAC, if that's the case, sorry, but again: I can't read that screenshot)
4. Did you replace pipewire-media-session w/ wireplumber?

Offline

#13 2023-12-25 23:25:26

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

4 -  Yes

From what I've been researching (in several forums) it seems that pipewire only works with this E-AC3 codec (which would be a codec used for several channels in a video file), in mpv. VLC doesn't support pipewire, although some things do. However, I was forced to use mvp.
I say this because I've had some problems with mvp in the past, I won't remember what it was, if it was related to subtitles or what, but I know I had some problems. However, it seems to me that I will have to wait for an update from VLC for this format.

Offline

#14 2023-12-26 09:00:37

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

From what I've been researching (in several forums)

… Donald Trump was re-instates as President in August 2021 and the Biden Crime-Family incarcerated in G'tmo. Some guy named Q knew that, probably the same who showed up in StarTrek.

The internet is full of wackos. The sound daemons do not decode audio streams and the thing is called "mpv"
How about you post the actual vlc error as english text?

Offline

#15 2023-12-30 01:17:33

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

MPV error! It's the same as VLC

[willian@archlinux Afonso.Padilha.Geracoes.2023.1080p.WEB-DL.NACIONAL.5.1]$ mpv Afonso.Padilha.Geracoes.2023.1080p.WEB-DL.NACIONAL.5.1.mkv 
 (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=por (*) 'PT-BR 5.1' (eac3 6ch 48000Hz)
     Subs  --sid=1 --slang=por 'COMPLETA PT-BR' (subrip)
File tags:
 Title: COMANDOPLAY.COM
Failed to initialize a decoder for codec 'eac3'.
Audio: no audio
VO: [gpu] 1920x1080 yuv420p

Offline

#16 2023-12-30 14:59:24

obelisk
Member
Registered: 2021-01-10
Posts: 54

Re: [Solved] Pipewire and pulse!

So you need a decoder for eac3. Check:

pacman -Qs a52dec
#if not installed, try:
pacman -S a52dec

...or check if you have installed this packages:

> pacman -Qqs gstreamer
gstreamer
gstreamer-vaapi
gstreamermm
phonon-qt5-gstreamer

pacman -Qqs gst-plugin
gst-plugin-pipewire
gst-plugins-bad-libs
gst-plugins-base
gst-plugins-base-libs
gst-plugins-espeak
gst-plugins-good
gst-plugins-ugl

Offline

#17 2023-12-30 15:01:12

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

That's not ac3 but 6c eac3

Can you play this file w/ mpv?

mpv -v https://samples.ffmpeg.org/A-codecs/AC3/eac3/serenity_english_5.1_1536.eac3 2>&1 | tee /tmp/mpv.log
cat /tmp/mpv.log | curl -F 'file=@-' 0x0.st

If the sample file plays, please record the movie you're trying there w/ mpv -v and post that output (you can cancel the playback after few seconds to not blow up the log too much, only the decoder path is really reelvant)

Also, since this is actually supposed to work (assuming that video of questionable origin actually has a spec compliant audio stream…)

pacman -Qikk mpv ffmpeg

You can also either explicitly downmix that or pass it through to an eac3 capable DAC (receiver)
https://www.reddit.com/r/mpv/comments/1 … nel_audio/
https://github.com/mpv-player/mpv/issues/4909

And post your mpv config files.

Edit: surprisingly a52dec isn't a dependency of either - I got it w/ scummvm wink

Last edited by seth (2023-12-30 15:10:03)

Offline

#18 2023-12-30 15:42:34

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

mpv -v https://samples.ffmpeg.org/A-codecs/AC3/eac3/serenity_english_5.1_1536.eac3 2>&1 | tee /tmp/mpv.log
cat /tmp/mpv.log | curl -F 'file=@-' 0x0.st 

http://0x0.st/HEEL.txt

and

pacman -Qikk mpv ffmpeg

http://0x0.st/HEEf.txt

MPV config:
http://0x0.st/oEjb.conf

In the mpv file there are so many variables that I don't know where to add the lines you gave me through the link, I believe it's just below, like this:

[enc-a-aac]
profile-desc = "AAC (libfdk-aac or FFmpeg)"
oac = libfdk_aac,aac
oacopts = b=96k
af=scaletempo,lavcac3enc=yes:640:3

[enc-a-ac3]
profile-desc = "AC3 (FFmpeg)"
oac = ac3
oacopts = b=448k
# EDITED
ad=spdif:ac3,spdif:dts,

edit: It seems to me that it worked, but I want your opinion on whether it's correct or I need to do something more to avoid future problems... or even if I'm missing something.

Last edited by willianholtz (2023-12-30 15:44:15)

Offline

#19 2023-12-30 16:21:02

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

That looks like /etc/mpv/encoding-profiles.conf and isn't relevant.
Please restore the original file, *your* config is ~/.config/mpv/mpv.conf

Did you install a52dec?
Does your movie audio stream work?
I falsely assumed it would be a dependency of ffmpeg, but isn't.
And w/ that you won't need to re-encode the audio (well, should™ not have to)

Offline

#20 2023-12-30 17:08:37

willianholtz
Member
Registered: 2017-09-23
Posts: 42

Re: [Solved] Pipewire and pulse!

I didn't understand what happened. Because after I added the lines, the videos started working again. Then you said it's irrelevant, so I removed the lines, rebooted and it worked normally again, both in VLC and MPV. Now the file

~/.config/mpv/mpv.conf

doesn't even exist on my system. Which makes me wonder, what is really controlling the settings of all the codecs (encoder and decoder) on my machine.

And yes, the a52dec is installed, in fact it has been for a while.

Last edited by willianholtz (2023-12-30 17:09:39)

Offline

#21 2023-12-30 17:18:45

seth
Member
Registered: 2012-09-03
Posts: 52,335

Re: [Solved] Pipewire and pulse!

We'll need a verbose mpv output from an attempt where it doesn't work.
But I guess it's actually the specific video, either the container or the audiostream.

Offline

Board footer

Powered by FluxBB