Class FilterChain

  • All Implemented Interfaces:
    VideoFilter

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

    A filterchain is a comma separated series of filters.

    • Field Detail

      • filters

        private final java.util.List<Filter> filters
    • Constructor Detail

      • 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 Detail

      • 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
      • setInputLabel

        public FilterChain setInputLabel​(java.lang.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:
        java.lang.IndexOutOfBoundsException - if there are no filters in this chain.
      • setOutputLabel

        public FilterChain setOutputLabel​(java.lang.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:
        java.lang.IndexOutOfBoundsException - if there are no filters in this chain.
      • getExpression

        public java.lang.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.