Dolby TrueHD passthrough - modified mpv build

Honestly, I´m not planning to upload the builds to GitHub, maybe I will revise that decision in the future, but for now Google Drive only. I never heard of anyone having problems with Google Drive. (only when too many people download stuff, but we are far off of that…)

Maybe you should have a look at the Google Drive download problem first.


The latest published build features almost all the additions to mpv 37.0. It was only released 3 days before the official 37.0 launch, so only commits made in these 3 days are missing. (+ the ones made since then - obviously)


Currently rebuilding mpv with the patched ffmpeg, build should be available later this day. I will make a new post when they are released.

New builds:

v3 and non v3 builds!!

Those (v3 only) builds are compiled against upstream/untouched mpv. I have not built against my modified mpv, because the patches found there are not really needed for Plex HTPC anymore…


Old TrueHD logic:

mpv v0.37.0-135-gabc2a748 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Dec 30 2023 11:18:26
libplacebo version: v6.338.0-62-g52314e0-dirty
FFmpeg version: git-2023-12-30-805828aa9
FFmpeg library versions:
   libavutil       58.36.100
   libavcodec      60.36.100
   libavformat     60.20.100
   libswscale      7.6.100
   libavfilter     9.14.102
   libswresample   4.13.100

v3:

non v3:


New and patched TrueHD logic:

mpv v0.37.0-135-gabc2a748 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Dec 30 2023 11:59:13
libplacebo version: v6.338.0-62-g52314e0-dirty
FFmpeg version: git-2023-12-30-5a264d047
FFmpeg library versions:
   libavutil       58.36.100
   libavcodec      60.36.100
   libavformat     60.20.100
   libswscale      7.6.100
   libavfilter     9.14.102
   libswresample   4.13.100

v3:

non v3:

3 Likes

OK, I see. Thank a lot. :sweat_smile:

Added non-v3 builds!

I don’t get why I sometimes getting build issues when you don’t. I’m using Arch linux, fully updated with pacman, git pulled and yet shaderc keeps on crashing out. I tried using Shinchiro’s latest mpv-2.dll but Plex doesn’t like it at all. It takes 3 times as long to start up then won’t play the movie.

Could you please share your logs?

Sometimes I start from scratch on the building environment/ do a full clean or if packages fail, I run ninja package-removeprefix and start over again…

It’s OK. I just downloaded your latest version and it works. I notice that it is a little bigger than Shinchiro’s version so maybe his version is missing some libraries.

As for the build, I created a brand new environment from scratch and I always run all the removeprefix packages. How do I get cleaner than that?

Sadly, Plex HTPC chrashes very often with this build when I stop a playback or the video ends. Any solution for this?

Plex HTPC.log (1.1 MB)

Okay,

I´m not observing such behavior. Anyway - I can see in your log:

  • that you are using an Xbox Controller - gamepad input is buggy
  • that you are not using hardware decoding, even though you have a beefy gpu
  • that you have a very “large” set of mpv commands set
  • Your display framerate is 120Hz - is that needed?
  • that your GPU context is winvk
  • an error at the end of the log
Jan 16, 2024 00:13:58.262 [12432] ERROR - [Web] 00/02/2024 00:13:58:257 [Ninelpienel:8kp18affze29tzs1zq963fyo] ERROR [10633] stop {
  "type": "[object Error]",
  "stack": "Error: Rejected after unmount\n    at file:///C:/Program%20Files/Plex/Plex%20HTPC/web-client/getAppConfig_ts-adapters_uiSound_sounds_back_wav-adapters_uiSound_sounds_click_wav-adapters_u-e01dc9.js:1:30815\n    at async file:///C:/Program%20Files/Plex/Plex%20HTPC/web-client/vendors-node_modules_pnpm_date-fns_2_24_0_node_modules_date-fns_esm_differenceInCalendarISOWe-4d70a4.js:1:8778",
  "name": "Error",
  "message": "Rejected after unmount"
Jan 16, 2024 00:13:58.977 [12432] ERROR - [Web] 00/02/2024 00:13:58:975 [Ninelpienel:8kp18affze29tzs1zq963fyo] ERROR [QWebChannel(player.teardown)] error: {
  "errorCode": 1009,
  "result": null
  • Does the issue also a rise with the default mpv.dll?
  • Can please test again, with the controller disconnected?
  • Please create a mpv-log (add -log-file=“path-to-store-log.txt” to your mpv.conf) and sent it to me as a pm
  • Test with hardware decoding on
  • Test with d3d11 context
  • with minimal mpv.conf

Thanks for replying!

Oh, really? How do you recognize that? I actually created my inputs manually and every button works the way I want it to.

Is this a problem? It’s the highest Hz my TV supports.

This activates Vulkan, which is a recommended mpv setting.

Nope, it works with the default one.

I tested it, same problem.

I’ll be testing all that later today and will report back! Thank you!

So, now I could test your suggestions.

Same problem.

Done.

Same problem.

Looks like this fix the problem. But it can’t play Dolby Vision, so I can’t use that. :confused:

I have sent you a PM.


D3d11 can also play DV :wink:

@Mitzsch Just checking that mpv-ntrue is using ffmpeg from GitHub - mitzsch/FFmpeg at new-truehd-spdifenc-logic or does it use master-3 ?

1 Like

mpv-ntrue uses ffmpeg-ntruehd which uses master-3

New modified build incoming. Currently compiling. This will include v3 and non-v3 builds…

New builds:

mpv v0.37.0-279-g09606b9d Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
built on Feb 13 2024 10:33:45
libplacebo version: v6.338.0-77-g3ba18d5-dirty
FFmpeg version: git-2024-02-13-086e56b33 / git-2024-02-13-e4815b12f
FFmpeg library versions:
   libavutil       58.38.100
   libavcodec      60.39.100
   libavformat     60.20.100
   libswscale      7.6.100
   libavfilter     9.17.100
   libswresample   4.13.100

Old TrueHD logic:

non-v3:

v3:


New TrueHD logic:

non-v3:

v3: (while compiling there have been two commits upstreamed so this one is at mpv v0.37.0-281-g023d02c9)

I noticed recently, that TrueHD passthrough is broken for me. With TrueHD nothing is passed through to my Denon AVC-X4700H. Every other sound format is working fine.

I’m currently on v1.57.1 and I’ve tested with the original mpv-2.dll and the one from build-13.02.2024-ntruehd-clang. I don’t really know since when it’s broken, because most of my files don’t have TrueHD sound, but I know it has worked in the past for me with the same setup. I can remember I had this problem in the past once and updating to the latest Intel graphics drivers solved it, but not this time. My NUC (Intel® Iris® Plus Graphics 640) is connected to my Denon AVC-X4700H with an 8k certified HDMI cable, then to my Epson EH-LS12000B with an 8k certified fiber optic HDMI cable.

Windows recognizes, that my AVC is capable of TrueHD:

The only way I get sound working for TrueHD files at the moment, is not selecting TrueHD as a passthough option in the Plex HTPC sound settings.

Any idea what might be the problem? Here’s the log of a test run with the modified mpv-2.dll and TrueHD passthrough enabled:
Plex HTPC.log (732.1 KB)

Thank you

If you have any audio configuration in your mpv.conf then remove all of it and control everything through Plex HTPC audio settings. Make sure you choose your HDMI and tick all the boxes for DTS/TrueHD passthrough. That’s the way I got it working.

Sorry for asking but do you have the same problem with the shipped mpv-2.dll?

Have you tried the external mpv player or any other player? Does truehd passthrough work there?

The log does not show anything obvious.

Side note on using the latest mpv upstream. Those versions will not work with Plex HTPC. The devs changed how the loadfile command works, breaking Plex HTPC (and probably Plex for Desktop as well).

Commit: input/player: add loadfile/loadlist insert-at command · mpv-player/mpv@c678033 · GitHub

In my fork of mpv (GitHub - mitzsch/mpv at plex-htpc-hdr-patches) I reverted that commit… Use this branch instead…

2 Likes