Plex HTPC feedback

@MrFancyPants1999 Why are you commenting in this thread? You admitted that you’ve not used the app in a while, said your official goodbye, and then keep trying to derail this thread trying to convince people how wonderful the AppleTV is. I thought about replying to your points but the problem is that so much of what you say is either outdated or blatantly wrong, it’d be faster to list what you actually got correct.

After one user asked that this be kept on topic and a couple of replies were on topic, you come here again trying to drive the thread off-topic again. If you want to extol the virtues of the AppleTV, that’s what a new thread is for. So take that discussion there and leave the this discussion to those who actually want to discuss the HTPC app.

5 Likes

And now to something that’s actually on-topic:

From what I asked of the MPV devs, the answer to this is going to depend on your drivers when using the vulkan backend (and gpu-next). They told me it’ll work with some but not all. I’ve tested the standalone mpv on a machine with an Intel GPU using gpu-next and vulkan and it did not switch from SDR to HDR. I haven’t gotten around to testing on any others yet.

I would suggest testing with the standalone MPV first because that’s what the developers primarily target. Then if you get it working there but not in HTPC, you have a datapoint as to where the differences may be.

1 Like

In my opinion, the effort of @gbooker02 and others is really paying off in Plex HTPC. With the latest releases you have amazing capabilities:

  • 4K native UI
  • Native playback of virtually every codec, including HD audio formats and PGS subtitles
  • Audio bitstream passthrough (including Dolby Atmos and DTS:X)
  • Frame rate and resolution matching
  • HDR tonemapping with control over tonemap curves
  • Available AI-based high quality upscaling, downscaling (including chroma/luma)
  • Per framerate lipsync adjustment
  • Detailed on-screen diagnostic data (“Stats for nerds” – okay maybe only I like this one ;))

And if you use the unsupported “preview” versions of mpv that @Mitzsch shared you get a preview of even more advanced decoding including DolbyVision Profile 5, 7, and 8 tonemapping support (mostly). The Apple TV client is great, but can’t do all of that. Nvidia Shield and Xbox get close, but don’t have all the flexibility of a PC as well.

Really the only thing left to figure out is proper HDR/DoVi passthrough with metadata to capable displays, which feels like only a short matter of time until that gets sorted.

I am thankful for the effort here and can’t wait to see Plex HTPC continue to evolve and improve.

5 Likes

In Plex HTPC is there a way to add more high quality playback quality options when transcoding?

For example, I have some 4k HDR files, yet I have no 4k or HDR displays. When I play back these files I can choose 1080p 20 Mbps … but more bits are available in the source. How can I get a maximum quality 1080p playback? Give me all the bits you can!

Well, actually I have one 4k display, a PC monitor. It isn’t HDR, though. So I would also love a means to play back 4k HDR tone mapped to 4k SDR. This also doesn’t seem possible and would be very welcome.

That should already be possible with the latest release, if you have the network bandwidth between server and app to stream the original file.
(To avoid the transcoding. Otherwise the server will attempt tone mapping during transcoding, which might bring it to its knees.)

For further quality improvement, try the custom shaders which are described further up. You’ll need a hefty GPU (like a RTX 2070) or similar to achieve sufficient performance.

Thanks @OttoKerner I will take another look.

I have said it before, it is hard keeping track of the abilities of the various clients! :slight_smile:

What what what ??? :astonished: :astonished:

Did I misread this or is DV in the HTPC getting a little closer ? :smiley:

Dolby Vision Tonemapping to sdr, yes. Try this build of mpv and add vo=gpu-next to your mpv.conf and DV tonemapping should work.

#EDIT: Plex is not allowed to include those DV code bits due to licensing? (The harry potter house elf name allusion?)

1 Like

It’s going to be a exceedingly rare case where 1080 h.264 requires more than 20Mbps with the transcode settings used. The bitrate is often higher in other places (such as BDs) because of extra constraints put on the encoding which we do not impose in our transcode. In particular is the frequency of IDR frames which are more frequent on a BD due the benefits of faster seeking but they increase the bitrate substantially without increasing the quality. Without these constraints, 20Mbps is more than sufficient.

Correct. (I was referencing Dobby which is spelled very similarly).

I’ve seen indications that this may be present in the latest MPV standalone app with certain hardware configurations. Could be worth testing.

TIL, thank you for the explanation!

I’m struggling on Linux to play video on anything with non stereo audio tracks, must be something basic I’m missing, just get blank screen with no sound.

I can play the same video fine in truehd etc using mpv in Linux and /etc/mpv/mpv.conf set to:

hwdec=vaapi
audio-spdif=dts-hd,ac3,eac3,truehd

Any ideas please?

Plex HTPC.log.gz (23.7 KB)

From your logs:

Apr 05, 2022 21:38:47.580 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao: Trying audio driver 'pulse'
Apr 05, 2022 21:38:47.580 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao: Using preferred device 'alsa_output.pci-0000_00_1f.3.hdmi-stereo'
Apr 05, 2022 21:38:47.580 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: requested format: 48000 Hz, stereo channels, spdif-ac3
Apr 05, 2022 21:38:47.581 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: Library version: 13.99.0
Apr 05, 2022 21:38:47.581 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: Proto: 33
Apr 05, 2022 21:38:47.581 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: Server proto: 4294967295
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: Channel layouts:
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #fl
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #fr
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #fc
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #lfe
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #bl
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #br
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #flc
Apr 05, 2022 21:38:47.582 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #frc
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #bc
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #sl
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #sr
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tc
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tfl
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tfc
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tfr
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tbl
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tbc
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse:  - #tbr
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: result: stereo
Apr 05, 2022 21:38:47.583 [0x7fcbb8ff9700] DEBUG - [MPVEngine/mpv] ao/pulse: Stream failed.
Apr 05, 2022 21:38:47.584 [0x7fcbb8ff9700] ERROR - [MPVEngine/mpv] ao: Failed to initialize audio driver 'pulse'
Apr 05, 2022 21:38:47.584 [0x7fcbb8ff9700] ERROR - [MPVEngine/mpv] ao: This audio driver/device was forced with the --audio-device option.
Apr 05, 2022 21:38:47.584 [0x7fcbb8ff9700] ERROR - [MPVEngine/mpv] ao: Try unsetting it.

Looks like it’s having trouble initializing pulse audio at least with this device. You may want to try the other devices to see if you can get them to work (unfortunately Linux gives you a million and a half of them). I’ve generally had the best luck with the first alsa/hdmi (called HDA Intel PCH, HDMI 0/HDMI Audio Output) especially when it comes to passthrough of HD audio codecs.

Thanks, I’ve been through a lot of settings for audio device but cannot get anything that consistently works.

For DVR recorded programs, typically stereo, the best setting is:
Built in digital audio stereo (hdmi)
HDMI
7.1

but then when I try and play a movie I then get a black screen and no sound.

Should I have to keep changing this setting for different media ?!

Also I have ~/snap/plex-htpc/common/mpv.conf with
audio-spdif=dts-hd,ac3,eac3,truehd

Is that still needed?

Note I never actually see any passthrough option in PlexHTPC, only tick boxes for TrueHD, DTS-HD etc - is that expected?

Actually using HDA Intel PCH, HDMI 1/HDMI Audio Output I do get video but no sound and the logs imply its using alsa not pulse?

Perhaps I need to configure alsa in some way?

Plex HTPC.log.gz (358.8 KB)

Total Noob here.

I recently built a HTPC, it comprises of,

System: Kernel: 5.4.0-107-generic x86_64 bits: 64 compiler: gcc v: 9.4.0
Desktop: Cinnamon 5.2.7 wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una
base: Ubuntu 20.04 focal

Machine: Type: Desktop System: Intel product: NUC8i7HVK

CPU: Topology: Quad Core model: Intel Core i7-8809G bits: 64 type: MT MCP arch: Kaby Lake
rev: 9 L2 cache: 8192 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 49599
Speed: 3890 MHz min/max: 800/8300 MHz Core speeds (MHz): 1: 3895 2: 3896 3: 3897
4: 3866 5: 3899 6: 3896 7: 3895 8: 3897

Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel bus ID: 00:02.0
chip ID: 8086:591b
Device-2: AMD Polaris 22 XT [Radeon RX Vega M GH] vendor: Intel driver: amdgpu
v: 5.6.20.20.45 bus ID: 01:00.0 chip ID: 1002:694c
Display: x11 server: X.Org 1.20.13 driver: amdgpu,ati,modesetting unloaded: fbdev,vesa
resolution: 3840x2160~60Hz
OpenGL: renderer: llvmpipe (LLVM 10.0.1 256 bits) v: 3.3 Mesa 20.1.6 compat-v: 3.1
direct render: Yes

Audio: Device-1: Intel CM238 HD Audio driver: snd_hda_intel v: kernel bus ID: 00:1f.3
chip ID: 8086:a171
Device-2: AMD Polaris 22 HDMI Audio vendor: Intel driver: snd_hda_intel v: kernel
bus ID: 01:00.1 chip ID: 1002:ab08
Sound Server: ALSA v: k5.4.0-107-generic.

Plex HTPC.log (372.2 KB)

I’m not sure if i’m doing the right thing here, but i would like to contribute somehow.
Plex HTPC does not run very well and not that i know what i’m looking at, my log file contains lots of Errors, so maybe what i have supplied will be of some help.

If what i have done is wrong, not relevant, in the wrong section or just a waste of time, just i apologise.

Cheers

So, a bit more testing:

If we query the devices:

simon@simon-NUC7i3DNHE:~/Videos$ mpv "Bohemian Rhapsody (2018).mkv" --audio-device=help
List of detected audio devices:
  'auto' (Autoselect device)
  'pulse/auto_null' (Dummy Output)
  'alsa' (Default (alsa))
  'alsa/surround21' (2.1 Surround output to Front and Subwoofer speakers)
  'alsa/surround40' (4.0 Surround output to Front and Rear speakers)
  'alsa/surround41' (4.1 Surround output to Front, Rear and Subwoofer speakers)
  'alsa/surround50' (5.0 Surround output to Front, Center and Rear speakers)
  'alsa/surround51' (5.1 Surround output to Front, Center, Rear and Subwoofer speakers)
  'alsa/surround71' (7.1 Surround output to Front, Center, Side, Rear and Woofer speakers)
  'alsa/samplerate' (Rate Converter Plugin Using Samplerate Library)
  'alsa/speexrate' (Rate Converter Plugin Using Speex Resampler)
  'alsa/jack' (JACK Audio Connection Kit)
  'alsa/oss' (Open Sound System)
  'alsa/upmix' (Plugin for channel upmix (4,6,8))
  'alsa/vdownmix' (Plugin for channel downmix (stereo) with a simple spacialization)
  'alsa/hdmi:CARD=PCH,DEV=0' (HDA Intel PCH, HDMI 0/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=1' (HDA Intel PCH, HDMI 1/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=2' (HDA Intel PCH, HDMI 2/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 3/HDMI Audio Output)
  'alsa/hdmi:CARD=PCH,DEV=4' (HDA Intel PCH, HDMI 4/HDMI Audio Output)
  'alsa/dmix:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 0/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=7' (HDA Intel PCH, HDMI 1/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=8' (HDA Intel PCH, HDMI 2/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=9' (HDA Intel PCH, HDMI 3/Direct sample mixing device)
  'alsa/dmix:CARD=PCH,DEV=10' (HDA Intel PCH, HDMI 4/Direct sample mixing device)
  'alsa/plughw:CARD=PCH,DEV=3' (HDA Intel PCH, HDMI 0/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=7' (HDA Intel PCH, HDMI 1/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=8' (HDA Intel PCH, HDMI 2/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=9' (HDA Intel PCH, HDMI 3/Hardware device with all software conversions)
  'alsa/plughw:CARD=PCH,DEV=10' (HDA Intel PCH, HDMI 4/Hardware device with all software conversions)
  'alsa/usbstream:CARD=PCH' (HDA Intel PCH/USB Stream Output)
  'jack' (Default (jack))
  'sdl' (Default (sdl))
  'sndio' (Default (sndio))

and then use this, I get Dolby Atmos fine on my receiver:

mpv "Bohemian Rhapsody (2018).mkv" --audio-device=alsa/hdmi:CARD=PCH,DEV=0

but Plex seems to think the device is in use or busy and errors?

Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: audio-channels="auto-safe" -> 1
Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: audio-delay=0.000000 -> 1
Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: audio-device="alsa/hdmi:CARD=PCH,DEV=0" -> 1
Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: audio-spdif="ac3,eac3,truehd,dts,dts-hd" -> 1
Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: deinterlace=false -> 1
Apr 06, 2022 12:45:27.541 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] cplayer: Set property: audio-exclusive="no" -> 1


Apr 06, 2022 12:45:27.864 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] ao: Trying audio driver 'alsa'
Apr 06, 2022 12:45:27.864 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] ao: Using preferred device 'hdmi:CARD=PCH,DEV=0'
Apr 06, 2022 12:45:27.864 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] ao/alsa: requested format: 48000 Hz, stereo channels, s16p
Apr 06, 2022 12:45:27.864 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] ao/alsa: using ALSA version: 1.2.2
Apr 06, 2022 12:45:27.864 [0x7f2cab7fe700] DEBUG - [MPVEngine/mpv] ao/alsa: opening device 'hdmi:CARD=PCH,DEV=0'
Apr 06, 2022 12:45:27.867 [0x7f2cab7fe700] ERROR - [MPVEngine/mpv] ao/alsa: Playback open error: Device or resource busy
Apr 06, 2022 12:45:27.867 [0x7f2cab7fe700] ERROR - [MPVEngine/mpv] ao: Failed to initialize audio driver 'alsa'
Apr 06, 2022 12:45:27.867 [0x7f2cab7fe700] ERROR - [MPVEngine/mpv] ao: This audio driver/device was forced with the --audio-device option.
Apr 06, 2022 12:45:27.867 [0x7f2cab7fe700] ERROR - [MPVEngine/mpv] ao: Try unsetting it.
Apr 06, 2022 12:45:27.867 [0x7f2cab7fe700] ERROR - [MPVEngine/mpv] cplayer: Could not open/initialize audio device -> no sound.

Do you have something like pulseaudio running, especially with the “sound on click” setting turned on? Whenever you interact with the Plex HTPC interface, a click sound is getting outputted by pulseaudio and blocks the direct alsa device (for many seconds).

Try disabling the clicking effect or run plex htpc with pasuspender

1 Like

Looks like my comment regarding the issues I was having with Plex HTPC got deleted so I will try this again. I downloaded Plex HTPC to my MacBook Pro and it constantly stutters and lags. It’s basically unusable atm.

The MacBook Pro is on macOS Big Sur, but I will test on my M1 Max MacBook Pro later today and report back. Anyone using MacOS experience similar issues? If so how did you fix it?

I’m moving my plex server to the new Mac Studio this weekend, so as I backup I would at least like to have Plex HTPC configured to run smoothly on that system since it will also be hosting the server. Any help is much appreciated!

You sir are a star.

Disabling navigation sounds resolved the issue.

Would be worthwhile in the app to maybe warn of this setting!!! Spent ages troubleshooting.

No. HTPC sets this exact same thing via the checkboxes for which passthrough codecs to use.

If I understand you correctly, these are the passthrough options. You are specifying which codecs your AVR supports here.

I’m not sure what you mean by this. Could you expound on exactly what is not running very well?

This is one of the annoying things about pulseaudio. Supposedly PA is capable of doing passthrough these days but I’ve never been successful getting it to work with anything other than AC3/DTS and not with any HD audio codecs.

This is going to require logs to even begin to diagnose. Also you don’t specify which MBP which is important because that name spans a very wide range of hardware over the past 16 years. FWIW, I’ve regularly played a range of content on a 2014 iMac without issue.