google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.7k stars 6.02k forks source link

MKVs from seamless branching blu-rays cause atmos audio drop outs and/or sync loss #10520

Open HurinSteadfast opened 2 years ago

HurinSteadfast commented 2 years ago

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

Reproducible in the demo app?

Not tested

Reproduction steps

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

HurinSteadfast commented 1 year ago

@icbaker

Once again, thank you for your engagement on this issue. With respect, two out of three of the major bullet points in your last post were predicated upon this issue being related to the media being file-based rather than blu-ray based.

Does (should?) your analysis change now that there's multiple articles of evidence that blu-ray players needed modification/adjustement/fixes (beyond firmware level, in some cases) to accommodate TrueHD/Atmos on seamless branching discs? To be fair, I can see --from a strict "you can't prove anything about exoplayer with this sort of evidence" perspective-- how you might not find this compelling.

Granted, lacking specs and dev experience in this area, we are inferring certain things from circumstantial evidence. Such is the fate of laypeople trying to determine the root cause of an issue from the outside. And, also granted, the file-based media is pre-generated at the time the blu-ray is ripped. While, on the blu-ray player, the stream is generated dynamically. Yet, still, it seems like the same processes happen in each case (concatenating the audio streams) and even physical disc blu-ray players dealt with this (or very similar) issue years ago. Perhaps the specs and documentation for handling this on blu-ray would therefore be helpful here. We're just laypeople and users so we can't direct you to such things. But surely, someone on the exoplayer team has the access and expertise?

Thank you for considering!

--H

GhostM121 commented 1 year ago

And on his complaint there is no spec's, if he wants to check that link I posted a few posts up he will see that it was eventually fixed by exoplayer dev's, but one common comment you will see as I followed that bug back in 2018 was that dolby MAT spec's were not well documented, its just the nature of the beast. But that did not stop the dev's at the time from fixing an issue playing retail commercial disc's back properly without dropouts.

scarbrtj commented 1 year ago

**"With respect, two out of three of the major bullet points in your last post were predicated upon this issue being related to the media being file-based rather than blu-ray based."

"A blu ray is just folders with mt2s files and I think we established that has issues as well. Remuxing into an mkv is beside the point and is not contributing to the issue at all...."**

Btw just for proof this affects hardware players, I believe microsoft fixed it on xbox blu ray players, but the ones we know about like black hawk down microsoft looked into it and as far as I know eventually did fix this bug.

https://answers.microsoft.com/en-us/xbox/forum/all/black-hawk-down-extended-edition-uhd-blu-ray-has/1551d916-3f72-4934-87c5-5b97a2154b2f

Interesting: "I called xbox support, and they seem to know about the issue, and know it is software based, but can’t escalate it to where it will actually be fixed. So everyone who runs into this issue please report it."

HurinSteadfast commented 1 year ago

https://github.com/google/ExoPlayer/issues/3803#issuecomment-365858893

Note in the above: Plex used to "use our own implementation of True HD passthrough". . . rather than relying on exoplayer's.

Could they not do so again to potentially work around this issue?

scarbrtj commented 1 year ago

Software problem, somewhere, probably?

https://forums.plex.tv/t/nvidia-shield-dolby-truehd-playback-is-borked/778375/287

https://imgur.com/xbvVj9H

HurinSteadfast commented 1 year ago

Thank you scarbrtj. To quote what's at your first link:

Allow TrueHD frame times to be a lot bigger On seamless branching points, there can be a huge frame time gap, which seems to be expected, so just allow it for now.

More and more, it seems like we're a tweak away from having this fixed. Blu-ray players had to do it. Software players had to do it. Perhaps exoplayer needs to do it.

@icbaker, is this having any effect? 🤞

P.S. There's more at the links!

HurinSteadfast commented 1 year ago

DGDemux team member states:

"DGDemux makes a clean single-file rip, correcting for the M2TS gaps. There should be no problem playing it after remuxing to MKV. I've done it many times. There simply are no gaps remaining after this process."

. . . and yet, exoplayer. . . and only exoplayer. . . chokes on it.

HurinSteadfast commented 1 year ago

Yet another player modified their code because it couldn't correctly playback TrueHD/Atmos on seamlessly branching discs. Honestly, it seems like just about any player you stumble across has something like this in its change log. That is, except exoplayer.

https://github.com/Nevcairiel/LAVFilters/releases/tag/0.75

"Fixed: Resolved an issue with glitching TrueHD bitstreaming on seamless-branching titles"

@icbaker, please reconsider.

Given all the software players and hardware (disc) players that have had to modify their code to playback TrueHD/Atmos from seamlessly branching discs, it seems more and more evident that most (if not all) media players needed to adapt to changing/advancing technology (in this case, atmos combined with seamless branching) in order to provide their users with a satisfactory experience.

There is no evidence that there is anything wrong with the discs, nor the MKV files being extracted from them. But there is ever-mounting evidence that media players needed to be tweaked a while back to properly handle TrueHD/Atmos and seamless branching. . . and exoplayer never implemented those tweaks.

Please, reconsider and put the experience of exoplayer users ahead of whatever principle is precluding the exoplayer team from taking this seriously and fully investigating.

(hat tip to ghostm over on plex forums for pointing out the LAV Filter change)

ehsope commented 1 year ago

Just chiming in that I've noticed this issue with Apocalypse Now on the Shield (which I have learned uses Exoplayer). My Dune HD Real Vision 4K played the same file with no issues.

scarbrtj commented 1 year ago

still no fix :(

scarbrtj commented 10 months ago

If you have say two discs comprising one movie, for example part 1 (disc 1) and part 2 (disc 2) of Zack Synder's Justice League, Plex suggests merging the two files together:

"However, to get a better overall experience, we encourage you to instead use a tool to join/merge the individual files into a single video. There are multiple ways you can do this and a quick search in your favorite search engine should give you some options on how to “join” files. An unofficial guide with one free tool has even been posted in our forums." https://support.plex.tv/articles/naming-and-organizing-your-movie-media-files/#:~:text=Movies%20Split%20Across%20Multiple%20Files&text=The%20split%20parts%20must%20be,release%20year)%20%E2%80%93%20Split_Name.ext

But DO NOT do this (like with MKVToolNix for example). You will create a seamless branch point, and the audio will go out of sync at the branch point (if bitstreaming back on Shield... all other players will be fine, and it will be fine on Shield if you transcode the audio). You MUST name as pt1 and pt2 to keep from going out of sync.

ehsope commented 10 months ago

all other players will be fine

In my testing (using LOTR 1 remaster) both the Shield and my Dune HD Real Vision 4K had the same issue. The only player I know of that doesn't is my Zidoo Z9X Pro.

The Dune HD plays seamless branched disc remuxes fine, but has issues if you edit the tracks yourself.

scarbrtj commented 10 months ago

Rudy 4K: seamless branched, has audio sync issue with Atmos on Plex with Shield

prestonsmartuk commented 8 months ago

same issue here, still no fix

HurinSteadfast commented 7 months ago

It's just astounding to me that the exoplayer team's stance has come down to:

Even though every other player has figured out how to play back these files properly, we won't do so. Because nobody asking for it can tell us how to do it. And we aren't willing to do the research and work ourselves. to figure it out.

We're customers. Not developers. There has been ample evidence provided that other players have noted this issue and addressed it. But exoplayer will not.

tonihei commented 7 months ago

Even though every other player has figured out how to play back these files properly, we won't do so. Because nobody asking for it can tell us how to do it. And we aren't willing to do the research and work ourselves. to figure it out.

@icbaker already explained above (https://github.com/google/ExoPlayer/issues/10520#issuecomment-1576964379) why we can't easily fix this issue. It mostly comes down to having no known spec of how Dolby True HD is supposed to be packaged in MKV (or another container). But we are still happy to accept pull requests that provide a fix with some explanation for why that is a suitable way of fixing the issue.

We're customers. Not developers.

I can understand your frustration that there is no simple, quick fix available for the problem you face, but please note that ExoPlayer is an open-source project and there are no customers as such. And this is also not a customer service :). We maintain the project, accept contributions from external developers and discuss and solve technical issues with those developers (who are directly using the library in their code). If you feel like you are a (potentially paying?) customer of Plex, then it's probably best to reach out to them to highlight your technical issues. They are likely better placed to either work around it in their app or provide us with the pull request or additional context we are missing to make progress.

ehsope commented 7 months ago

"MK4" Tells me all I need to know about these devs, frankly.

HurinSteadfast commented 7 months ago

Even though every other player has figured out how to play back these files properly, we won't do so. Because nobody asking for it can tell us how to do it. And we aren't willing to do the research and work ourselves. to figure it out.

@icbaker already explained above (#10520 (comment)) why we can't easily fix this issue. It mostly comes down to having no known spec of how Dolby True HD is supposed to be packaged in MKV (or another container). But we are still happy to accept pull requests that provide a fix with some explanation for why that is a suitable way of fixing the issue.

And yet, the container type has never been the issue. Nor is the issue that these are "file-based" media derived from discs as @icbaker assumed/asserted since the beginning. As has been demonstrated, and said repeatedly, exoplayer fails to correctly playback seamlessly branched TrueHD+Atmos media regardless of container or media type. Indeed, one suspects that if we could rig a disc up directly to exoplayer, we'd see the issue there too.

There are several examples politely and patiently documented above of hardware and software media players discovering and fixing the same apparent problem. To quote one of the examples: "Fixed: Resolved an issue with glitching TrueHD bitstreaming on seamless-branching titles"

Here's another: "Allow TrueHD frame times to be a lot bigger. On seamless branching points, there can be a huge frame time gap, which seems to be expected, so just allow it for now."

We're customers. Not developers.

I can understand your frustration that there is no simple, quick fix available for the problem you face, but please note that ExoPlayer is an open-source project and there are no customers as such. And this is also not a customer service :). We maintain the project, accept contributions from external developers and discuss and solve technical issues with those developers (who are directly using the library in their code). If you feel like you are a (potentially paying?) customer of Plex, then it's probably best to reach out to them to highlight your technical issues. They are likely better placed to either work around it in their app or provide us with the pull request or additional context we are missing to make progress.

Apologies. I mispoke and was writing in haste. My feeling being that longer, more polite, accurate, and detailed responses didn't seem to be productive either. I meant to say "user." But, the clarification is noted. Incidentally, the link to the long and detailed plex thread is in my initial report (it even includes some posts from Plex personnel). If we can't get plex to contact you, how do we cajole you into contacting them to "discuss and solve technical issues with those developers?"

If I seem less cordial than usual (while still remaining civil, always!), it's because I feel that, from the get-go, there has been scapegoating and excuse-making for why nobody should really look into this. Everyone is at great pains to explain why it's not their problem. And now, how we're not "customers" (etc.), but nobody is willing to go to any pains to actually be productive towards resolving the issue.

I too work in an industry where we often have ample means and reasons to tell our users (or customers) why something isn't our responsibility to fix. Yet this would often leave our users/customers stuck with nobody who can really help them. Thankfully, usually one of us is curious enough, or kind enough, or conscientious enough to help regardless. And we try do that where we can.

But, again, your clarification is noted. We are not "customers" of your "product". . . we're just "users" of your "project" because a product we purchased makes use of it. We can't make Plex contact you. And we can't make you contact Plex. So. . . from the exoplayer team's perspective, there's nothing to be done here.

And yet something tells me the Plex people would tell us that they use the exoplayer application because it's supposed to function correctly. So if it's not, "that's an exoplayer problem and it's not Plex's job to change exoplayer."

Joy.

--H

scarbrtj commented 6 months ago

New Conan the Barbarian 4K has the audio issue

scarbrtj commented 6 months ago

Step Brothers 4K has the audio issue

scarbrtj commented 6 months ago

The Abyss 4K has the issue... severely!

daNutzzzzz commented 3 months ago

You can add Underworld (2003) to the list. Currently using Plex (PM4K) Kodi addon.

Plex are insinuating that the issue is related to the passthrough driver on the shield and it requires Nvidia to fix it: https://forums.plex.tv/t/plex-audio-dropouts-and-sync-issues-with-seamless-branching-on-4k-truehd-atmos-movies/775510/174

Shamir26071 commented 3 months ago

Hi, has there been a fix to this? I'm unable to play TRUEHD Atmos audio on my 4K remux without the audio cutting out every 30Secs-2Min and on my Lg C3, the Dolby vision will pop up repeatedly if the audio cuts. I do not have any issues with all other formats and audio. Only TRUEHD 7.1. I am using a shield pro and Plex. I even tried by usb playback via SSD and just player and it's the same issue.

ehsope commented 2 months ago

Hi, has there been a fix to this? I'm unable to play TRUEHD Atmos audio on my 4K remux without the audio cutting out every 30Secs-2Min and on my Lg C3, the Dolby vision will pop up repeatedly if the audio cuts. I do not have any issues with all other formats and audio. Only TRUEHD 7.1. I am using a shield pro and Plex. I even tried by usb playback via SSD and just player and it's the same issue.

No this hasn't been fixed, but this may be a different issue. Does it happen on every file with TrueHD? Which AVR do you have?

There is a known bug with the latest Denon/Marantz AVRs and LG TVs, where the audio will occasionally drop out when CEC is enabled.

dedge10 commented 3 weeks ago

I have this issue with DTHD as well I'm using Vimu Player . It was the same on kodi and plex