How to use the fluent-ffmpeg.prototype function in fluent-ffmpeg

To help you get started, we’ve selected a few fluent-ffmpeg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github streamplace / streamplace / apps / pipeland / src / classes / MagicFilters.js View on Github external
* filtergraphs.
 */

// ["0:v", m.scale({w: 1920, h: 1080})]
//
//

import _ from "underscore";
import fluent from "fluent-ffmpeg";

import filterList from "../filterlist";

// Look ma! It's the Symbol API!
const isFilterNode = Symbol("isFilterNode");

fluent.prototype.magic = function(...args) {
  if (!this._magicFilters) {
    this._filterIdx = 0;
    this.filterLabels = {};
    this._magicFilters = [];
    this._origRun = this.run;
    this.run = function(...args) {
      this.outputOptions([
        "-filter_complex",
        this._magicFilters.join(";"),
      ]);
      return this._origRun.call(this, ...args);
    };
  }
  const inputs = [];
  let doneWithInputs = false;
github zhen-ke / ffmpegGUI / src / utils / core.js View on Github external
return new Promise((resolve, reject) => {
      ffmpeg.prototype._spawnFfmpeg(
        ["-hwaccels"],
        { captureStdout: true, stdoutLines: 0 },
        (err, stdoutRing) => {
          if (err) {
            reject(err);
          }
          let stdout = stdoutRing.get();
          let lines = [
            ...new Set(
              stdout
                .replace("Hardware acceleration methods:", "")
                .replace(/\n/g, " ")
                .trim()
                .split(" ")
            )
          ];