How to use the beamcoder.filterer function in beamcoder

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

github Streampunk / casparcl / scratch / elecular_clunker2.js View on Github external
const enableDeinterlace = true;
  const platformIndex = 1;
  const deviceIndex = 0;
  const context = new addon.clContext({
    platformIndex: platformIndex,
    deviceIndex: deviceIndex,
    overlapping: true
  });
  const platformInfo = await context.getPlatformInfo();
  console.log(platformInfo.vendor, platformInfo.devices[deviceIndex].type);

  let demuxer = await beamcoder.demuxer('../../media/dpp/AS11_DPP_HD_EXAMPLE_1.mxf');
  await demuxer.seek({ time: 40 });
  const stream = demuxer.streams[0];
  let decoder = beamcoder.decoder({ name: stream.codecpar.name });
  let filterer = await beamcoder.filterer({
    filterType: 'video',
    inputParams: [{
      width: stream.codecpar.width,
      height: stream.codecpar.height,
      pixelFormat: stream.codecpar.format,
      timeBase: stream.time_base,
      pixelAspect: stream.codecpar.sample_aspect_ratio
    }],
    outputParams: [{
      pixelFormat: stream.codecpar.format
    }],
    filterSpec: 'yadif=mode=1:parity=-1:deint=0'
  })

	const bgColSpecRead = '709';
  const ovColSpecRead = 'sRGB';

beamcoder

Node.js native bindings to FFmpeg.

GPL-3.0
Latest version published 6 months ago

Package Health Score

65 / 100
Full package analysis

Similar packages