Jump to content

Won't display certain subtitles formats when transcoding/remuxing


rechigo

Recommended Posts

There are no errors on the app side but the Roku's support for ASS subs is very limited so, many times, they will need to be burned in.  When you tell the server to do that, though, ffmpeg appears to be choking on the font.

Link to comment
Share on other sites

pwhodges

I once had a font which caused transcoding and burning in to crash (causing a hang at the client) when it was first used.  It was an embedded font, and it was fixed by a relaxation of certain checks in the font renderer (during the 4.7 beta cycle).  But that has only happened to me with one series (out of hundreds with ASS subs, and the same again in films).

Paul

Link to comment
Share on other sites

rechigo
7 hours ago, ebr said:

There are no errors on the app side but the Roku's support for ASS subs is very limited so, many times, they will need to be burned in.  When you tell the server to do that, though, ffmpeg appears to be choking on the font.

I understand ASS/SSA has functionality that some subtitles formats don't have (I. e. styling, positioning). From what I've read, Roku just discards styling for ASS/SSA, wouldn't it make sense to convert subtitles to an officially supported format (i.e. VTT/SRT) by default? this is what occurs when using the web app. obviously still keep burn in option in settings as some users may want the styling (important in anime especially) Not sure what could be causing FFmpeg to hang. I gave it a good 30 seconds to load. my server is capable of software transcoding 1080p HEVC, so I don't see why it would have issue with rendering subtitle fonts. I'll try again tonight and watch my CPU usage. 

Edited by rechigo
Link to comment
Share on other sites

On 2/22/2024 at 10:57 PM, rechigo said:

Like before, whether I select subtitles on the media info screen before playback, or via video OSD, no .ASS subtitles will display. Enabling "Burn in SSA" subtitles in settings, and attempting to play the video with subtitles enabled causes the Roku app to hang on the video loading screen (33%). Attempting to enable subtitles while the video is playing behaves similarly (hangs on the loading screen, no video playback until I disable subtitles and restart playback)

 

Roku Logs:

Submitted at: ~10:49 PM EST

Playback user: rechigo

Playing back Narcos S02E07 with .ASS subtitles enabled

 

Server, transcode, and remux logs are present in the attached archive. Debug logging was enabled. Hopefully, something can be found in there.

LATEST-SERVER-DEBUG.zip 164.61 kB · 3 downloads

Can you try reverting any tinkerings you might have done and set those back to defaults:

Warning EncoderParametersH264LibX.Preset: Original: veryfast Actual: medium
Warning EncoderParametersH264LibX.ConstantRateFactor: Original: 23 Actual: 21
Warning EncoderParametersH264LibX.UseAbrMode: Original: False Actual: True

 

Link to comment
Share on other sites

rechigo
22 hours ago, Luke said:

Can you try reverting any tinkerings you might have done and set those back to defaults:

Warning EncoderParametersH264LibX.Preset: Original: veryfast Actual: medium
Warning EncoderParametersH264LibX.ConstantRateFactor: Original: 23 Actual: 21
Warning EncoderParametersH264LibX.UseAbrMode: Original: False Actual: True

 

Even resetting to default settings, playback doesn't start. The narcos file I'm trying to play is HEVC @ 10mbps. It will show the loading spinner at 33% for a while, before it disappears and I'm just staring at the backdrop. Even lowering encoding settings to super fast/18 CRF, it still doesn't load. 

 

Weirdly, if I play an anime of mine with ASS subtitles enabled (HEVC @ 8mbps), it will start playback just fine, with around ~100 FPS. If I use my original settings (medium/ABR enabled), it transcodes @ ~50 fps

Link to comment
Share on other sites

rechigo
On 2/23/2024 at 1:19 PM, rechigo said:

From what I've read, Roku just discards styling for ASS/SSA. Wouldn't it make sense to convert subtitles to an officially supported format (i.e. VTT/SRT) and having the Roku display that instead? this is what occurs when using the web app. obviously still keep burn in option in settings as some users may want the styling (important in anime especially) 

any thoughts on this? 

Link to comment
Share on other sites

4 hours ago, rechigo said:

Even resetting to default settings, playback doesn't start. The narcos file I'm trying to play is HEVC @ 10mbps. It will show the loading spinner at 33% for a while, before it disappears and I'm just staring at the backdrop. Even lowering encoding settings to super fast/18 CRF, it still doesn't load. 

 

Weirdly, if I play an anime of mine with ASS subtitles enabled (HEVC @ 8mbps), it will start playback just fine, with around ~100 FPS. If I use my original settings (medium/ABR enabled), it transcodes @ ~50 fps

Can you please provide a new log example? thanks.

Link to comment
Share on other sites

4 hours ago, rechigo said:

any thoughts on this? 

You're still going to lose all of the ass/ssa styling by doing that, so at that point you might as well just let the Roku handle it and avoid server transcoding.

Link to comment
Share on other sites

rechigo
19 hours ago, Luke said:

You're still going to lose all of the ass/ssa styling by doing that, so at that point you might as well just let the Roku handle it and avoid server transcoding.

But from various threads I've read, both here and on some Plex forums, Roku just discards ASS/SSA styling anyways, so if it's having issues displaying certain ASS subtitles, wouldn't it make sense just to convert it to an officially supported format? obviously leave burn in as an option as it's still important to have with shows/movies. I'll get new log example when I get home today 

Link to comment
Share on other sites

11 minutes ago, rechigo said:

But from various threads I've read, both here and on some Plex forums, Roku just discards ASS/SSA styling anyways, so if it's having issues displaying certain ASS subtitles, wouldn't it make sense just to convert it to an officially supported format? obviously leave burn in as an option as it's still important to have with shows/movies. I'll get new log example when I get home today 

I guess it depends on what you  mean as issues. If by issues you mean it discards ass/ssa styling and subtitles don't show up at all, then yes, that would be a reason. But if all you're referring to is the discarding of styling, then the same thing will happen anyway when converting to vtt so I'm not sure it would be an improvement.

Link to comment
Share on other sites

rechigo
10 hours ago, Luke said:

I guess it depends on what you  mean as issues. If by issues you mean it discards ass/ssa styling and subtitles don't show up at all, then yes, that would be a reason. But if all you're referring to is the discarding of styling, then the same thing will happen anyway when converting to vtt so I'm not sure it would be an improvement.

Yes, that is what I mean. to me it makes the most sense to just convert to VTT by default. Obviously there still won’t be any styling when converting to VTT, so that’s where burn in comes in should one want to retain styling.

Link to comment
Share on other sites

rechigo
On 2/25/2024 at 6:38 PM, Luke said:

Can you please provide a new log example? thanks.

Three transcode logs are created each time I start the show. 

 

Here is the log from a show where burning in ASS works properly:

ffmpeg-transcode-b62d071a-4d6e-4c43-b8dc-55fb3dd6b60c_1 (1).txt

 

Here is one log example from playing a show where burning in ASS doesn't work properly. I have about 7-8 logs generated for the minute or two I gave Emby to play the file, they all end with the same "latest request position unknown" message. it looks like transcodes are failing and Emby keeps trying to re-transcode

 

ffmpeg-transcode-94f4bb5f-19ee-49b5-a9c8-496a5e577f03_1.txt

embyserver.txt

Link to comment
Share on other sites

rechigo
Posted (edited)

Any updates on this? Just searching "ass subtitles not appearing on roku" brings up several posts explaining the exact issue I've described. As explained by speechles in those posts, Roku will attempt to convert the ASS subtitles to SRT by stripping out styling, but that doesn't always work, and can lead to no subtitles being displayed at all. Can we at least get an option in the Roku settings to convert ASS subtitles to SRT on the server to avoid this issue? Or do this by default because Roku's conversion implementation just sucks? I know the server can convert ASS to SRT as I've looked at the API, and there is an endpoint where you can request subtitles in a specific format, and the server will convert them. I tried it, and it effortlessly converts ASS to SRT.

Edited by rechigo
Link to comment
Share on other sites

There is already an option in the app to burn them in.  Does that work?

Link to comment
Share on other sites

rechigo
Posted (edited)
4 hours ago, ebr said:

There is already an option in the app to burn them in.  Does that work?

That option works for the most part, but as described in the post above, I'm having issues where burning in subtitles on certain files just causes transcoding to fail. I have a handful of media files with embedded .ASS subtitles that have little to no styling, so burning those in makes zero sense, especially on HDR content. Emby cannot hardware transcode while burning in subtitles.  It should be an option to choose between burning in ASS subtitles, or having them converted to SRT on the server, because from my research, Roku does not handle .ASS subtitles well at all. Roku won't display any styling for ASS subtitles, it just discards all styling, and sometimes causes subtitles to not display at all. This issue has been mentioned time and time again for years now.

 

The issue with Roku stripping styling from ASS subtitles has been described numerous times, across various different posts & forums. If Roku cannot properly handle .ASS subtitles, why do you guys not have the server convert ASS to SRT before sending them to the Roku? Keep the burn in option for those that want styling, but convert ASS to SRT when direct playing.

 

Edited by rechigo
Link to comment
Share on other sites

I've added this to our issue tracker since it is in issue. Using the same terms you used here. Even though technically we would have to do this a different way than SRT. We could convert them to WebVTT. But this would require the use of an HLS manifest to allow side-car the data. Then we could copy the video/audio streams leaving them untouched. Rather than burning them in. I see where you are going with this. It is a good idea. But like all features it has to go through the tracker.

Reference: Issue #1579: Allow ASS to be sent as SRT as an option in app along with burning them in

  • Like 2
Link to comment
Share on other sites

rechigo
On 3/5/2024 at 3:43 PM, speechles said:

I've added this to our issue tracker since it is in issue. Using the same terms you used here. Even though technically we would have to do this a different way than SRT. We could convert them to WebVTT. But this would require the use of an HLS manifest to allow side-car the data. Then we could copy the video/audio streams leaving them untouched. Rather than burning them in. I see where you are going with this. It is a good idea. But like all features it has to go through the tracker.

Reference: Issue #1579: Allow ASS to be sent as SRT as an option in app along with burning them in

Thank you for understanding the solution I proposed. Do you have any timeline of when something like this could be implemented? How much of a priority it is?

  • Thanks 1
Link to comment
Share on other sites

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