Jump to content

Convert fails on subtitles always


Recommended Posts

Posted

Trying to convert some movies it fails always on subtitles extraction due to a timeout exception. Despite the failing, the other bad part is that you don't have an option to disable subtitle extraction, nor to understand what's failing.

2019-04-28 09.36.51.061 Error SubtitleEncoder: Error running ffmpeg-subtitle_extract -i file:"E:\Share\Film\test (2018)\test.mkv" -map 0:4 -an -vn "C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server\cache\subtitles\d\d56a3cd3ef3900e593aeabef0fd3a53f_636919671448496400_4_0_0_False.vtt"
	*** Error Report ***
	Version: 4.1.0.26
	Command line: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server\system\EmbyServer.dll -service
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///C:/Users/administrator.VALINOR/AppData/Roaming/MediaBrowser-Server/system/System.Private.CoreLib.dll
	Processor count: 2
	Program data path: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server
	Application directory: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server\system
	System.TimeoutException: System.TimeoutException: Operation timed out after 300.000ms
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.ExtractTextSubtitleInternal(String inputPath, String inputSubtitleCodec, Int32 subtitleStreamIndex, String outputCodec, String outputPath, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()
	
2019-04-28 09.36.51.114 Error TaskManager: Error
	*** Error Report ***
	Version: 4.1.0.26
	Command line: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server\system\EmbyServer.dll -service
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///C:/Users/administrator.VALINOR/AppData/Roaming/MediaBrowser-Server/system/System.Private.CoreLib.dll
	Processor count: 2
	Program data path: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server
	Application directory: C:\Users\administrator.VALINOR\AppData\Roaming\MediaBrowser-Server\system
	System.TimeoutException: System.TimeoutException: Operation timed out after 300.000ms
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.ExtractTextSubtitleInternal(String inputPath, String inputSubtitleCodec, Int32 subtitleStreamIndex, String outputCodec, String outputPath, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.ExtractTextSubtitle(String inputPath, String inputSubtitleCodec, MediaProtocol protocol, Int32 subtitleStreamIndex, String outputCodec, String outputPath, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.GetReadableFile(String mediaPath, MediaProtocol mediaSourceProtocol, MediaStream subtitleStream, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
	   at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.GetSubtitles(BaseItem item, String mediaSourceId, Int32 subtitleStreamIndex, String outputFormat, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.ConvertSubtitles(BaseItem item, String temporaryPath, StreamInfo streamInfo, SubtitleStreamInfo subtitleStreamInfo, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.ConvertSubtitles(BaseItem item, SyncJobItem jobItem, List`1 subtitles, StreamInfo streamInfo, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.SyncVideo(SyncJobItem jobItem, Video item, User user, Boolean enableConversion, SyncOptions syncOptions, ISyncProvider provider, IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.ProcessJobItem(SyncJobItem jobItem, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.SyncJobItems(SyncJobItem[] items, Boolean enableConversion, IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncJobProcessor.Sync(IProgress`1 progress, CancellationToken cancellationToken)
	   at Emby.Server.Sync.SyncConvertScheduledTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
	Source: Emby.Server.MediaEncoding
	TargetSite: Void MoveNext()
Posted

hi @@eTomm, thanks, we'll take a look at this.

  • 1 year later...
Posted

Hi Luke,
is it possible to increase the time-out for subtitle_extract to more then 600.000ms?
Some huge 4K Remuxes take longer then 600.000ms to extract the subs 😉

I think 900.000ms should be enough time to do even really huge movie files.
Is there a possibility to adjust the timeout by myself? Some configfile? 

See log below: 

2021-03-02 20:43:42.568 Error SubtitleEncoder: Error running ffmpeg-subtitle_extract -i file:"X:\Der Herr der Ringe - Die Gefaehrten.mkv" -map 0:4 -an -vn "C:\Program Files\Emby\programdata\cache\subtitles\1\13c444171a5fbf30bed908dbab23d49e_637424464688760754_4_0_0_False.vtt"
    *** Error Report ***
    Version: 4.5.4.0
    Command line: C:\Program Files\Emby\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.18363
    Framework: .NET Core 3.1.9
    OS/Process: x64/x64
    Runtime: C:/Program Files/Emby/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: C:\Program Files\Emby\programdata
    Application path: C:\Program Files\Emby\system
    System.TimeoutException: System.TimeoutException: Operation timed out after 600.000ms
       at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.ExtractTextSubtitleInternal(String inputPath, String inputSubtitleCodec, Int32 subtitleStreamIndex, String outputCodec, String outputPath, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
    Source: Emby.Server.MediaEncoding
    TargetSite: Void MoveNext()

Posted
21 hours ago, nanuk said:

Hi Luke,
is it possible to increase the time-out for subtitle_extract to more then 600.000ms?
Some huge 4K Remuxes take longer then 600.000ms to extract the subs 😉

I think 900.000ms should be enough time to do even really huge movie files.
Is there a possibility to adjust the timeout by myself? Some configfile? 

See log below: 

2021-03-02 20:43:42.568 Error SubtitleEncoder: Error running ffmpeg-subtitle_extract -i file:"X:\Der Herr der Ringe - Die Gefaehrten.mkv" -map 0:4 -an -vn "C:\Program Files\Emby\programdata\cache\subtitles\1\13c444171a5fbf30bed908dbab23d49e_637424464688760754_4_0_0_False.vtt"
    *** Error Report ***
    Version: 4.5.4.0
    Command line: C:\Program Files\Emby\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.18363
    Framework: .NET Core 3.1.9
    OS/Process: x64/x64
    Runtime: C:/Program Files/Emby/system/System.Private.CoreLib.dll
    Processor count: 4
    Data path: C:\Program Files\Emby\programdata
    Application path: C:\Program Files\Emby\system
    System.TimeoutException: System.TimeoutException: Operation timed out after 600.000ms
       at Emby.Server.MediaEncoding.Subtitles.SubtitleEncoder.ExtractTextSubtitleInternal(String inputPath, String inputSubtitleCodec, Int32 subtitleStreamIndex, String outputCodec, String outputPath, Int64 startTimeTicks, Int64 endTimeTicks, Boolean preserveOriginalTimestamps, CancellationToken cancellationToken)
    Source: Emby.Server.MediaEncoding
    TargetSite: Void MoveNext()

Is this for playback or the convert feature?

Posted

Hi Luke,

it's during Playback...
as already described here 

the subtitle extraction during playback takes a lot of time when playing 4K remuxes... and on some (real huge) remuxes (like for example Lord of the Rings)  it takes too long so that an timeout occures.

 

Posted
35 minutes ago, nanuk said:

Hi Luke,

it's during Playback...
as already described here 

the subtitle extraction during playback takes a lot of time when playing 4K remuxes... and on some (real huge) remuxes (like for example Lord of the Rings)  it takes too long so that an timeout occures.

 

If anything for playback it should be shorter. Are you really going to wait 10 minutes for subtitles to show up? Most users are going to bail and say "not working". That's why we have the option to disable it altogether in server transcoding settings.

Posted
13 minutes ago, Luke said:

If anything for playback it should be shorter. Are you really going to wait 10 minutes for subtitles to show up? Most users are going to bail and say "not working". That's why we have the option to disable it altogether in server transcoding settings.

Hi Luke,
yes I'm really waiting 🙂
I know it can take a long time on 4K remuxes to extract the srt Subtitles. but that's ok for me. But the problem on the huge 4K remuxes is that the subtiles extraction never finishes because of the timeout (look at log I posted) 🙂

The question is if it is possible to increase the time period before the timeout happens (for now 600.000ms -> 10 minutes).

 

Posted
Just now, nanuk said:

Hi Luke,
yes I'm really waiting 🙂
I know it can take a long time on 4K remuxes to extract the srt Subtitles. but that's ok for me. But the problem on the huge 4K remuxes is that the subtiles extraction never finishes because of the timeout (look at log I posted) 🙂

The question is if it is possible to increase the time period before the timeout happens (for now 600.000ms -> 10 minutes).

 

Why not just disable it and burn them in?

Posted

Is this possible without reencoding the video?

Posted
7 minutes ago, nanuk said:

Is this possible without reencoding the video?

No, that's how burning them in is accomplished.

Posted (edited)

then is is not an option 😕

reencoding disables HDR playback as far as i know

 

Edited by nanuk
Neminem
Posted

Look at the text.

Allow subtitle extraction on the fly

Embedded subtitles can be extracted from videos and delivered to Emby apps in plain text in order to help prevent video transcoding. On some systems this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.
Posted

For playback, external srt will always be the most efficient option.

Posted
9 minutes ago, Luke said:

For playback, external srt will always be the most efficient option.

Ok, thats clear but back to my initial question, is it possible to set the timeout 5 mins later, after 15 min. for example?

Posted
1 hour ago, nanuk said:

Ok, thats clear but back to my initial question, is it possible to set the timeout 5 mins later, after 15 min. for example?

It's not currently possible and the presence of such an option I think would set a false impression that it's actually supposed to work. Some players on some devices will just fail the entire video playback if the subtitle url stalls for too long.

Posted
22 minutes ago, Luke said:

It's not currently possible and the presence of such an option I think would set a false impression that it's actually supposed to work. Some players on some devices will just fail the entire video playback if the subtitle url stalls for too long.

Seems the solution to this is a task that takes care of extracting the subtitles when the movie is just added to emby and that can run scheduled in the night. 

Posted
13 hours ago, eTomm said:

Seems the solution to this is a task that takes care of extracting the subtitles when the movie is just added to emby and that can run scheduled in the night. 

I don't think that's the solution, because the timeout comes from ffmpeg so wether the subs are being extracted while the movie is playing nor while this is done by a schedlued job will make a difference to the timeout issue

Posted
19 minutes ago, nanuk said:

I don't think that's the solution, because the timeout comes from ffmpeg so wether the subs are being extracted while the movie is playing nor while this is done by a schedlued job will make a difference to the timeout issue

From my understanding it is a limitation of the way stream players works, not of ffmpeg.

So a task that eventually extracts the subtitles (and converts them to srt if needed) would be enough. 

Posted

There is a program to do that and would require some form of OCR...

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