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

SAMI External subtitle does not show on Exoplayer and External Player #1383

Open
2 of 3 tasks
gkswngh05 opened this issue May 14, 2024 · 4 comments
Open
2 of 3 tasks
Labels
bug Something isn't working

Comments

@gkswngh05
Copy link
Contributor

Describe the bug

The subtitle does not show on Exoplayer and External Player when external subtitle format is SAMI(*.smi, *.sami).

if (mediaStream.deliveryMethod == SubtitleDeliveryMethod.EXTERNAL) {
val deliveryUrl = mediaStream.deliveryUrl
val mimeType = CodecHelpers.getSubtitleMimeType(mediaStream.codec)
if (deliveryUrl != null && mimeType != null) {

When subtitle format is SAMI, mediaStream.codec returns "sami".
But "sami" is not defined in CodecHelpers.getSubtitleMimeType, so that function returns null.

fun getSubtitleMimeType(codec: String?): String? {
return when (codec) {
"srt", "subrip" -> MimeTypes.APPLICATION_SUBRIP
"ssa", "ass" -> MimeTypes.TEXT_SSA
"ttml" -> MimeTypes.APPLICATION_TTML
"vtt", "webvtt" -> MimeTypes.TEXT_VTT
"idx", "sub" -> MimeTypes.APPLICATION_VOBSUB
"pgs", "pgssub" -> MimeTypes.APPLICATION_PGS
"smi", "smil" -> "application/smil+xml"
else -> null
}
}

Since Jellyfin server is converting SAMI subtitle to Subrip format before sending to client, a quick and dirty solution would be defining "sami" as MimeTypes.APPLICATION_SUBRIP.

 fun getSubtitleMimeType(codec: String?): String? { 
     return when (codec) { 
         "srt", "subrip" -> MimeTypes.APPLICATION_SUBRIP 
         "ssa", "ass" -> MimeTypes.TEXT_SSA 
         "ttml" -> MimeTypes.APPLICATION_TTML 
         "vtt", "webvtt" -> MimeTypes.TEXT_VTT 
         "idx", "sub" -> MimeTypes.APPLICATION_VOBSUB 
         "pgs", "pgssub" -> MimeTypes.APPLICATION_PGS 
         "smi", "smil" -> "application/smil+xml"
         "sami" -> MimeTypes.APPLICATION_SUBRIP
         else -> null 
     } 
 } 

Logs

No response

Application version

2.6.1

Where did you install the app from?

Google Play

Device information

Galaxy S23 Ultra

Android version

Android 14, One UI 6.1

Jellyfin server version

10.9.0

Which video player implementations does this bug apply to?

  • Web player (default)
  • Integrated player (ExoPlayer)
  • External player (VLC, mpv, MX Player)
@gkswngh05 gkswngh05 added the bug Something isn't working label May 14, 2024
@gkswngh05
Copy link
Contributor Author

gkswngh05 commented May 16, 2024

Come to think about it, I think it might be the Jellyfin server's problem. I may have to investigate about it...
Edit: Nevermind.

@jellyfin-bot
Copy link
Contributor

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@gkswngh05
Copy link
Contributor Author

The issue still persists on the Android client 2.6.2 and server version 10.9.11.

@ppskj178
Copy link

I had the same problem.
SMI is a popular enough format.
I hope it gets fixed soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants