Class FilterChain

java.lang.Object
ws.schild.jave.filters.FilterChain
All Implemented Interfaces:
VideoFilter

public class FilterChain extends Object implements VideoFilter
A filterchain as described by FFMPEG Documentation.

A filterchain is a comma separated series of filters.

Author:
mressler
  • Constructor Details

    • FilterChain

      public FilterChain()
      Create an empty filterchain.
    • FilterChain

      public FilterChain(Filter... filters)
      Create a filterchain with the specified filters
      Parameters:
      filters - The ordered list of filters in this chain
  • Method Details

    • addFilter

      public FilterChain addFilter(Filter filter)
      Add one Filter to this filterchain
      Parameters:
      filter - The Filter to add to this chain.
      Returns:
      this FilterChain for builder pattern magic
    • prependFilter

      public FilterChain prependFilter(Filter filter)
    • setInputLabel

      public FilterChain setInputLabel(String label)
      Adds an input label to the first filter in this chain.
      Parameters:
      label - The label to use for the input label for the first filter in this chain
      Returns:
      this FilterChain for builder pattern magic
      Throws:
      IndexOutOfBoundsException - if there are no filters in this chain.
    • setOutputLabel

      public FilterChain setOutputLabel(String label)
      Adds an output label to the first filter in this chain.
      Parameters:
      label - The label to use for the output label for the last filter in this chain
      Returns:
      this FilterChain for builder pattern magic
      Throws:
      IndexOutOfBoundsException - if there are no filters in this chain.
    • 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.