Skip to content
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

Improve codec info #2893

Merged
merged 1 commit into from
Jul 18, 2023
Merged

Improve codec info #2893

merged 1 commit into from
Jul 18, 2023

Conversation

mohd-akram
Copy link
Contributor

@mohd-akram mohd-akram commented Jul 13, 2023

Changes

  • Move CC after audio codec info before format info
  • Specify interlaced or progressive in resolution
  • Specify if Dolby Vision or other HDR
  • Specify if Dolby Atmos or DTS:X
  • Specify if DD+ or DTS-HD, rename Dolby to DD

addBlockText(context, layout, "VISION");
addSpacer(context, layout, " ");
} else if (stream.getVideoRangeType() != null && !stream.getVideoRangeType().equals("SDR")) {
addBlockText(context, layout, stream.getVideoRangeType().toUpperCase());

Check warning

Code scanning / Android Lint

Implied default locale in case conversion

Implicitly using the default locale is a common source of bugs: Use toUpperCase(Locale) instead. For strings meant to be internal use Locale.ROOT, otherwise Locale.getDefault().
if (stream.getProfile() != null && stream.getProfile().contains("DTS-HD")) {
codec = "DTS-HD";
} else if (stream.getCodec() != null && stream.getCodec().trim().length() > 0) {
switch (stream.getCodec().toLowerCase()) {

Check warning

Code scanning / Android Lint

Implied default locale in case conversion

Implicitly using the default locale is a common source of bugs: Use toLowerCase(Locale) instead. For strings meant to be internal use Locale.ROOT, otherwise Locale.getDefault().
case "dca": codec = "DTS"; break;
case "eac3": codec = "DD+"; break;
case "ac3": codec = "DD"; break;
default: codec = stream.getCodec().toUpperCase();

Check warning

Code scanning / Android Lint

Implied default locale in case conversion

Implicitly using the default locale is a common source of bugs: Use toUpperCase(Locale) instead. For strings meant to be internal use Locale.ROOT, otherwise Locale.getDefault().
@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Jul 18, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Jul 18, 2023
Copy link
Member

@nielsvanvelzen nielsvanvelzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request (and the explanations on my comments)!

@nielsvanvelzen nielsvanvelzen merged commit c69df82 into jellyfin:master Jul 18, 2023
@mohd-akram mohd-akram deleted the improve-codec-info branch July 18, 2023 17:58
@VampiricAlien
Copy link

@mohd-akram or @nielsvanvelzen
Question: If the media is HDR, is there supposed to be an HDR tag, if so it seems to be missing?

@nielsvanvelzen
Copy link
Member

If the video is not Dolby Vision it should display HDR

@VampiricAlien
Copy link

If the video is not Dolby Vision it should display HDR

That's what I was thinking, No HDR tag shows up for me but checking in Jellyfin web and it says the same media is HDR.

In the debug options it can show the media file details such as bitrate, could more info be added there as well?

@nielsvanvelzen
Copy link
Member

Hmm maybe we need to detect HDR in a different way, can you create an issue for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants