mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
fixes #1481 - Transcoding of sub/idx not working
This commit is contained in:
parent
55d556863c
commit
47eb22e25e
@ -865,6 +865,15 @@ namespace MediaBrowser.Api.Playback
|
|||||||
{
|
{
|
||||||
if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
||||||
{
|
{
|
||||||
|
if (state.VideoStream != null && state.VideoStream.Width.HasValue)
|
||||||
|
{
|
||||||
|
// This is hacky but not sure how to get the exact subtitle resolution
|
||||||
|
double height = state.VideoStream.Width.Value;
|
||||||
|
height /= 16;
|
||||||
|
height *= 9;
|
||||||
|
|
||||||
|
arg += string.Format(" -canvas_size {0}:{1}", state.VideoStream.Width.Value.ToString(CultureInfo.InvariantCulture), Convert.ToInt32(height).ToString(CultureInfo.InvariantCulture));
|
||||||
|
}
|
||||||
arg += " -i \"" + state.SubtitleStream.Path + "\"";
|
arg += " -i \"" + state.SubtitleStream.Path + "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -460,6 +460,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
{
|
{
|
||||||
if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream)
|
||||||
{
|
{
|
||||||
|
if (state.VideoStream != null && state.VideoStream.Width.HasValue)
|
||||||
|
{
|
||||||
|
// This is hacky but not sure how to get the exact subtitle resolution
|
||||||
|
double height = state.VideoStream.Width.Value;
|
||||||
|
height /= 16;
|
||||||
|
height *= 9;
|
||||||
|
|
||||||
|
arg += string.Format(" -canvas_size {0}:{1}", state.VideoStream.Width.Value.ToString(CultureInfo.InvariantCulture), Convert.ToInt32(height).ToString(CultureInfo.InvariantCulture));
|
||||||
|
}
|
||||||
arg += " -i \"" + state.SubtitleStream.Path + "\"";
|
arg += " -i \"" + state.SubtitleStream.Path + "\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user