I now finally tested all the patched builds on my end.
The initial patched build “build-15.02.2023-gbooker02-truehd-fix.zip” works like described in an earlier post, dropouts on these seamless branching spots. That is with files ripped before the new trueHD demuxer, pre-v1.15.4 makemkv versions. I re-ripped the disc with the newest version and with that file, the dropouts were not present that frequently anymore - almost perfect!
The next build I tested was an “internal” one that I have somehow not published. The only change in that build was changing
/* detect discontinuity */
if (padding_remaining < 0 || padding_remaining >= MAT_FRAME_SIZE * 2) {
avpriv_request_sample(s, "Unusual frame timing: %"PRIu16" => %"PRIu16", %d samples/frame; assuming seek",
ctx->truehd_prev_time, input_timing, ctx->truehd_samples_per_frame);
to
/* detect discontinuity */
if (padding_remaining < 0 || padding_remaining >= MAT_FRAME_SIZE * 50) {
avpriv_request_sample(s, "Unusual frame timing: %"PRIu16" => %"PRIu16", %d samples/frame; assuming seek",
ctx->truehd_prev_time, input_timing, ctx->truehd_samples_per_frame);
This was suggested in one of the posts over on the FFmpeg bug tracker page.
It made no change with the old wrongly ripped file, but somehow I had the feeling that it helped a bit with the correctly ripped file. I had fewer drops on the merged spots compared to the “15.02.” build. But could also be purely a placebo one.
Here is a link to download that build:
I would appreciate it if someone could also test this build. If it works better I will probably merge it into my ffmpeg fork repo. (explanation later in this post)
The last build tested “build-28.05.2023-truehd+commits-overlay-mod-new-truehd.zip” had no audible difference. I will probably discard those changes made there, it was a mess to get the code ([FFmpeg-devel] avformat/spdifenc: handle long TrueHD input_timing gaps - Patchwork) working with the already patched ad_spdifenc.c file.
FFmpeg repo
Over at GitHub - mitzsch/FFmpeg: Mirror of https://git.ffmpeg.org/ffmpeg.git I keep the old and the updated + patched versions of the trueHD passthrough logic.
- branch master-2 holds the old trueHD logic
- branch master-3 contains the new and patched trueHD logic
I will sync them both with the upstream code from time to time.
Compile mpv with the old or the new trueHD logic
I created a fork of the very helpful shinchiro mpv-winbuild-cmake repo and previously only made changes so it was easy for me to compile mpv with the old trueHD logic. Now I made some changes to easily compile mpv with the new or the old logic. Currently, it’s only in a testing branch => GitHub - mitzsch/mpv-winbuild-cmake at testing-branch-v1 but I just tested the patches and they work as intended. I will just make some cosmetic changes and update the instructions accordingly. So for everyone eagerly wanting to compile those versions, just clone the repo/branch, create the compiling environment, and run ninja mpv-plex-ntruehd
for a mpv version with the new and patched truehd logic or ninja mpv-plex-otruehd
for a mpv version with the old logic.
This might also be helpful for those who have an older machine where those -v3 builds won’t work.
If you just want to download the latest:
something is broken with d3d11 and gpu-next, working on a working build!!!
Currently uploading newer v3 builds! - non-v3 builds are currently in the works!
Working builds are now uploaded!
mpv with the new trueHD logic:
-v3 build:
-non-v3 build:
mpv with the old trueHD logic:
-v3 build:
-non-v3 build: