|
|
@ -99,19 +99,28 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase |
|
|
|
currentState = decoder.NextState(currentState); |
|
|
|
currentState = decoder.NextState(currentState); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SetDeinterlace(videoInputFile, context, currentState); |
|
|
|
if (desiredState.VideoFormat != VideoFormat.Copy) |
|
|
|
|
|
|
|
{ |
|
|
|
currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); |
|
|
|
SetDeinterlace(videoInputFile, context, currentState); |
|
|
|
currentState = SetPad(videoInputFile, videoStream, desiredState, currentState); |
|
|
|
|
|
|
|
SetSubtitle(videoInputFile, subtitleInputFile, context, desiredState, fontsFolder, subtitleOverlayFilterSteps); |
|
|
|
currentState = SetScale(videoInputFile, videoStream, desiredState, currentState); |
|
|
|
SetWatermark( |
|
|
|
currentState = SetPad(videoInputFile, videoStream, desiredState, currentState); |
|
|
|
videoStream, |
|
|
|
SetSubtitle( |
|
|
|
watermarkInputFile, |
|
|
|
videoInputFile, |
|
|
|
context, |
|
|
|
subtitleInputFile, |
|
|
|
ffmpegState, |
|
|
|
context, |
|
|
|
desiredState, |
|
|
|
desiredState, |
|
|
|
currentState, |
|
|
|
fontsFolder, |
|
|
|
watermarkOverlayFilterSteps); |
|
|
|
subtitleOverlayFilterSteps); |
|
|
|
|
|
|
|
SetWatermark( |
|
|
|
|
|
|
|
videoStream, |
|
|
|
|
|
|
|
watermarkInputFile, |
|
|
|
|
|
|
|
context, |
|
|
|
|
|
|
|
ffmpegState, |
|
|
|
|
|
|
|
desiredState, |
|
|
|
|
|
|
|
currentState, |
|
|
|
|
|
|
|
watermarkOverlayFilterSteps); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// after everything else is done, apply the encoder
|
|
|
|
// after everything else is done, apply the encoder
|
|
|
|
if (pipelineSteps.OfType<IEncoder>().All(e => e.Kind != StreamKind.Video)) |
|
|
|
if (pipelineSteps.OfType<IEncoder>().All(e => e.Kind != StreamKind.Video)) |
|
|
@ -123,6 +132,12 @@ public class SoftwarePipelineBuilder : PipelineBuilderBase |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// after decoder/encoder, return hls direct
|
|
|
|
|
|
|
|
if (desiredState.VideoFormat == VideoFormat.Copy) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return FilterChain.Empty; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<IPipelineFilterStep> pixelFormatFilterSteps = SetPixelFormat( |
|
|
|
List<IPipelineFilterStep> pixelFormatFilterSteps = SetPixelFormat( |
|
|
|
videoStream, |
|
|
|
videoStream, |
|
|
|
desiredState.PixelFormat, |
|
|
|
desiredState.PixelFormat, |
|
|
|