agarciadom / ipwebcam-gst

Simple shell script for using IP Webcam as a V4L2 webcam / sound source
http://xmleye.wordpress.com
621 stars 155 forks source link

Add (partial) support for pipewire #104

Closed leadweedy closed 3 years ago

leadweedy commented 3 years ago

Pipewire-pulse recently released as a drop in replacement for pulseaudio on arch, and is on track to ship by default in fedora 34. Currently, the script does not work with pipewire due to pacmd being unsupported. This is fixed by getting sink names and ids with pactl instead.

Pulseaudio modules are also not fully implemented in pipewire yet. module-null-sink exists, but module-echo-cancel does not. However I kept getting Failure: No such entity when trying to implement null-sink, so a video only workaround was used for now.

agarciadom commented 3 years ago

Thank you for the changes. Could you add an option or some autodetection to switch between PulseAudio and Pipewre-pulse? At the moment, your PR would break things for PulseAudio users.

leadweedy commented 3 years ago

Correct me if I'm wrong, but from my limited understanding of pactl (reading the man pages), it is just a subset of pacmd and both commands are included with pulseaudio. I only bring this up because in the current script, the 2 commands are used interchangeably to get and load sinks.

Also confirming this by running pkgfile -s pactl gives extra/libpulse extra/pulseaudio.