diff options
| author | abeloin <alexandre.beloin@gmail.com> | 2014-01-25 15:27:31 -0500 |
|---|---|---|
| committer | abeloin <alexandre.beloin@gmail.com> | 2014-01-25 15:27:31 -0500 |
| commit | 41f7e2ab19b723a32865b868ffe489dbd36065e8 (patch) | |
| tree | 9599ba8e29a83161a04720786a8872db63757cc0 /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | d0485685de264fb0eb8cdbe16fce75eeee557581 (diff) | |
Don't re-encode subtitle: ass/ssa -> ass.
This fix Issue #630 : "ASS encoder supports only one ASS rectangle field".
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 76cce0d66..67f06c792 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -536,7 +536,11 @@ namespace MediaBrowser.Api.Playback Directory.CreateDirectory(parentPath); - var task = MediaEncoder.ExtractTextSubtitle(inputPath, type, state.SubtitleStream.Index, path, CancellationToken.None); + // Don't re-encode ass/ssa to ass because ffmpeg ass encoder fails if there's more than one ass rectangle. Affect Anime mostly. + // See https://lists.ffmpeg.org/pipermail/ffmpeg-cvslog/2013-April/063616.html + bool isAssSubtitle = string.Equals(state.SubtitleStream.Codec, "ass", StringComparison.OrdinalIgnoreCase) || string.Equals(state.SubtitleStream.Codec, "ssa", StringComparison.OrdinalIgnoreCase); + + var task = MediaEncoder.ExtractTextSubtitle(inputPath, type, state.SubtitleStream.Index, isAssSubtitle, path, CancellationToken.None); Task.WaitAll(task); } |
