mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-09 17:28:48 +01:00
detect anamorphic video
This commit is contained in:
@@ -1788,7 +1788,8 @@ namespace MediaBrowser.Api.Playback
|
||||
state.TargetVideoLevel,
|
||||
state.TargetFramerate,
|
||||
state.TargetPacketLength,
|
||||
state.TargetTimestamp);
|
||||
state.TargetTimestamp,
|
||||
state.IsTargetAnamorphic);
|
||||
|
||||
if (mediaProfile != null)
|
||||
{
|
||||
@@ -1885,7 +1886,8 @@ namespace MediaBrowser.Api.Playback
|
||||
state.TargetVideoLevel,
|
||||
state.TargetFramerate,
|
||||
state.TargetPacketLength,
|
||||
state.TranscodeSeekInfo
|
||||
state.TranscodeSeekInfo,
|
||||
state.IsTargetAnamorphic
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||
// See if we can save come cpu cycles by avoiding encoding
|
||||
if (codec.Equals("copy", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb" : "-codec:v:0 copy";
|
||||
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb -bsf dump_extra" : "-codec:v:0 copy";
|
||||
}
|
||||
|
||||
var keyFrameArg = state.ReadInputAtNativeFramerate ?
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||
// See if we can save come cpu cycles by avoiding encoding
|
||||
if (codec.Equals("copy", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb" : "-codec:v:0 copy";
|
||||
return IsH264(state.VideoStream) ? "-codec:v:0 copy -bsf h264_mp4toannexb -bsf dump_extra" : "-codec:v:0 copy";
|
||||
}
|
||||
|
||||
var keyFrameArg = state.ReadInputAtNativeFramerate ?
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace MediaBrowser.Api.Playback.Progressive
|
||||
// See if we can save come cpu cycles by avoiding encoding
|
||||
if (codec.Equals("copy", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return state.VideoStream != null && IsH264(state.VideoStream) ? args + " -bsf h264_mp4toannexb" : args;
|
||||
return state.VideoStream != null && IsH264(state.VideoStream) ? args + " -bsf h264_mp4toannexb -bsf dump_extra" : args;
|
||||
}
|
||||
|
||||
const string keyFrameArg = " -force_key_frames expr:if(isnan(prev_forced_t),gte(t,.1),gte(t,prev_forced_t+5))";
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Logging;
|
||||
@@ -330,5 +329,17 @@ namespace MediaBrowser.Api.Playback
|
||||
}
|
||||
}
|
||||
|
||||
public bool? IsTargetAnamorphic
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Request.Static)
|
||||
{
|
||||
return VideoStream == null ? null : VideoStream.IsAnamorphic;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user