-
Notifications
You must be signed in to change notification settings - Fork 566
Add detection for DTS-HD audio tracks in MatroskaExtractor #2485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for the contribution! Do you happen to have sample files that show the parsing issue to verify the fix works? You can share them to [email protected] with "Issue #2485" in the subject and report back here. For the actual implementation, I was wondering how this new path relates to the existing |
@tonihei I just sent an email with two sample files, one for DTS:X and one for DTS-HD MA. In both cases Media3 will reproduce them as DTS, while with this PR it should correctly reproduce them as DTS:X and DTS-HD MA respectively. As far as I know, with the Matroska container the only way to distinguish between the different DTS formats is by analyzing the frame data. This is why I don't think it was feasible to add this check to |
None of the two files seem to trigger the new |
Distinguish between DTS and DTS-HD formats by analyzing the frame data in matroska containers. This enables accurate MIME type assignment for DTS-HD content.
Oops sorry. When I did a clean up before opening the PR I introduced a bug and forgot to do a final test. With the latest revision it should work fine. I tested it with the two samples that I sent you via email and the demo media3 app. In both cases you can see that the MKV gets loaded with
For me it seems to be always working fine, but it could be a fluke with the timings. Do you have suggestions on exactly where this new check should be moved into? I can try to improve it, but of course if you prefer to take this on it would be great. |
Thanks, I can see the
It's not a fluke I'm afraid. What is happening at the moment is that the player is prepared with a regular DTS track first (you can see the The proper fix would be to not call |
Distinguish between DTS and DTS-HD formats by analyzing the frame data in matroska containers. This enables accurate MIME type assignment for DTS-HD contents.
This fixes the old issue google/ExoPlayer#6225.
The patch is based on the initial work of @moneytoo.