Class FilterGraph

java.lang.Object
ws.schild.jave.filters.FilterGraph
All Implemented Interfaces:
VideoFilter
Direct Known Subclasses:
FilterAndWatermark, OverlayWatermark

public class FilterGraph extends Object implements VideoFilter
A filtergraph as described by FFMPEG Documentation.

A filtergraph can optionally start with sws_flags for scaling of outputs and is then composed of a semi-colon separated series of filterchains.

Author:
mressler
  • Constructor Details

    • FilterGraph

      public FilterGraph()
      Create an empty filtergraph.
    • FilterGraph

      public FilterGraph(FilterChain... chains)
      Create a filtergraph with a specified list of filterchains.
      Parameters:
      chains - The list of filterchains to be used in this filtergraph.
    • FilterGraph

      public FilterGraph(String swsFlags, FilterChain... chains)
      Create a filtergraph with a specified list of filterchains and specified sws_flags.
      Parameters:
      chains - The list of filterchains to be used in this filtergraph.
      swsFlags - The sws_flags parameter to pass to libavfilter scale filters.
  • Method Details

    • addChain

      public FilterGraph addChain(FilterChain chain)
      Add a filterchain to this filtergraph.
      Parameters:
      chain - The filterchain to add to this filtergraph.
      Returns:
      this FilterGraph for builder pattern magic
    • setSwsFlags

      public FilterGraph setSwsFlags(String swsFlags)
      set the sws_flags to pass to libavfilter scale filters.
      Parameters:
      swsFlags - The flags that will; be passed to libavfilter scale filters.
      Returns:
      this FilterGraph for builder pattern magic
    • getExpression

      public String getExpression()
      Description copied from interface: VideoFilter
      The expression to be used in the video filter argument to ffmpeg
      Specified by:
      getExpression in interface VideoFilter
      Returns:
      A string that will be placed in the -vf or -filter_complex option to ffmpeg.