mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
improve hls segmenting
This commit is contained in:
parent
75018055b2
commit
de01c956af
@ -683,7 +683,9 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
// If isEncoding is true we're actually starting ffmpeg
|
// If isEncoding is true we're actually starting ffmpeg
|
||||||
var startNumberParam = isEncoding ? GetStartNumber(state).ToString(UsCulture) : "0";
|
var startNumberParam = isEncoding ? GetStartNumber(state).ToString(UsCulture) : "0";
|
||||||
|
|
||||||
var args = string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -copyts -flags -global_header {5} -hls_time {6} -start_number {7} -hls_list_size {8} -y \"{9}\"",
|
var outputTsArg = Path.Combine(Path.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d.ts";
|
||||||
|
|
||||||
|
var args = string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -copyts -flags -global_header {5} -f segment -segment_time {6} -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
|
||||||
inputModifier,
|
inputModifier,
|
||||||
GetInputArgument(transcodingJobId, state),
|
GetInputArgument(transcodingJobId, state),
|
||||||
threads,
|
threads,
|
||||||
@ -692,8 +694,8 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||||||
GetAudioArguments(state),
|
GetAudioArguments(state),
|
||||||
state.SegmentLength.ToString(UsCulture),
|
state.SegmentLength.ToString(UsCulture),
|
||||||
startNumberParam,
|
startNumberParam,
|
||||||
state.HlsListSize.ToString(UsCulture),
|
outputPath,
|
||||||
outputPath
|
outputTsArg
|
||||||
).Trim();
|
).Trim();
|
||||||
|
|
||||||
return args;
|
return args;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user