Broken with Pipewire 1.4.0

#24 · closed · 12 comments

View on GitHub ↗

Danct12

When launching catnip on Pipewire 1.4.0, catnip gives the following error: ```shell $ catnip -d alsa_output.platform-es8388-sound.stereo-fallback -sf 0 -ct 0 -dt 1 sndfile: failed to open audio file "-": Error : this file format does not support pipe write. error: open failed: Input/output error ``` Version information: ### Pipewire ```shell $ pipewire --version pipewire Compiled with libpipewire 1.4.0 Linked with libpipewire 1.4.0 ``` ### Catnip ```shell $ catnip --version Version: 1.8.5 ```

Comments

ghost

+1

noriah

ooof. this is interesting, we use pw-cat to get the stream out of pipewire. @Danct12 you did not pass a backend flag, so catnip will use the deafult backend. can you ensure you are using the pipewire backend, passing `-b pipewire` to the catnip command? you can also run `catnip list-backends` or `catnip lb` and it should have a star next to the default backend. if that does not work, can you try running: `pw-cat --record --format f32 --rate 44100 --latency 1024 --channels 2 --target auto --quality 0 --media-category Capture --media-role DSP --properties '{"application.name": "pw-cat"}' -` it should start spewing the stream data of your default input device. if not, can you confirm the error message returned?

Danct12

```shell $ pw-cat --record --format f32 --rate 44100 --latency 1024 --channels 2 --target auto --quality 0 --media-category Capture --media-role DSP --properties '{"application.name": "pw-cat"}' - RIFWAVEfmt D� factPEAK▒���gdataRIFWAVEfmt D� factPEAK▒���gdata����sndfile: failed to open audio file "-": System error : Illegal seek. error: open failed: Input/output error ```

ghost

![Image](https://github.com/user-attachments/assets/5edcaa5d-2c60-403a-8583-dd274760e308) same stuff happens to me but without the random garbage binary characters...???

noriah

@saxophone-dev @Danct12 what is the output of `pw-cat --help`? this may be an issue with pw-cat, but lets rule out the possibility of a new parameter flag that enables printing to STOUT. for context, this is my output: ``` > pw-cat --version pw-cat Compiled with libpipewire 1.2.7 Linked with libpipewire 1.2.7 > pw-cat --help pw-cat [options] [<file>|-] -h, --help Show this help --version Show version -v, --verbose Enable verbose operations -R, --remote Remote daemon name --media-type Set media type (default Audio) --media-category Set media category (default Playback) --media-role Set media role (default Music) --target Set node target serial or name (default auto) 0 means don't link --latency Set node latency (default 100ms) Xunit (unit = s, ms, us, ns) or direct samples (256) the rate is the one of the source file -P --properties Set node properties --rate Sample rate (req. for rec) (default 48000) --channels Number of channels (req. for rec) (default 2) --channel-map Channel map one of: "stereo", "surround-51",... or comma separated list of channel names: eg. "FL,FR" --format Sample format (ulaw|alaw|u8|s8|s16|s32|f32|f64) (req. for rec) (default s16) --volume Stream volume 0-1.0 (default 1.000) -q --quality Resampler quality (0 - 15) (default 4) -p, --playback Playback mode -r, --record Recording mode -m, --midi Midi mode -d, --dsd DSD mode -o, --encoded Encoded mode ``` edit -- the [1.4.0 release](https://gitlab.freedesktop.org/pipewire/pipewire/-/releases/1.4.0) explicitly says pw-cat "now support[s] stdin and stdout"? unsure what that means.

noriah

@diamondburned are you on the latest pipewire? can you try out some of this?

Danct12

@noriah ```shell-session $ pw-cat --version pw-cat Compiled with libpipewire 1.4.1 Linked with libpipewire 1.4.1 $ pw-cat --help pw-cat [options] [<file>|-] -h, --help Show this help --version Show version -v, --verbose Enable verbose operations -R, --remote Remote daemon name --media-type Set media type (default Audio) --media-category Set media category (default Playback) --media-role Set media role (default Music) --target Set node target serial or name (default auto) 0 means don't link --latency Set node latency (default 100ms) Xunit (unit = s, ms, us, ns) or direct samples (256) the rate is the one of the source file -P --properties Set node properties --rate Sample rate (req. for rec) (default 48000) --channels Number of channels (req. for rec) (default 2) --channel-map Channel map one of: "stereo", "surround-51",... or comma separated list of channel names: eg. "FL,FR" --format Sample format (ulaw|alaw|u8|s8|s16|s32|f32|f64) (req. for rec) (default s16) --volume Stream volume 0-1.0 (default 1.000) -q --quality Resampler quality (0 - 15) (default 4) -a, --raw RAW mode -p, --playback Playback mode -r, --record Recording mode -m, --midi Midi mode -d, --dsd DSD mode ```

ghost

@noriah ``` $ pw-cat --help pw-cat [options] [<file>|-] -h, --help Show this help --version Show version -v, --verbose Enable verbose operations -R, --remote Remote daemon name --media-type Set media type (default Audio) --media-category Set media category (default Playback) --media-role Set media role (default Music) --target Set node target serial or name (default auto) 0 means don't link --latency Set node latency (default 100ms) Xunit (unit = s, ms, us, ns) or direct samples (256) the rate is the one of the source file -P --properties Set node properties --rate Sample rate (req. for rec) (default 48000) --channels Number of channels (req. for rec) (default 2) --channel-map Channel map one of: "stereo", "surround-51",... or comma separated list of channel names: eg. "FL,FR" --format Sample format (ulaw|alaw|u8|s8|s16|s32|f32|f64) (req. for rec) (default s16) --volume Stream volume 0-1.0 (default 1.000) -q --quality Resampler quality (0 - 15) (default 4) -a, --raw RAW mode -p, --playback Playback mode -r, --record Recording mode -m, --midi Midi mode -d, --dsd DSD mode ``` and version: ``` $ pw-cat --version pw-cat Compiled with libpipewire 1.4.1 Linked with libpipewire 1.4.1 ```

noriah

@Danct12, @saxophone-dev can you test the same command as https://github.com/noriah/catnip/issues/24#issuecomment-2746031972, with `-a` or `--raw` before the `-`? example: `pw-cat --record --format f32 --rate 44100 --latency 1024 --channels 2 --target auto --quality 0 --media-category Capture --media-role DSP --properties '{"application.name": "pw-cat"}' --raw -`

Danct12

@noriah This works, I see a bunch of raw data on stdout.

noriah

please pull main and test

ghost

yay!!! thank you @noriah :3