MCPcopy
hub / github.com/cpaczek/skylight / autoStabilize

Method autoStabilize

tracker/src/video/recorder.ts:150–159  ·  view source on GitHub ↗

Crop the clip to a smooth plane-locked version, in the background.

(rawPath: string)

Source from the content-addressed store, hash-verified

148
149 /** Crop the clip to a smooth plane-locked version, in the background. */
150 private autoStabilize(rawPath: string): void {
151 const outPath = rawPath.replace(/\.mp4$/, "-stab.mp4");
152 const outName = outPath.split("/").pop()!;
153 this.stabilizing.add(outName);
154 console.log(`[rec-video] stabilizing -> ${outName}`);
155 stabilizeClip(rawPath, outPath)
156 .then(() => console.log(`[rec-video] stabilized -> ${outName}`))
157 .catch((e) => console.error(`[rec-video] stabilize failed: ${String(e)}`))
158 .finally(() => this.stabilizing.delete(outName));
159 }
160
161 list(): RecordingInfo[] {
162 if (!existsSync(this.dir)) return [];

Callers 1

startMethod · 0.95

Calls 3

stabilizeClipFunction · 0.85
addMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected