Jump to content

Subtitles sometimes not appearing in the Web App


Go to solution Solved by Luke,

Recommended Posts

Posted

Emby Server Version
4.5.4.0

Description of Problem

Some MKV files don't show subtitles in the web app. Neither Chrome or Firefox. But these same files work fine in Emby for Android and Emby Theater. It also works fine in VLC media player.
But it's file specific. Other files work fine in the web app.
If I repacked the file using MKVToolNix, the subtitles start working.

It's happened very frequently, and kinda sporadically over the past year. I usually have to just manually repackage the file, as I show in the demo below.
I've attached my server logs and provided a demo video.

Am I missing something obvious here? Is this a bug?
I'm not sure. I've searched around and haven't found similar reports?


Video Demo

 

embyserver.txt

pwhodges
Posted

I have never observed this problem, and most of my files are MKV with subs.  However, I know that some people have.  Two things to try:

In the Transcoding settings on the dashboard menu try changing the setting at the very end "allow subtitle extraction on the fly".  This will only affect files which are transcoding, but that may be why some of your files are OK and not others - for instance, browsers cannot play HEVC files without having the server transcode them, whereas most other clients can.

The 4.6 release of the server became available last night - upgrade and see if that helps.  Six months of development have affected lots of things, so be prepared for changes as well.

Paul

Posted
On 5/20/2021 at 2:23 PM, pwhodges said:

I have never observed this problem, and most of my files are MKV with subs.  However, I know that some people have.  Two things to try:

In the Transcoding settings on the dashboard menu try changing the setting at the very end "allow subtitle extraction on the fly".  This will only affect files which are transcoding, but that may be why some of your files are OK and not others - for instance, browsers cannot play HEVC files without having the server transcode them, whereas most other clients can.

The 4.6 release of the server became available last night - upgrade and see if that helps.  Six months of development have affected lots of things, so be prepared for changes as well.

Paul

I've been able to finally update to 4.6. The DockerHub repository I've been using was slow to update.
That said:

4.6 did not fix the issue.
This issue happens for both Direct play and transcoding.
I have this issue on H264 encoded files. HEVC is not involved.
This issue occurs with "allow subtitle extraction on the fly" checked and unchecked, on the affected files.

Carlo
Posted

Hi, are these files transcoding by any chance?

Posted
4 minutes ago, cayars said:

Hi, are these files transcoding by any chance?

To quote myself:

6 minutes ago, kieve said:

This issue happens for both Direct play and transcoding.

They direct play when I'm at home on the local network.
They transcode when I'm away from home
In this case, I'll say no: they're not transcoding.

Posted

Some more information:
This is an example of a file having the issue:
chrome_ZgTrzflJ0y.thumb.png.84c69bb312c38e5805527184c4357136.png

 

I have noticed the following:
When I turn on subs, it loads them from this url:
 

http://10.81.1.1:8096/emby/Videos/20066/d3104a80dd7f906a7232bd6d5b8a8a36/Subtitles/2/0/Stream.ass

This sub file appears to be empty:

[Script Info]
Title: English (US)
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResX: 640
PlayResY: 360

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text

But, if I change the URL to (I changed the last part from /2/0/Stream.ass to /2/1/Stream.ass):

http://10.81.1.1:8096/emby/Videos/20066/d3104a80dd7f906a7232bd6d5b8a8a36/Subtitles/2/1/Stream.ass

It has the actual lines:
 

[Script Info]
Title: English (US)
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResX: 640
PlayResY: 360

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:01:04.25,0:01:05.25,Default,,0,0,0,,Huh?

(I only included the first line here)

Carlo
Posted

That's an interesting observation.

@Luke could it be choosing the wrong stream?

Posted
30 minutes ago, kieve said:

Some more information:
This is an example of a file having the issue:
chrome_ZgTrzflJ0y.thumb.png.84c69bb312c38e5805527184c4357136.png

 

I have noticed the following:
When I turn on subs, it loads them from this url:
 


http://10.81.1.1:8096/emby/Videos/20066/d3104a80dd7f906a7232bd6d5b8a8a36/Subtitles/2/0/Stream.ass

This sub file appears to be empty:


[Script Info]
Title: English (US)
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResX: 640
PlayResY: 360

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text

But, if I change the URL to (I changed the last part from /2/0/Stream.ass to /2/1/Stream.ass):


http://10.81.1.1:8096/emby/Videos/20066/d3104a80dd7f906a7232bd6d5b8a8a36/Subtitles/2/1/Stream.ass

It has the actual lines:
 


[Script Info]
Title: English (US)
ScriptType: v4.00+
Collisions: Normal
PlayDepth: 0
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResX: 640
PlayResY: 360

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Roboto Medium,26,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,0,0,0,0,100,100,0,0,1,1.3,0,2,20,20,23,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:01:04.25,0:01:05.25,Default,,0,0,0,,Huh?

(I only included the first line here)

2/0 is correct.

Server log from that?

Posted

Or actually can you just provide a copy of that video for testing? thanks.

pwhodges
Posted

I tried your file, and it works with subtitles for me.

However, I would comment that the filename is very long, and if the folder name is similarly long you could well be running into trouble with that.  Try significantly shortening the filename and see if that fixes it for you.

Paul

Posted
7 minutes ago, pwhodges said:

I tried your file, and it works with subtitles for me.

However, I would comment that the filename is very long, and if the folder name is similarly long you could well be running into trouble with that.  Try significantly shortening the filename and see if that fixes it for you.

Paul

To re-iterate: Other episodes in the series, with the same name length work just fine.

Posted

I installed Emby locally on my Windows machine (instead of my server), and the files also work on a fresh install.

I'm going to clear the config folder and see if it fixes it on my server.
Though, I really don't want to have to re-add users and redo all my configurations...
Really not ideal.

  • Solution
Posted

If that's the case you could also try just deleting the server's cache/subtitles folder.

Posted
2 minutes ago, Luke said:

If that's the case you could also try just deleting the server's cache/subtitles folder.

I was legitimately just about to reply:

I just deleted the subtitle cache folder and that does fix it.
I guess my solution is going to be writing a cron job or something that just deletes my subtitle cache every day.

Posted

Wish the caching wasn't broken, but, it's the #1 hardest problem in computer science: Cache invalidation.
So it goes.

Posted

No I don't think that 's necessary. 4.5 has an issue where if there is a problem with the subtitle extraction or conversion, it may leave an empty/partial file in the cache folder which will cause it to get used next time and show no subtitles. 4.6 has corrected this.

  • Thanks 2
Posted

Oh, interesting. So in theory it shouldn't happen any more.
I didn't see that particular change listed in the 4.6 patch notes, among the other subtitle changes.

Awesome.

Thanks for the help guys

  • Thanks 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...