dreemurrs-embedded / Pine64-Arch

:penguin: Arch Linux ARM for your PinePhone/Pro and PineTab/2
706 stars 107 forks source link

Install wireplumber and gst-plugin-pipewire by default (to enable Pipewire cameras) #537

Open rmader opened 1 year ago

rmader commented 1 year ago

The future/modern camera stack on Linux, consisting of libcamera and pipewire (similar to alsa + pulseaudio/pipewire) provides apps with a clean API to access cameras without needing device specific knowledge.

As of today (Mar. 26) with the libcamera 0.0.4-3 upgrade this almost works on the Pinephone Pro on a vanilla installation of the archlinux-pinephone-pro-phosh-20230203.img.xz image.

The only changes needed to make applications like Cheese be able to use the cameras now are:

  1. install wireplumber (needed to make Pipewire actually expose cameras - requires a restart)
  2. install gst-plugin-pipewire (implies 1.)
  3. the pending kernel update to 6.2.7 :heavy_check_mark:

These packages get installed by default on most distros nowadays - it would be nice if the image here would do so as well.

Danct12 commented 1 year ago

Kernel 6.2.7 is in the testing repository for days now, I'll move it to main later as there's not yet a problem reported on the kernel.

rmader commented 1 year ago

Kernel 6.2.7 is in the testing repository for days now, I'll move it to main later as there's not yet a problem reported on the kernel.

Thanks, just updated and confirmed again that it works.

grinceur commented 1 year ago

https://discord.com/channels/370595587097362454/726875989401141268/1087526169685000442 megapixel is broken for me with this kernel…

UltraBlackLinux commented 1 year ago

@grinceur bruh which discord server -_-

rmader commented 1 year ago

megapixel is broken for me with this kernel…

Note: this discussion here is not about Megapixels. It's about the proper libcamera + pipewire (+ gstreamer + xdg-camera-portal) stack, which AFAIK Megapixels currently does not plan to support.

Apps that use this stack include Cheese, the upcoming, mobile friendly, new Gnome camera app and soon also Chromium, Firefox and OBS-Studio.

rmader commented 1 year ago

@Danct12 gentle ping here :)

With the recent linux 6.4 update there's finally proper rotation and location support, plus the number of apps making use of Pipewire cameras is increasing (Firefox just got experimental support, https://flathub.org/apps/org.gnome.Snapshot is getting stable), so having this work out-of-the-box becomes increasingly useful.

AgentSmith0 commented 1 year ago

wireplumber conflicts pipewire-media-session, is it safe to remove pipewire-media-session? EDIT: Yes it is, pipewire-media-session seems to be deprecated.

Snapshot flatpak works fine now, thank you!