Interface FilterComplexContext

Context object for filtergraph generation.

interface FilterComplexContext {
    command: ((f?) => Readonly<CommandBuilderContext>);
    concat: ((videoStreams?, audioStreams?) => ConcatFilterBuilder);
    context: Readonly<FilterComplexContext>;
    fileArgument: ((path) => FileArgument);
    filter: Readonly<FilterMap>;
    from: ((...labels) => ChainNode);
    input: Readonly<IterableStreamLikeArray<Readonly<InputFileStreamMap>>>;
    pipe: ((name?) => Pipe);
    recycle: ((...labels) => void);
    split: ((pipe) => Iterable<Pipe>);
    use: ((filterOrFunc, ...labels) => ChainNode);
}

Properties

command: ((f?) => Readonly<CommandBuilderContext>)

Create a context for building commands.

If f is specified, f will be invoked within the context, and then the context will be returned.

Type declaration

concat: ((videoStreams?, audioStreams?) => ConcatFilterBuilder)

Concatenate video and audio streams, joining them together one after another.

See concat filter for more details.

Type declaration

Returns

A builder for further operations.

context: Readonly<FilterComplexContext>

Access to the context when using destructuring function parameter.

fileArgument: ((path) => FileArgument)

Read argument from a file and pass to the filter.

Type declaration

Returns

The file argument that can be passed to FilterFunction.

filter: Readonly<FilterMap>

Filters.

from: ((...labels) => ChainNode)

Build an empty filter chain.

Type declaration

    • (...labels): ChainNode
    • Parameters

      • Rest ...labels: Pipe[]

        Pipes that will connect to input pads of chain.

      Returns ChainNode

Returns

The start node of the filter chain.

input: Readonly<IterableStreamLikeArray<Readonly<InputFileStreamMap>>>

Input streams.

pipe: ((name?) => Pipe)

Create a pipe.

Type declaration

    • (name?): Pipe
    • Parameters

      • Optional name: string

        Name of pipe. Must be unique.

      Returns Pipe

Returns

The created pipe.

recycle: ((...labels) => void)

Connect pipes to corresponding nullsink filter if their outputs are not connected.

Type declaration

    • (...labels): void
    • Parameters

      • Rest ...labels: (undefined | null | Pipe)[]

        Pipes to be connected. Can be null or undefined.

      Returns void

split: ((pipe) => Iterable<Pipe>)

Connect the specified pipe to corresponding split filter. This allows data to flows into multiple filters.

Type declaration

    • (pipe): Iterable<Pipe>
    • Parameters

      Returns Iterable<Pipe>

Returns

Split pipes.

use: ((filterOrFunc, ...labels) => ChainNode)

Build a filter chain that sourced from the specified filter.

Type declaration

Returns

The start node of the filter chain.