Jump to content

ASS subtitle not showing - playback issue


shr3ps

Recommended Posts

shr3ps

Hello,

 

I'm on Debian 9.8 on server side, running the latest beta, but this issue is there since I upgraded to Emby 4.0. (was working fine with Emby 3.5.2/3.5.3).

Tried with:

- emby-server-deb_4.0.0.2_amd64.deb 

- emby-server-deb_4.0.1.0_amd64.deb

- emby-server-deb_4.0.2.0_amd64.deb 

- emby-server-deb_4.1.0.10_amd64.deb
- emby-server-deb_4.1.0.12_amd64.deb

 

When playing MKV files with ASS Subtitles, tested on Firefox and Chrome (HTML5 playback), subtitles are not showing.

I checked server logs, and found that ASS track is encoded/demuxed via ffmpeg:

./embyserver.txt:1029:2019-03-11 13:22:56.065 Info SubtitleEncoder: ProcessRun 'ffmpeg-subtitle_extract' Execute: /opt/emby-server/bin/ffmpeg -i file:"/srv/media/Series/Sword.Art.Online/S03/SAO.S03E21.VOSTFR.1080p.WEBRiP.x264.mkv" -map 0:2 -an -vn -c:s copy "/var/lib/emby-server/cache/subtitles/b/b3fd429fcf754f26313b86b441d5104e_636877678715979463_2_0_0_False.ass"
./embyserver.txt:1079:2019-03-11 13:23:17.462 Info SubtitleEncoder: ffmpeg subtitle extraction completed for file:"/srv/media/Series/Sword.Art.Online/S03/SAO.S03E21.VOSTFR.1080p.WEBRiP.x264.mkv" to /var/lib/emby-server/cache/subtitles/b/b3fd429fcf754f26313b86b441d5104e_636877678715979463_2_0_0_False.ass

So it seems that's why subtitles are not available, but when the process is finished, Subtitle doesn't show up, I need to disable and enable them back again (and seek back to the beginning of the file).

With big movies, we have to wait many minutes for the ASS to be "available".

 

Also when streaming (from Android app) to my Chromecast (tested with Chromecast v1, v2 and Ultra), thoses ASS subtitle are not available at the begining and then, they show up, but accelerated, and are kind of out of sync with audio/video. We must stop, disconnect and restart the stream to have them properly displayed. Sometimes they don't show up at all.

 

Let me know how I can help to debug those ASS playback issue.

 

 

 

Link to comment
Share on other sites

Hello,

 

I'm on Debian 9.8 on server side, running the latest beta, but this issue is there since I upgraded to Emby 4.0. (was working fine with Emby 3.5.2/3.5.3).

Tried with:

- emby-server-deb_4.0.0.2_amd64.deb 

- emby-server-deb_4.0.1.0_amd64.deb

- emby-server-deb_4.0.2.0_amd64.deb 

- emby-server-deb_4.1.0.10_amd64.deb

- emby-server-deb_4.1.0.12_amd64.deb

 

When playing MKV files with ASS Subtitles, tested on Firefox and Chrome (HTML5 playback), subtitles are not showing.

I checked server logs, and found that ASS track is encoded/demuxed via ffmpeg:

./embyserver.txt:1029:2019-03-11 13:22:56.065 Info SubtitleEncoder: ProcessRun 'ffmpeg-subtitle_extract' Execute: /opt/emby-server/bin/ffmpeg -i file:"/srv/media/Series/Sword.Art.Online/S03/SAO.S03E21.VOSTFR.1080p.WEBRiP.x264.mkv" -map 0:2 -an -vn -c:s copy "/var/lib/emby-server/cache/subtitles/b/b3fd429fcf754f26313b86b441d5104e_636877678715979463_2_0_0_False.ass"
./embyserver.txt:1079:2019-03-11 13:23:17.462 Info SubtitleEncoder: ffmpeg subtitle extraction completed for file:"/srv/media/Series/Sword.Art.Online/S03/SAO.S03E21.VOSTFR.1080p.WEBRiP.x264.mkv" to /var/lib/emby-server/cache/subtitles/b/b3fd429fcf754f26313b86b441d5104e_636877678715979463_2_0_0_False.ass

So it seems that's why subtitles are not available, but when the process is finished, Subtitle doesn't show up, I need to disable and enable them back again (and seek back to the beginning of the file).

With big movies, we have to wait many minutes for the ASS to be "available".

 

Also when streaming (from Android app) to my Chromecast (tested with Chromecast v1, v2 and Ultra), thoses ASS subtitle are not available at the begining and then, they show up, but accelerated, and are kind of out of sync with audio/video. We must stop, disconnect and restart the stream to have them properly displayed. Sometimes they don't show up at all.

 

Let me know how I can help to debug those ASS playback issue.

 

I am having exactly the same issue but with Windows emby server, also ASS subs and chromecast

Link to comment
Share on other sites

@@shr3ps

@@laxus

 

We extract them on the fly prior to playback. On some systems, this can take a long time and that's what causes this. You have a few options:

  • Go into server transcoding settings and disable on the fly subtitle extraction. This will force them to be burned in with server transcoding. This is a very expensive process and should be your last resort.
  • Use external subtitles, our subtitle download feature can help with this
  • Use an Emby app that can play the embedded subtitles directly, such as Emby for Android, iOS, and others.
Link to comment
Share on other sites

 

@@shr3ps

@@laxus

 

We extract them on the fly prior to playback. On some systems, this can take a long time and that's what causes this. You have a few options:

  • Go into server transcoding settings and disable on the fly subtitle extraction. This will force them to be burned in with server transcoding. This is a very expensive process and should be your last resort.
  • Use external subtitles, our subtitle download feature can help with this
  • Use an Emby app that can play the embedded subtitles directly, such as Emby for Android, iOS, and others.

 

 

When I disable on the fly the video doesn't play at all, my server is a pretty high spec so should easily be able to handle it, will attach a log with on the fly disabled now for emby and ffmpeg, I can see the error code in ffmpeg logs

 

Frustratingly for this series there are no subtitles available, but worst case scenario I can rip the ASS and convert to SRT

ffmpeg_log.txt

log.txt

Link to comment
Share on other sites

shr3ps

 

@@shr3ps

@@laxus

 

We extract them on the fly prior to playback. On some systems, this can take a long time and that's what causes this. You have a few options:

  • Go into server transcoding settings and disable on the fly subtitle extraction. This will force them to be burned in with server transcoding. This is a very expensive process and should be your last resort.
  • Use external subtitles, our subtitle download feature can help with this
  • Use an Emby app that can play the embedded subtitles directly, such as Emby for Android, iOS, and others.

 

Thx @@Luke for your reply.

 

For me, what you describe is the behavior on Emby 3.5.x but not on Emby 4.0+ anymore.

With Emby 3.5+:

- When hitting the play button, we have a loader,

- Subtitles are extracted on the fly (so, this is prior to playback) - during 1min on my side with my machine

- The stream starts to play with the subtitles, playback is totally fine

 

With Emby 4.0+:

- When hitting the play button, no loader, the stream starts right away: video and audio are fine, subtitles KO

- Subtitles are extracted on the fly in background

- After 1min or 2, subtitles starts to appears on the video which is already "playing" since 2min (so we lost 2min of subtitle at the beginning of the video)

 

And because of this, on Chromecast it's totally unsupported, making subtitles completely out of sync on Chromecast playback. Probably because chromecast doesn't "understand" why subtitles arrives later.

 

Can you add an option to have the old behavior @@Luke ?

Link to comment
Share on other sites

When I disable on the fly the video doesn't play at all, my server is a pretty high spec so should easily be able to handle it, will attach a log with on the fly disabled now for emby and ffmpeg, I can see the error code in ffmpeg logs

 

Frustratingly for this series there are no subtitles available, but worst case scenario I can rip the ASS and convert to SRT

 

We're looking into this failure, thanks.

Link to comment
Share on other sites

shr3ps

@@shr3ps, sorry but this isn't true. It is the same between 3.5 and 4.0.

 

Ok, I think you mean there was no changes in "server code" about this.

On my side, I upgraded this morning to the latest beta (.15) + I manually upgraded ffmpeg and ffprobe to 4.1.1-static, and I seems that my issue whith ASS subtitle is fixed, at least on Firefox and HTML5 playback.

 

I will check with Chromecast and let you know how it goes.

Link to comment
Share on other sites

Please note that you might have other issues when you're using a different ffmpeg version than the one we're including.

 

Also, despite its version output, our version is actually equal to the official ffmpeg master branch (in case of hardware accelerations).

Link to comment
Share on other sites

Ok, I think you mean there was no changes in "server code" about this.

On my side, I upgraded this morning to the latest beta (.15) + I manually upgraded ffmpeg and ffprobe to 4.1.1-static, and I seems that my issue whith ASS subtitle is fixed, at least on Firefox and HTML5 playback.

 

I will check with Chromecast and let you know how it goes.

 

Let us know how you get on. Thanks.

  • Like 1
Link to comment
Share on other sites

shr3ps

Let us know how you get on. Thanks.

 

The only proper fix I found to have a nice playback on every platform, is manually extract the ASS track with ffmpeg, and play the video with Emby using this external ASS file.

Regarding this, I have two improvements to suggest:

- When a video with Embeded ASS subtitle is played the first time, make sure the extracted ASS is kept in cache for the next time the video is played by the same or another user. The actual bahavior seems to be the track is extracted again on the fly each time the file is played (with my bug every time)

- Maybe have an option to force the Subtitles track to be extracted and store in cache before it's played by a user: maybe during the library metadata update phase? (when ffprobe is triggered to extract file media info, we might also launch ffmpeg to extract ASS file, with 30ko each, that's not too big)

 

What do you think about thoses?

Link to comment
Share on other sites

 

 

- When a video with Embeded ASS subtitle is played the first time, make sure the extracted ASS is kept in cache for the next time the video is played by the same or another user. The actual bahavior seems to be the track is extracted again on the fly each time the file is played (with my bug every time)

 

We already do this.

Link to comment
Share on other sites

  • 10 months later...
scineram

Hi!

 

I am having this issue when sending to Chromecast 3 (from iOS). The subtitles show up late during playback, after about half to one minute delay. The stream is from FreeNAS on a puny Microserver, so transcoding is not great. Not sure whether the bottleneck is the server or the CC processing the subs. Release is official 4.2.1 iocage plugin. Is this something known fixed in a later release? What should I enable to debug this?

Link to comment
Share on other sites

Hi!

 

I am having this issue when sending to Chromecast 3 (from iOS). The subtitles show up late during playback, after about half to one minute delay. The stream is from FreeNAS on a puny Microserver, so transcoding is not great. Not sure whether the bottleneck is the server or the CC processing the subs. Release is official 4.2.1 iocage plugin. Is this something known fixed in a later release? What should I enable to debug this?

 

Hi there @@scineram can we please look at an example? Please attach the information requested in how to report a media playback issue. Thanks !

Link to comment
Share on other sites

  • 2 weeks later...
scineram

I take it there is no known solution to this issue? An option would be good to delay playback until extraction completes, if indeed that is the bottleneck.

Edited by scineram
  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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