jarnedemeulemeester / findroid

Third-party native Jellyfin Android app
GNU General Public License v3.0
2.15k stars 137 forks source link

Indonesian Language Code in Subtitle Mistakenly Identified #737

Closed nattadasu closed 2 months ago

nattadasu commented 2 months ago

Describe the bug Well this one is really odd. Indonesian subtitle have this weird ms-ind (ISO: Malay Indonesian?) tagged by Findroid, making it unable to set preferred subtitle language from app end. The weirder one is Malay was tagged properly by the app instead (msa or may).

When comparing to Jellyfin official client, it does not suggest if the server accidentally reported as such, I think?

To Reproduce Steps to reproduce the behavior:

  1. Watch a movie or an episode with either embedded or external/sidecar of Indonesian (.id.* or .ind.*). For better comparison, also include Malay.
  2. Open Closed Caption/subtitle track menu.
  3. See the app identified it as Indonesian track.

Expected behavior Findroid should detected correct ISO 639-2/3 code of Indonesian to ind. If preferred subtitle language set, it should automatically pick Indonesian.

Screenshots Screenshot_2024-04-22-23-10-22-339_dev jdtech jellyfin

Jellyfin client

Device info (please complete the following information):

Additional context The observation does not test for Indonesian audio track as I used more to native dubbing with preferred subtitle.

MediaInfo of related issue
General
UniqueID/String                  : 147591050214892293069422291175368118618 (0x6F09009799C346198DC2A26782AD515A)
CompleteName                     : F:\Videos\Anime\That Time I Got Reincarnated as a Slime\Season 1\[BiliIntl] That Time I Got Reincarnated as a Slime - S01E01 - The Storm Dragon, Veldora [1920x1080 HEVC 8Bit, AAC 2.0, Multi-Subs (ENG THA VIE IND MSA ZHO)][8523B333].mkv
Format/String                    : Matroska
Format_Version                   : Version 4
FileSize/String                  : 291 MiB
Duration/String                  : 23 min 40 s
OverallBitRate/String            : 1 721 kb/s
FrameRate/String                 : 23.976 FPS
Encoded_Application/String       : Lavf60.16.100
Encoded_Library/String           : Lavf60.16.100
ErrorDetectionType               : Per level 1

Video
ID/String                        : 1
Format/String                    : HEVC
Format/Info                      : High Efficiency Video Coding
Format_Profile                   : Main@L5@Main
CodecID                          : V_MPEGH/ISO/HEVC
Duration/String                  : 23 min 40 s
Width/String                     : 1 920 pixels
Height/String                    : 1 080 pixels
DisplayAspectRatio/String        : 16:9
FrameRate_Mode/String            : Constant
FrameRate/String                 : 23.976 (23976/1000) FPS
ColorSpace                       : YUV
ChromaSubsampling/String         : 4:2:0
BitDepth/String                  : 8 bits
Default/String                   : Yes
Forced/String                    : No
colour_range                     : Limited
colour_primaries                 : BT.709
transfer_characteristics         : BT.709
matrix_coefficients              : BT.709
VENDOR_ID                        : [0][0][0][0]

Audio
ID/String                        : 2
Format/String                    : AAC LC
Format/Info                      : Advanced Audio Codec Low Complexity
CodecID                          : A_AAC-2
Duration/String                  : 23 min 40 s
Channel(s)/String                : 2 channels
ChannelLayout                    : L R
SamplingRate/String              : 48.0 kHz
FrameRate/String                 : 46.875 FPS (1024 SPF)
Compression_Mode/String          : Lossy
Default/String                   : Yes
Forced/String                    : No
VENDOR_ID                        : [0][0][0][0]

Text #1
ID/String                        : 3
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 38 s
Language/String                  : English
Default/String                   : Yes
Forced/String                    : No

Text #2
ID/String                        : 4
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 38 s
Language/String                  : Thai
Default/String                   : No
Forced/String                    : No

Text #3
ID/String                        : 5
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 38 s
Language/String                  : Vietnamese
Default/String                   : No
Forced/String                    : No

Text #4
ID/String                        : 6
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 40 s
Language/String                  : Indonesian
Default/String                   : No
Forced/String                    : No

Text #5
ID/String                        : 7
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 40 s
Language/String                  : Malay
Default/String                   : No
Forced/String                    : No

Text #6
ID/String                        : 8
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 38 s
Language/String                  : Chinese
Default/String                   : No
Forced/String                    : No

Text #7
ID/String                        : 9
Format/String                    : UTF-8
CodecID                          : S_TEXT/UTF8
CodecID/Info                     : UTF-8 Plain Text
Duration/String                  : 23 min 38 s
Language/String                  : Chinese
Default/String                   : No
Forced/String                    : No

Menu
00:00:00.000                     : Intro
00:22:05.075                     : Outro
jarnedemeulemeester commented 2 months ago

It seems like ExoPlayer maps id, in and ind to ms-ind. https://github.com/androidx/media/blob/d833d59124d795afc146322fe488b2c0d4b9af6a/libraries/common/src/main/java/androidx/media3/common/util/Util.java#L3837