Crop the clip to a smooth plane-locked version, in the background.
(rawPath: string)
| 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 []; |
no test coverage detected