Jump to content

Weird subtitle/audio behavior on local server vs app.emby.media domain?


Recommended Posts

drapacioli
Posted (edited)

Hi, don't know where to start with this but long story short I tried updating my emby server instance tonight because I was getting oversized subtitles on some videos with formatted subs on the web player (.SSA/.ASS format, subs were larger than they were supposed to be according to the person responsible for formatting them, and were cutting off the screen). I had to update several times because I guess it had a lot to update since last time I did this, but after it was done, instead of fixing the subtitles, they disappeared completely during playback. Apparently, the only way to get them to show properly is to force transcoding by disabling subtitle extraction on the fly, but I'm trying to avoid using transcoding due to the fact this is running on a server with a few other time-sensitive processes that need the CPU to be available.

But it gets weirder. If I access the server via the app.emby.media domain instead of directly via IP or through my own DDNS domain, the subtitles *do* work, and they're the correct size, but some of the formatting is dropped. So now I have three different ways I access the same file, and get three different results... 

What's going on here? Did I break something on my local instance by trying to update the server? If I check the console while trying to play back a video with these formatted subtitles, I see a few errors related to subtitles:

image.png.b47638b92e9d038469b14204d41340e1.png

Playback on app.emby.media domain - subtitles are missing formatting for the record: 

image.thumb.png.8bd678a9acd1e09f571862a9f137d81f.png

Same video file on direct IP (address bar not included for privacy), subtitles are missing, same encoding stats:

image.thumb.png.90678320b9f8b392f6ba0e6820ad04f0.png

Direct IP with subtitle extraction disabled, note formatting is different as well for some reason - probably correctly formatting it as part of the transcoding process?:

image.thumb.png.d34af373f967cb8ea37708e403215f2c.png

I did try on my Apple TV as well, it seems to be fine which to me seems to suggest it's a problem specifically with the web player:

20250419_223150.thumb.jpg.46cb6f89d8db0ad767936a0d1e4685eb.jpg

Edited by drapacioli
Added screenshots
Posted

Hi, what version of the server are you on?

drapacioli
Posted
3 minutes ago, Luke said:

Hi, what version of the server are you on?

4.8.11.0 for both web and server.

Posted

OK currently what happens with the web app when direct playing is custom fonts from .ass subtitles are not supported, so that's why you're seeing a generic font there.

This has been added on the 4.9 beta channel though.

drapacioli
Posted (edited)
12 minutes ago, Luke said:

OK currently what happens with the web app when direct playing is custom fonts from .ass subtitles are not supported, so that's why you're seeing a generic font there.

This has been added on the 4.9 beta channel though.

That makes sense. Still kind of weird how it behaved differently between domains though. I'll give the beta a try, thanks.

Edited by drapacioli
drapacioli
Posted (edited)

Hmm, beta has created a new issue. Now whenever I try to play on either my own domain/IP or on the app.emby.media domain, I get this error with *any* file I attempt to play back, subtitles or not:

image.png.21cf2636d31b21a48a9c72ba61af9aca.png

Console: 

image.thumb.png.a0b9d36d9dcd3d63a259fc8c56fb7739.png

Despite the error, Emby does not seem to log anything in the server .txt log, nor does it attempt to create a log file for playback.

Should I just try a clean install at this point?

Edited by drapacioli
Posted

HI, yes I just realized that myself. It's an issue in the newest build. It will be resolved in the next build. Probably get one up in the morning. Thanks.

  • Like 1
drapacioli
Posted (edited)
2 minutes ago, Luke said:

HI, yes I just realized that myself. It's an issue in the newest build. It will be resolved in the next build. Probably get one up in the morning. Thanks.

Yes, thank you for confirming. It seems to be transcoding in general that causes this error. In my case it appears to be every file because the audio generally gets transcoded to match a valid format for the web player, but a handful of files I tried just now were able to play with direct stream for all of audio, video, and subtitles. I'll check again on the next build when it's available, appreciate it!

Edited by drapacioli
  • Thanks 1
pwhodges
Posted

Do you have "Allow subtitle extraction on the fly" enabled in the server transcoding settings?  If you do, then ASS subs are delivered as plain text without the fonts, and maybe some formatting stripped off.  If you disable this, then subs are burned in by the server with complete formatting, even with the web client.

Paul

drapacioli
Posted (edited)
7 hours ago, pwhodges said:

Do you have "Allow subtitle extraction on the fly" enabled in the server transcoding settings?  If you do, then ASS subs are delivered as plain text without the fonts, and maybe some formatting stripped off.  If you disable this, then subs are burned in by the server with complete formatting, even with the web client.

Paul

Hi, yes I do have it enabled and that is intentional. I have several aggressively encoded videos which are fine tuned with variable bitrate to consume as little space as possible without sacrificing quality (for example one particular episode is a 10808p file where the video's average variable bitrate is ~2.3mbps), but when you allow transcoding to burn in subtitles, the real-time transcodes destroy the video quality due to the inherent transcoding bitrate maximum being set to the file's average bitrate within Emby's transcoding engine. This causes any fast motion scenes to become blocky messes, because they would under normal circumstances require a higher bitrate (and the source files do contain more data thanks to the variable bitrate the file is encoded in). Thanks to this, transcoding leads to a bad experience visually where it matters most, and while I've asked previously for the ability to adjust this to allow for a higher quality transcode by manually setting the bitrate or a multiple of the bitrate, for various reasons I've been told it's not a practical solution.

 

17 hours ago, Luke said:

HI, yes I just realized that myself. It's an issue in the newest build. It will be resolved in the next build. Probably get one up in the morning. Thanks.

Hi, just tried the new beta release, can confirm it works and subtitle extraction on the fly does handle fonts in the web player now. Only issue I'm seeing is it seems to take 10-15 seconds for the subs to start displaying. I'm not sure why they're absent from the first 10-15 seconds of a video? If I wait for them to load in then finally go back, they appear as normal.

Edited by drapacioli
pwhodges
Posted
1 hour ago, drapacioli said:

Only issue I'm seeing is it seems to take 10-15 seconds for the subs to start displaying. I'm not sure why they're absent from the first 10-15 seconds of a video? If I wait for them to load in then finally go back, they appear as normal.

If I understand correctly, this time is spent scanning the video file to extract the subtitles in advance (or maybe a sufficient buffer of them).  It depends on the original multiplexing of the file where in the file the subtitles are, and so how much scanning is needed.

But this is my deduction - I may be wrong on the mechanism...

Paul

Posted
On 4/20/2025 at 5:05 PM, drapacioli said:

Hi, just tried the new beta release, can confirm it works and subtitle extraction on the fly does handle fonts in the web player now. Only issue I'm seeing is it seems to take 10-15 seconds for the subs to start displaying. I'm not sure why they're absent from the first 10-15 seconds of a video? If I wait for them to load in then finally go back, they appear as normal.

It depends on how much has to be loaded, and also the performance of the client device.

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...