mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
Address Bond-009 review comments
This commit is contained in:
parent
ae2b95024f
commit
3743137c31
@ -923,10 +923,10 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var keyFrameArg = string.Format(
|
var keyFrameArg = string.Format(CultureInfo.InvariantCulture,
|
||||||
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
|
" -force_key_frames:0 \"expr:gte(t,{0}+n_forced*{1})\"",
|
||||||
(GetStartNumber(state) * state.SegmentLength).ToString(CultureInfo.InvariantCulture),
|
GetStartNumber(state) * state.SegmentLength,
|
||||||
state.SegmentLength.ToString(CultureInfo.InvariantCulture));
|
state.SegmentLength);
|
||||||
if (state.TargetFramerate.HasValue)
|
if (state.TargetFramerate.HasValue)
|
||||||
{
|
{
|
||||||
// This is to make sure keyframe interval is limited to our segment,
|
// This is to make sure keyframe interval is limited to our segment,
|
||||||
@ -934,9 +934,9 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
// Example: we encoded half of desired length, then codec detected
|
// Example: we encoded half of desired length, then codec detected
|
||||||
// scene cut and inserted a keyframe; next forced keyframe would
|
// scene cut and inserted a keyframe; next forced keyframe would
|
||||||
// be created outside of segment, which breaks seeking.
|
// be created outside of segment, which breaks seeking.
|
||||||
keyFrameArg += string.Format(
|
keyFrameArg += string.Format(CultureInfo.InvariantCulture,
|
||||||
" -g {0} -keyint_min {0}",
|
" -g {0} -keyint_min {0}",
|
||||||
((int)(state.SegmentLength * state.TargetFramerate)).ToString(CultureInfo.InvariantCulture)
|
(int)(state.SegmentLength * state.TargetFramerate)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2168,8 +2168,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
// Important: If this is ever re-enabled, make sure not to use it with wtv because it breaks seeking
|
// Important: If this is ever re-enabled, make sure not to use it with wtv because it breaks seeking
|
||||||
if (!string.Equals(state.InputContainer, "wtv", StringComparison.OrdinalIgnoreCase)
|
if (!string.Equals(state.InputContainer, "wtv", StringComparison.OrdinalIgnoreCase)
|
||||||
&& state.TranscodingType != TranscodingJobType.Progressive
|
&& state.TranscodingType != TranscodingJobType.Progressive
|
||||||
&& !state.EnableBreakOnNonKeyFrames(outputVideoCodec) &&
|
&& !state.EnableBreakOnNonKeyFrames(outputVideoCodec)
|
||||||
(state.BaseRequest.StartTimeTicks ?? 0) > 0)
|
&& (state.BaseRequest.StartTimeTicks ?? 0) > 0)
|
||||||
{
|
{
|
||||||
inputModifier += " -noaccurate_seek";
|
inputModifier += " -noaccurate_seek";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user