Plex HTPC Arch package

I know I’m not the only one here who dislikes snaps, and with the new plex HTPC client now in testing for linux, I created a PKGBUILD to install it on arch. Sadly hw decoding doesn’t quite work yet (only tested intel + XWayland), and wayland still needs looking into. But it works okay (despite some crashes once in a while).

PS: This is my first PKGBUILD from scratch, and the way the plex-htpc snap is built does not make it easy, so it’s probably not perfect at all. (Really it’s quite ugly)

Here’s the package: AUR (en) - plex-htpc

Any help on ironing out issues or general feedback is appreciated!

1 Like

UPDATE

There was a typo in the source in the PKGBUILD (so the download would give a 404). That’s fixed now.

Also, HW decoding works now (tested on intel with vaapi-egl). Most likely it will work fine on nvidia and AMD as long as you have the right drivers for your system.

For HW decoding you need the libva package and the corresponding driver for your GPU

  • intel-media-driver: backend for Intel GPUs (>= Broadwell)
  • libva-vdpau-driver: backend for Nvidia and AMD GPUs
  • libva-intel-driver: backend for Intel GPUs (<= Haswell)

and run the app with the QT_XCB_GL_INTEGRATION=xcb_egl en var as detailed here. (Only X11 so far. for wayland support I believe we need to be able to set MPVs output to GPU (vo=gpu) so that we can use the right gpu-context.

For nvidia GPUs, since we’re not using the bundled version of mpv, you can also set hwdec=nvdec-copy in ~/.local/share/plex/mpv.conf to use nvdec. (This also works for prime render offloading e.g. prime-run)

2 Likes

Hi, thanks for creating the AUR version without snap.

I found one bug in this version, whenever I change subtitles to enabled I have a chance of the whole app crashing. And sometimes when I want to go back to watching a particular movie after the crash, I am soft-locked from it, it will crash when I hit play (cause it remembers that I enabled the subtitles). This does not happen in the snap version. Don’t know if you can fix that but just in case I attached logs.

I tried with and without hardware decoding, the same result.

If you want more logs or something else, let me know, I can reproduce the issue at will.

CRASH.log (282.4 KB)

I also experienced a crash when skipping forward. I don’t know if the original snap had the same issue as it only happened once. I got logs from that time here: CRASH when seeking.log (304.5 KB)

Thanks for the bug report. I am able to reproduce this, and it seems to be coming from fontconfig.
It segfaults in FcConfigSubstituteWithPat().

I’ll try to look into it more later. For now, you can usually avoid the issue by waiting for the video track to load before changing subtitle settings it seems. This also goes for seeking. Allowing the video to load a bit in general seems to somewhat combat the issue.

You should be aware that another part of the reason for the snap is due to the fact that custom versions of nearly every library are used (some out of compatibility, some out of necessity). In particular if you are using system libraries in place of our FFmpeg, this will almost certainly cause crashes because they will not be ABI compatible.

Ah, I see. That’s unfortunate. Thanks for the info, I’ll see if using some of the bundled versions will help with the crashes. (Although everything else seems to be flawless when using system libs (mpv, libva, ffmpeg, etc). I watched an entire h265 film yesterday with HW decoding without issues :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.