mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-11 11:24:02 +00:00
update hls subtitles
This commit is contained in:
parent
a8296cba37
commit
9b8f85ea81
9 changed files with 31 additions and 26 deletions
|
|
@ -20,6 +20,7 @@ using System.Text;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommonIO;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
|
||||
namespace MediaBrowser.MediaEncoding.Encoder
|
||||
{
|
||||
|
|
@ -456,7 +457,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
var arg = string.Format("-i {0}", GetInputPathArgument(state));
|
||||
|
||||
if (state.SubtitleStream != null)
|
||||
if (state.SubtitleStream != null && state.Options.SubtitleMethod == SubtitleDeliveryMethod.Encode)
|
||||
{
|
||||
if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
||||
{
|
||||
|
|
@ -826,7 +827,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
args += " -map -0:a";
|
||||
}
|
||||
|
||||
if (state.SubtitleStream == null)
|
||||
if (state.SubtitleStream == null || state.Options.SubtitleMethod == SubtitleDeliveryMethod.Hls)
|
||||
{
|
||||
args += " -map -0:s";
|
||||
}
|
||||
|
|
@ -933,7 +934,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
var output = string.Empty;
|
||||
|
||||
if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream)
|
||||
if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.Options.SubtitleMethod == SubtitleDeliveryMethod.Encode)
|
||||
{
|
||||
var subParam = GetTextSubtitleParam(state);
|
||||
|
||||
|
|
@ -1018,7 +1019,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
var pts = string.Empty;
|
||||
|
||||
if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream)
|
||||
if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.Options.SubtitleMethod == SubtitleDeliveryMethod.Encode && !state.Options.CopyTimestamps)
|
||||
{
|
||||
var seconds = TimeSpan.FromTicks(state.Options.StartTimeTicks ?? 0).TotalSeconds;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue