@remotion/video-matting 4.0.527 → 4.0.529

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.
@@ -1,3 +1,4 @@
1
+ import './symbol-async-dispose';
1
2
  import { BufferTarget, Output, StreamTarget, type OutputFormat } from 'mediabunny';
2
3
  import type { VideoLayerOutput, VideoLayerOutputOptions } from './output-target';
3
4
  type VideoLayerMediabunnyTarget = BufferTarget | StreamTarget;
@@ -0,0 +1,29 @@
1
+ import type { InputVideoTrack, Quality, VideoSource } from 'mediabunny';
2
+ import type { VideoMattingImageSource, VideoMattingPipelineResult } from './load-video-matting-model';
3
+ export type VideoMattingFrame = {
4
+ image: VideoMattingImageSource;
5
+ timestamp: number;
6
+ duration: number;
7
+ };
8
+ export type VideoMattingFramesOptions = {
9
+ videoTrack: InputVideoTrack;
10
+ width: number;
11
+ height: number;
12
+ videoQuality: Quality;
13
+ keyframeIntervalInSeconds: number;
14
+ videoStartTimestamp: number;
15
+ videoEndTimestamp: number;
16
+ includeBase: boolean;
17
+ };
18
+ export type VideoMattingFrames = {
19
+ frames: AsyncGenerator<VideoMattingFrame, void, unknown>;
20
+ baseSource: VideoSource | null;
21
+ foregroundSource: VideoSource;
22
+ addFrame: (options: {
23
+ frame: VideoMattingFrame;
24
+ foreground: VideoMattingPipelineResult;
25
+ timestamp: number;
26
+ duration: number;
27
+ }) => Promise<void>;
28
+ };
29
+ export declare const createVideoMattingFrames: (options: VideoMattingFramesOptions) => Promise<VideoMattingFrames>;
@@ -0,0 +1,16 @@
1
+ import { type VideoMattingModel } from './models';
2
+ export type VideoMattingModelDownloadProgress = {
3
+ file: string | null;
4
+ progress: number;
5
+ loadedBytes: number;
6
+ totalBytes: number;
7
+ };
8
+ export type DownloadVideoMattingModelOptions = {
9
+ model: VideoMattingModel;
10
+ signal?: AbortSignal;
11
+ onProgress?: (progress: VideoMattingModelDownloadProgress) => void;
12
+ };
13
+ export type DownloadVideoMattingModelResult = {
14
+ alreadyDownloaded: boolean;
15
+ };
16
+ export declare const downloadVideoMattingModel: ({ model, signal, onProgress, }: DownloadVideoMattingModelOptions) => Promise<DownloadVideoMattingModelResult>;