ExoPlayer
ExoPlayer copied to clipboard
MKVs from seamless branching blu-rays cause atmos audio drop outs and/or sync loss
ExoPlayer Version
2.18.1
Devices that reproduce the issue
NVIDIA Shield Pro w/ SHIELD Android TV v9.1.0(33.2.0.125)
Devices that do not reproduce the issue
- Non-Android devices (they do not use exoplayer).
- NVIDIA Shield + Jellyfin with libVLC selected as player rather than exoplayer.
Reproducible in the demo app?
Not tested
Reproduction steps
- Obtain NVIDIA Shield Pro.
- Obtain Plex App or Jellyfin App.
- Confirm atmos audio track is selected for playback.
- Playback (via Plex or Jellyfin with the exoplayer selected) an affected mkv file extracted from a seamlessly branched 4K blu-ray. See "media" field for examples of affected mkv files.
Expected result
Audio plays back normally.
Actual result
Audio momentarily drops out (goes silent) and then returns out of sync with the video when a "seamless branch" boundary is crossed. Occasionally, the audio merely drops out but remains in sync upon return.
Media
Geogan on the plex forums has provided/extracted a clip that reportedly exhibits the issue: https://forums.plex.tv/t/plex-audio-dropouts-and-sync-issues-with-seamless-branching-on-4k-truehd-atmos-movies/775510/24
Alternatively, the full MKV extracted from 4K UHD Blu-ray of "The Martian" could be used. The audio will drop out and/or go out of sync on the extended edition wherever there is a "seamless branch" between the two versions of the movie. Example glitch is at 36:20 of Extended/Director's Edition where he says "I'm going to need to science the s--t out of this. . ." Which is the glitch provided in Geogan's clip linked above.
Bug Report
- [ ] You will email the zip file produced by
adb bugreport
to [email protected] after filing this issue.
Just stumbled across this with apocalypse now seamless branch, kodi seems to handle it fine, finding alot of issues on reddit dating back a few years from various movies having this issue, is there any progress on this issue?
Kodi seems to have this fixed, but seeing more reports on this issues for things like plex that use exo player as titles that use seamless branching with 4k atmos continue to grow..
any news from this? now I have titles with the same issue.
It would be great if this could be fixed. It seems all the players on android that support Dolby Vision are based on ExoPlayer, so there is currently no way to play problematic Dolby Vision titles with seamless branching without TrueHD issues.
Using domyd's MLP demuxer does help, but even that cannot fix some 2 in 1 discs for ExoPlayer.
https://github.com/domyd/mlp
VLC plays the problematic files with no issues, but it doesn't support Dolby vision.
@christosts can you please take a look?
@christosts can you please take a look?
Thanks @rohitjoins, @christosts if you need any help with logs or testing etc, then I'm happy to help
Just stumbled across this with apocalypse now seamless branch, kodi seems to handle it fine, finding alot of issues on reddit dating back a few years from various movies having this issue, is there any progress on this issue?
Kodi seems to have this fixed, but seeing more reports on this issues for things like plex that use exo player as titles that use seamless branching with 4k atmos continue to grow..
@Montell-S, domyd's MLP demuxer will fix this title, there is a bit of technique to getting it right though. I can share the method I use if you're interested.
https://github.com/domyd/mlp
The latest nightly version of kodi now supports Dolby Vision in MKV, so I use that for the problematic titles.
@Montell-S, domyd's MLP demuxer will fix this title, there is a bit of technique to getting it right though. I can share the method I use if you're interested.
https://github.com/domyd/mlp
The latest nightly version of kodi now supports Dolby Vision in MKV, so I use that for the problematic titles.
I took a look at the tool and also related discussions at the mentioned plex/reddit forum, plus the kodi code fixes. I'm not an expert on blu-ray, and please correct me if I'm wrong, but my understanding that existing tools the convert blu-ray to MKVs copy the audio from the disc on the mkv, including the overlapping audio frames at branch boundaries (as described in https://github.com/domyd/mlp). Therefore, the resulting mkv file has overlapping audio frames. If that is so, this is an issue that we'd classify as "malformed media" rather than a spec-compliant piece of media, and we don't plan to alter the player to address this.
Please do let me know if my understanding about the root cause of the problem is different.
@christosts Someone with more technical knowledge would need to help explain it,, but this is a disappointing result. These are commercial media discs, xbox's, blu ray discs players all need to handle this type of seamless branching audio. As mentioned the title you quoted from someone else was not a great solution considering it plays fine in kodi without using some obscure third party demuxer, and again plays fine in a commercial player.
We are seeing alot of these issues pop up in plex forums and people complaining about stuttering audio falling out of sync and not knowing what causes it. Only a few went down the rabbit hole and ended up here. If we cant get a solution many of us will have to stop using plex and exo player which would be disappointing and moving to a branch like kodi.
These are commercial media discs, xbox's, blu ray discs players all need to handle this type of seamless branching audio.
From ExoPlayer's perspective this is irrelevant. We are only concerned with the MKV you're asking us to play, not where it was originally converted from. If the MKV is not valid, then the issue should be reported to the owners of the tool that produced it.
@icbaker they have, players have had issues with these discs and offered fixes through firmware updates.
I think this is becoming clear exo player is not going to address this, many of us with plex will have to talk to them or find other options.
Hello christosts,
With respect, I don't think that's an accurate evaluation of this issue.
You cite https://github.com/domyd/mlp as describing the phenomenon. Perhaps because it has been claimed that the application there "fixes" a problematic title? Yet the author of that application states that "MakeMKV 1.15.4 and newer uses the same method for joining TrueHD streams, and should produce flawless TrueHD streams as well." The vast majority of the people experiencing this issue are using MakeMKV to generate the affected MKV files.
These are commercial media discs, xbox's, blu ray discs players all need to handle this type of seamless branching audio.
From ExoPlayer's perspective this is irrelevant. We are only concerned with the MKV you're asking us to play, not where it was originally converted from. If the MKV is not valid, then the issue should be reported to the owners of the tool that produced it.
Yet, according to what chrisosts posted, he hasn't played any MKV files or analyzed them himself. Rather, he has inferred, from reading about what a tool someone suggested does, that the issue with all cited MKVs must be (that they are "malformed" despite the most popular tool for generating them conforming to what has just been cited as best practice). And based upon that, closed the ticket.
There has been no indication that exoplayer contributors have investigated the issue beyond doing some reading last night, after letting the report languish for months. And now. . . ticket closed.
I don't know if anyone is going to bother reading this at all now since this ticket is closed, and I don't really know what to say to you, or whether it is your code that is wrong or MKV file format that is wrong somehow (but if the file format is wrong then why does it play back perfectly in all other players including PC based players without audio problems?)
As HurinSteadfast said on PLEX forum:
"While I hate to let plex off the hook for this, I think I have determined that this is an issue with the exoplayer (by Google) embedded in the Plex client rather than a problem with the Plex client or code itself.
Why? Well, I tried jellyfin to work around this issue, and found that the exact same issue at the exact same place occurred in The Martian (and some other movies I have). However, jellyfin allows you to change the embedded player from exoplayer to libVLC. . . and upon trying libVLC, the problem disappears.
So, since both jellyfin and plex use exoplayer, and both are affected (yet jellyfin ceases to be affected when exoplayer is disabled), I believe that indicates Google’s exoplayer is likely the culprit.
"
I have got this problem on multiple discs now and latest and worst I have found is the Extended Cut of M3gan on Bluray. My post on PLEX details it and also shows the MakeMKV log which it generates while reading the disc to produce the MKV
https://forums.plex.tv/t/plex-audio-dropouts-and-sync-issues-with-seamless-branching-on-4k-truehd-atmos-movies/775510/84?u=geogan
If you need me to send you the entire original M3gan MKV file to attempt playback and test / investigate I can - the audio dropouts occur at least 10 times throughout movie after the first one about 35 minutes in (when she kills dog)
Please note that the ticket has been re-opened. So, let's all stay chill. :)
@geogan try DGDemux, if that doesn't work, then I have another method that will work.
https://www.rationalqm.us/dgdemux/binaries/DGDemux_1.0.0.67.zip
@geogan try DGDemux, if that doesn't work, then I have another method that will work.
https://www.rationalqm.us/dgdemux/binaries/DGDemux_1.0.0.67.zip
This program only extracts and de-muxxes from original full disc image copies (ie exact Bluray/4K disc images with entire original structure).
This is not what we are getting from MakeMKV - that already does all that job of extracting/muxxing from original file structure on disc and producing a final muxed MKV file with just the video/audio track and subtitles only.
So no use here. We are not really looking for alternate Bluray ripping program solutions here. This is just confusing things.
Are you saying Exoplayer uses some buggy demuxer? (domyd's MLP demuxer)?
@geogan, it's pretty simple to drop the output from DGDemux into MKVToolNix to produce your MKV.
MakeMKV uses domyd's MLP demuxer but it does have issues. I use a slightly different method and it works 99% of the time, but ExoPlayer does need fixing, because it doesn't happen with any other players.
@geogan, it's pretty simple to drop the output from DGDemux into MKVToolNix to produce your MKV.
MakeMKV uses domyd's MLP demuxer but it does have issues. I use a slightly different method and it works 99% of the time, but ExoPlayer does need fixing, because it doesn't happen with any other players.
Yes but DGDemux only works with full disc decrypted disc images, which is not what we have here. You are basically suggesting a complete alternative to MakeMKV. I don't have any interest in re-ripping using alternate complicated methods (yes I do know and have MKVToolNix for other uses for years).
OK, so MakeMKV uses domyd's MLP demuxer, right.
Well there is definitely a problem somewhere between this MLP demuxer (which MakeMKV apparently uses) and Exoplayer reading what it produces.
I'll just repeat what I said on PLEX here in case its not read by devs:
But anyway I just tried playing back the M3gan MKV locally on my Windows 10 PC from the server on some local players…
KMPlayer 2021.02.23.57 Using LAV Filters 0.70.2.0
SMPlayer 22.7.0 rev10091 Using MPV 0.34.0
VLC Player 3.0.18 Vetinari
Windows Media Player 12.0.19041.2788
All were able to get past the first problem point at dog attack around 35mins without audio dropouts. The only program that went out of sync a bit was Windows Media Player when I tried to seek up to just before problem, but when I went back to start and then seeked to a bit further back there was no problem.
@geogan, unless you can find a player that can deal with the output from MakeMKV, then you have no choice but to re-rip. It's not complicated.
@dastardo, as you just put it, "unless we can find a player that can deal with the output from MakeMKV". . . Kodi was apparently modified so that it can play back the cited mkvs without issue (which I intend to test with renewed urgency).
Is it your contention that there is no issue with exoplayer and that the fault lies entirely in "malformed" MKVs? If so, fair enough, nobody can stop you from making that case. However, I'm not sure it's possible, from (y)our vantage point, to determine which demuxer/transcoder/ripper is doing things correctly vs which ones are simply doing things in such a way that it doesn't happen to trigger this unfortunate behavior in exoplayer.
If that is not your contention, and you allow for the possibility that exoplayer needs to be improved so that it can play back MKVs ripped from seamless branching blu-rays without issue, may I kindly invite you to join us on the Plex forums where I'm sure many of us would welcome any guides you would like to post to help us work around the issue (ie., rip our blu-rays in such a way that does not trigger this issue) while the investigation over here continues.
It doesn't seem like this is the proper venue to work around the issue on a disc-by-disc basis using multiple different de/remuxers. And I'm not sure it's helpful in determining whether the issue is with exoplayer itself or with media that we're told has been demonstrably mangled.
@geogan, unless you can find a player that can deal with the output from MakeMKV, then you have no choice but to re-rip. It's not complicated.
Well I did just list four players above which can deal with the output from MakeMKV... but I presume you mean on NVidia Shield or that PLEX on Shield can use instead of Exoplayer
@HurinSteadfast The issue is with ExoPlayer, but there are some problematic discs. The best example of this is the 2 in 1 UHD of Resident Evil: Apocolypse. domyd does give a good description of what his demuxing tool does. He does explain in quite a lot of detail at https://github.com/domyd/mlp The problem is, it needs more development, but I don't think he's working on it anymore.
@geogan try the Resident Evil: Apocalypse 2 in 1 UHD. The only way I can get it to play without dropouts and going out of sync is to demux the audio with DGDemux and then play with Kodi.
@HurinSteadfast The issue is with ExoPlayer, but
. . . Let me stop you there. ;)
This is a bug report I filed with the intent of getting exoplayer fixed. I appreciate that you're trying to help. But, unfortunately, I think you're likely muddying the waters. Already, it seems apparent that the exoplayer devs seized upon some of the information you provided (the FAQ at mlp) and interpreted it as evidence that there is no issue with exoplayer. Thankfully, they seem to have now been convinced otherwise and have re-opened the ticket.
Again, there are better, more visible venues for helping individual users work past issues with individual discs. While I have no authority to tell you that you shouldn't be posting these things here, I hope you will consider that perhaps doing so isn't helpful for the purpose of this ticket.
@HurinSteadfast The issue is with ExoPlayer. I'm offering a workaround, but if you're not interested, then enjoy your dropouts and out of sync audio :-)
@HurinSteadfast The issue is with ExoPlayer. I'm offering a workaround, but if you're not interested, then enjoy your dropouts and out of sync audio :-)
This is a bug report forum, I dont think you need to get defensive, a work around is suited more for the plex forum or other end user support forums. But this is muddying the waters here.
As for my work around currently its to use another player other then exo (plex) such as kodi, or vlc.
Incase that went to everyone's email as big report forum, I am on my phone with auto correct. That should say "bug report".
@HurinSteadfast The issue is with ExoPlayer. I'm offering a workaround, but if you're not interested, then enjoy your dropouts and out of sync audio :-)
Correct. In this context, I am not interested.
Over on the Plex forums? Where the people actually affected would actually see and appreciate your helpful information and be able to follow up with you in a format conducive to conversation and tutorials? That'd be great!
We were able to reproduce the problematic behaviour on an Nvidia Shield using the clip provided in the original comment (thanks!).
However this thread seems to authoritatively state that Dolby TrueHD Atmos audio is not supported in MKV containers:
mkv containers are not supported
Given that, I'm afraid we don't plan to spend any more time on this issue. ExoPlayer generally aims to support spec-compliant media, but we don't follow the same philosophy as VLC (which generally tries to play everything, even that media which lies outside official spec support). This enables the ExoPlayer code to remain simpler and easier to reason about (since it's all justified with reference to a particular spec). ExoPlayer does occasionally introduce workarounds for spec-noncompliance problems that affect a significant fraction of the ecosystem, but I believe this issue does not meet that bar.
That comment on the referenced thread seems to be referring to a specific player (Dolby Reference Player), not that MKV is unofficially unsupported as a container format that happens to be holding TrueHD content.
@DamianEdwards
Indeed! That seems to be a reference to the reference player and what it is capable of playing. That does not preclude other players being able to handle additional containers. And, furthermore, aren't there actual specs and design documents that could be cited rather than random forum posts by Dolby employees?
It's disheartening that, twice now, the exoplayer teams seems to be reflexively latching onto any utterance found across the internet that could plausibly (or even implausibly) give them an excuse to declare this to be "not their problem" or "not worth fixing."
If exoplayer continues to refuse to fix this issue, there will be a lot of NVIDIA Shield devices up on eBay and/or in ewaste piles. Its audio-handling capability and status as the best Plex home theater playback device is the only reason many of us own one.