Jump to content


Photo

ASS subtitle not showing - playback issue

debian chromecast ass subtitle

  • Please log in to reply
13 replies to this topic

#1 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 11 March 2019 - 09:40 AM

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.

 

 

 



#2 laxus OFFLINE  

laxus

    Member

  • Members
  • 12 posts
  • Local time: 04:22 PM

Posted 11 March 2019 - 01:26 PM

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



#3 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 15 March 2019 - 09:05 AM

@Luke any toughts about this?



#4 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139873 posts
  • Local time: 10:22 AM

Posted 16 March 2019 - 09:08 PM

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


#5 laxus OFFLINE  

laxus

    Member

  • Members
  • 12 posts
  • Local time: 04:22 PM

Posted 16 March 2019 - 11:18 PM

 

@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

Attached Files



#6 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 17 March 2019 - 05:41 AM

 

@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 ?



#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139873 posts
  • Local time: 10:22 AM

Posted 19 March 2019 - 12:05 AM

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



#8 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139873 posts
  • Local time: 10:22 AM

Posted 19 March 2019 - 12:06 AM

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.



#9 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 19 March 2019 - 08:18 AM

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



#10 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1855 posts
  • Local time: 04:22 PM

Posted 21 March 2019 - 11:14 AM

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



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139873 posts
  • Local time: 10:22 AM

Posted 24 March 2019 - 12:32 PM

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.


  • shr3ps likes this

#12 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 24 March 2019 - 12:52 PM

I confirm it's much better in web browser, but still issues with Chromecast.

#13 shr3ps OFFLINE  

shr3ps

    Newbie

  • Members
  • 6 posts
  • Local time: 05:22 PM

Posted 26 March 2019 - 02:07 PM

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?



#14 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139873 posts
  • Local time: 10:22 AM

Posted 26 March 2019 - 04:06 PM

 

 

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







Also tagged with one or more of these keywords: debian, chromecast, ass, subtitle

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users