mediaforge - v2.2.0
    Preparing search index...

    The main filter_complex graph builder.

    const g = new FilterGraph();

    // Scale the main video
    const [v] = g.from('[0:v]').scale(1280, 720).out('scaled');

    // Prepare audio: normalize + fade in
    const [a] = g.from('[0:a]').loudnorm(23, 7, -2).out('audio');

    // Build final filter_complex string
    console.log(g.toString());
    // → "[0:v]scale=1280:720[scaled];[0:a]loudnorm=i=23:lra=7:tp=-2[audio]"
    Index

    Accessors

    Constructors

    Methods

    Accessors

    Constructors

    Methods

    • Start building a filter chain from one or more input stream refs.

      An array is spread, so the result of a previous out(...) can be passed straight back in: g.from(...g.from('0:v').split(2).out('a', 'b')).

      Parameters

      Returns GraphNode

      g.from('[0:v]')   // from input 0 video
      
      g.from('[logo]')  // from a previously labeled stream
      
    • Serialize the complete filter_complex string (semicolon-separated links). Throws if any nodes have not been committed.

      Returns string