mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-21 07:00:30 +01:00
add more to mbt endpoints
This commit is contained in:
@@ -282,6 +282,14 @@ namespace MediaBrowser.Api.Playback
|
||||
string.Format(" -vf \"scale={0}:-1{1}\"", request.Width.Value, assSubtitleParam);
|
||||
}
|
||||
|
||||
// If a fixed height was requested
|
||||
if (request.Height.HasValue)
|
||||
{
|
||||
return isH264Output ?
|
||||
string.Format(" -vf \"scale={0}:trunc(oh/a/2)*2{1}\"", request.Height.Value, assSubtitleParam) :
|
||||
string.Format(" -vf \"scale=-1{1}:{0}\"", request.Height.Value, assSubtitleParam);
|
||||
}
|
||||
|
||||
// If a max width was requested
|
||||
if (request.MaxWidth.HasValue && (!request.MaxHeight.HasValue || state.VideoStream == null))
|
||||
{
|
||||
@@ -290,6 +298,14 @@ namespace MediaBrowser.Api.Playback
|
||||
string.Format(" -vf \"scale=min(iw\\,{0}):-1{1}\"", request.MaxWidth.Value, assSubtitleParam);
|
||||
}
|
||||
|
||||
// If a max height was requested
|
||||
if (request.MaxHeight.HasValue && (!request.MaxWidth.HasValue || state.VideoStream == null))
|
||||
{
|
||||
return isH264Output ?
|
||||
string.Format(" -vf \"scale=min(ih\\,{0}):trunc(oh/a/2)*2{1}\"", request.MaxHeight.Value, assSubtitleParam) :
|
||||
string.Format(" -vf \"scale=min(ih\\,{0}):-1{1}\"", request.MaxHeight.Value, assSubtitleParam);
|
||||
}
|
||||
|
||||
if (state.VideoStream == null)
|
||||
{
|
||||
// No way to figure this out
|
||||
|
||||
Reference in New Issue
Block a user