@remotion/video-matting 4.0.523
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/can-use-video-matting.d.ts +18 -0
- package/dist/create-video-layer-output.d.ts +14 -0
- package/dist/esm/index.mjs +1675 -0
- package/dist/index.d.ts +14 -0
- package/dist/is-video-matting-model-cached.d.ts +5 -0
- package/dist/load-video-matting-model.d.ts +35 -0
- package/dist/models.d.ts +17 -0
- package/dist/output-target.d.ts +13 -0
- package/dist/prepare-audio.d.ts +28 -0
- package/dist/remove-video-matting-model.d.ts +5 -0
- package/dist/separate-video-layers.d.ts +43 -0
- package/dist/video-matting-canvas.d.ts +22 -0
- package/dist/video-matting-quality.d.ts +5 -0
- package/dist/video-timing.d.ts +22 -0
- package/dist/web-fs-target.d.ts +8 -0
- package/dist/with-remotion-model-host.d.ts +10 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @remotion/video-matting
|
|
2
|
+
|
|
3
|
+
Separate a video into a base layer and transparent foreground in the browser
|
|
4
|
+
|
|
5
|
+
[](https://npmcharts.com/compare/@remotion/video-matting?minimal=true)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @remotion/video-matting --save-exact
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
When installing a Remotion package, make sure to align the version of all `remotion` and `@remotion/*` packages to the same version.
|
|
14
|
+
Remove the `^` character from the version number to use the exact version.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
See the [documentation](https://www.remotion.dev/docs/video-matting) for more information.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type VideoMattingModel } from './models';
|
|
2
|
+
export declare enum VideoMattingUnsupportedReason {
|
|
3
|
+
WindowUndefined = "window-undefined",
|
|
4
|
+
WebGpuUnavailable = "webgpu-unavailable",
|
|
5
|
+
WebGpuRequiresSecureContext = "webgpu-requires-secure-context",
|
|
6
|
+
ShaderF16Unavailable = "shader-f16-unavailable"
|
|
7
|
+
}
|
|
8
|
+
export type CanUseVideoMattingResult = {
|
|
9
|
+
supported: true;
|
|
10
|
+
} | {
|
|
11
|
+
supported: false;
|
|
12
|
+
reason: VideoMattingUnsupportedReason;
|
|
13
|
+
detailedReason: string;
|
|
14
|
+
};
|
|
15
|
+
export type CanUseVideoMattingOptions = {
|
|
16
|
+
model?: VideoMattingModel;
|
|
17
|
+
};
|
|
18
|
+
export declare const canUseVideoMatting: ({ model, }?: CanUseVideoMattingOptions) => Promise<CanUseVideoMattingResult>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BufferTarget, Output, StreamTarget, type OutputFormat } from 'mediabunny';
|
|
2
|
+
import type { VideoLayerOutput, VideoLayerOutputOptions } from './output-target';
|
|
3
|
+
type VideoLayerMediabunnyTarget = BufferTarget | StreamTarget;
|
|
4
|
+
export type CreatedVideoLayerOutput<F extends OutputFormat> = {
|
|
5
|
+
output: Output<F, VideoLayerMediabunnyTarget>;
|
|
6
|
+
finalize: () => Promise<VideoLayerOutput>;
|
|
7
|
+
cancel: () => Promise<void>;
|
|
8
|
+
discard: () => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export declare const createVideoLayerOutput: <F extends OutputFormat>({ format, options, }: {
|
|
11
|
+
format: F;
|
|
12
|
+
options: VideoLayerOutputOptions | undefined;
|
|
13
|
+
}) => Promise<CreatedVideoLayerOutput<F>>;
|
|
14
|
+
export {};
|