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