Jump to content

Unable to extract subtitles for some films


nanuk

Recommended Posts

Hi,

since a few months Dolby Vision (single layer) is possible in mkv files.

Since the new Version of Emby Server (4.5.2.0) the forced srt Subtitles are no longer shown when playing these mkv files.

I restored to Emby Version 4.4.3.0 and here the forced srt subs are displayed correctly.

It doesn't seem to be a general problem with srt forces subs as other 4k Remuxes (HDR only) are working correctly in Version 4.4.3.0 AND 4.5.2.0

And it seems to be a problem only for LG TVs (I own 3 of them and the behavior is the same on all 3 (different web os versions and models))

With my FireTV Stick the forced srt subs in Dolby Vision mkv files are playing without any problem.

So... to make a long story short here's my summary: 🙂
No forced srt subs shown on LG TV's when playing 4K UHDBD Remux-mkv files with dolby vision layer having Emby 4.5.2.0 installed 😕

I know this one is very specific 😕 Any Idea?

Let me know if I can help with some more details 😉

Link to comment
Share on other sites

Hi,

i attached the complete server log and a mediainfo.txt of the file 😉

I made a server restart to geht a clean log and than simply started to movie.

The created file in the cache directory only contains one line (WEBVTT) so it's clear why no subtitles are displayed.

The question is now why this files is empty 🙂

Emby LG Smart TV Version 1.0.24

Emby Server Version 4.5.2.0 (as already described with Emby Server Version 4.4.3.0 the problem doesn't exist... this one is working well)

 

screen.png

embyserver.txt MediaInfo.txt

Edited by nanuk
Link to comment
Share on other sites

Hi Luke,

I think I found the reason and a solution for this strange problem and maybe this can also be seen as a bug in emby.

First of all the solution was to clear the subtitle cache 😉

And here is what happend:

When starting an 4K UHD Remux File with selected srt subs an ffmpeg process (SubtitleEncoder: ProcessRun 'ffmpeg-subtitle_extract') 
is being startet to extract the subs from the file and locate them in the subtitle cache as *.vtt.
Because of the huge filesize of 4K Remuxes this process takes up to 8 minutes before it's completed.
Stopping the movie while the subtitleencoder process is running leads to an crash of the ffmpeg process (Error SubtitleEncoder: Error running ffmpeg-subtitle_extract -i)

So far so good 😉 But the main Problem is that the empty file in the subtitle cache (.vtt) , created by SubtitleEncoder process is not being removed and stays empty in the cache.
When starting the same movie again, this file is found and no more SubtitleEncoder processes are being created 😞
So the movie plays and because the vtt file in the cache is empty and no new one is being created, Emby shows no subtitles at all.

Possible solution:
Maybe it's possible for emby server to check if an ffmpeg process (SubtitleEncoder) is aborted and if so, the corresponding file in the subtilte cache should be deleted.

I hope you can understand what I wanted to say 😉

For further questions please do not hesitate to contact me.

Edited by nanuk
Link to comment
Share on other sites

  • 2 weeks later...
crusher11

Is this an issue playing an SRT file that's been muxed into an MKV? I've found the same thing, I had to extract the SRT and store it as an external file to get the subs to play. 

Link to comment
Share on other sites

12 hours ago, crusher11 said:

Is this an issue playing an SRT file that's been muxed into an MKV? I've found the same thing, I had to extract the SRT and store it as an external file to get the subs to play. 

Yes, but it works... the srt inside the mkv will be demuxed by ffmpeg and stored in the subtitle cache of emby.
The only problem is what I described in my post from November 4th.

I think this is a bug of emby... maybe it will get fixed in an upcoming release

Link to comment
Share on other sites

On 11/14/2020 at 4:31 PM, nanuk said:

Yes, but it works... the srt inside the mkv will be demuxed by ffmpeg and stored in the subtitle cache of emby.
The only problem is what I described in my post from November 4th.

I think this is a bug of emby... maybe it will get fixed in an upcoming release

This will be resolved for the next release. Thanks.

Link to comment
Share on other sites

15 minutes ago, crusher11 said:

I just tested an SRT subtitle muxed into a 1080p SDR movie, and those subs didn't work either. 

Those work just fine.

 

Link to comment
Share on other sites

17 minutes ago, crusher11 said:

I just tested an SRT subtitle muxed into a 1080p SDR movie, and those subs didn't work either. 

Hi crusher11,

try the following steps:

- shutdown emby server

- clear emby subtitle cache

- restart emby server

- start playing a mkv file with embedded srt subs

- while playing search the emby server log for the following entry: "Info SubtitleEncoder: ProcessRun 'ffmpeg-subtitle_extract' Execute: "

- when you see this entry inside the logfile, then the srt subs are being demuxed by ffmepg and stored in the subtitle cache. this can take quite a while, depending on the size of the mkv file you are watching (an  UHD HDR Remux takes up to 8 minutes before it's done).

- wait and continue watching the movie until you get the follwoing message in your emby server log:
"Info SubtitleEncoder: ProcessRun 'ffmpeg-subtitle_extract' Process exited with code 0" followed by
"Info SubtitleEncoder: ffmpeg subtitle extraction completed for file:"AAAAA" to "BBBBB"
while AAAAA stands for the mkv file you've been watching and BBBBB is the path and filename to the extracted srt inside the subtitle cache.

hope this will help you 😉

@Luke Please correct me if I wrote something wrong 😉

Edited by nanuk
Link to comment
Share on other sites

crusher11

How can it take a while to mux, if the movie starts playing instantly? Doesn't that mean that there would be no subtitles until the mux is done?

 

Link to comment
Share on other sites

Yes, thats exaclty the point.

You will get subtitles only after demuxing to a VTT File in the Subtitle Cache is done, or your device needs no subtitle extraction.
My LG TVs need it otherwise the srt subs are not shown.

That means after the message "Info SubtitleEncoder: ffmpeg subtitle extraction completed" the subs are staying in the subtitle cache so that when you are watching the movie for the second time, no more extraction is needed.

And 1080p files should work within a minute or so...

the problem of emby that will be resolved is a completely different...
when you start a movie and stop it a few seconds later, then an empty VTT file is already being generated in the subtitle cache.
Stop watching the movie makes the extraction process stop but the empty file is remaining and when you start the same movie again, emby thinks (because of the existing empty file) that the extraction has already been done successfully and so emby does not start another try (ffmpeg-subtitle_extract
' Execute)

@Luke again correct me if I'm wrong

Edited by nanuk
Link to comment
Share on other sites

crusher11

That can't be right, though, because that means if I select embedded subtitles and watch the movie, no subtitles displaying is the correct behaviour (because they haven't been extracted yet). That makes no sense.

 

Link to comment
Share on other sites

2 hours ago, crusher11 said:

That can't be right, though, because that means if I select embedded subtitles and watch the movie, no subtitles displaying is the correct behaviour (because they haven't been extracted yet). That makes no sense.

 

In the most movies you will not realize what's happening in Background because the extraction works within a minute or so I think. The problem only exists with large files (like UHD Remuxes from UHD BDs) actually this takes more time... but I'm no Emby developer and all I wrote was what I found out by analysing the server logs and subtitle cache.
maybe @Luke or another Emby developer my clear this 😉

Edited by nanuk
Link to comment
Share on other sites

If the extraction isn't quick enough in your environment there is a server transcoding option to disable it.

Link to comment
Share on other sites

crusher11

What's the trigger for the extraction of the subtitles? Is it when the file starts playing or when I press play? IE, if I have Cinema Intros on, and trailers set to play, will the extraction happen while the trailers play or will it not start until the movie itself does? 

Also is there a way to run an extraction for all the movies with a SUBRIP track as a scheduled task or something like that? 

Link to comment
Share on other sites

44 minutes ago, crusher11 said:

What's the trigger for the extraction of the subtitles? Is it when the file starts playing or when I press play? IE, if I have Cinema Intros on, and trailers set to play, will the extraction happen while the trailers play or will it not start until the movie itself does? 

Also is there a way to run an extraction for all the movies with a SUBRIP track as a scheduled task or something like that? 

When the video starts playing and the subtitles are enabled. No there is no option to do it ahead of time.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...