Ship free-tier watermark policy (2 clean renders) and align pricing/legal copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Atakan Doğan Özban
2026-08-03 07:41:11 +02:00
co-authored by Cursor
parent 26c4b22fbb
commit 8f6b894f80
17 changed files with 346 additions and 34 deletions
+20
View File
@@ -0,0 +1,20 @@
/**
* Modular FFmpeg filter fragments for the Songs2VID brand watermark overlay.
* Always bottom-right with padding; scales to a fraction of frame width.
*/
export function buildBrandWatermarkOverlayFilters(options: {
baseLabel: string;
watermarkInputIndex: number;
watermarkWidthPx: number;
offsetX?: number;
offsetY?: number;
outLabel?: string;
}): string[] {
const ox = options.offsetX ?? 20;
const oy = options.offsetY ?? 20;
const out = options.outLabel ?? "vout";
return [
`[${options.watermarkInputIndex}:v]scale=${options.watermarkWidthPx}:-1[wm]`,
`[${options.baseLabel}][wm]overlay=W-w-${ox}:H-h-${oy}[${out}]`,
];
}
+8 -3
View File
@@ -25,6 +25,7 @@ import {
sanitizeDrawtext,
type WatermarkSettings,
} from "../watermark";
import { buildBrandWatermarkOverlayFilters } from "./brand-watermark";
function getFfmpegPath(): string {
if (process.env.FFMPEG_PATH) return process.env.FFMPEG_PATH;
@@ -217,10 +218,14 @@ export async function encodeVideo(options: {
});
filterParts.push(`[${baseLabel}]${draw}[vout]`);
} else if (applyWm === "default-png" && defaultWmInputIndex !== null) {
const { x, y } = overlayXy(settings.position, settings.offsetX, settings.offsetY);
filterParts.push(
`[${defaultWmInputIndex}:v]scale=${watermarkWidth}:-1[wm]`,
`[${baseLabel}][wm]overlay=${x}:${y}[vout]`,
...buildBrandWatermarkOverlayFilters({
baseLabel,
watermarkInputIndex: defaultWmInputIndex,
watermarkWidthPx: watermarkWidth,
offsetX: settings.offsetX,
offsetY: settings.offsetY,
}),
);
} else if (applyWm === "default-text") {
const draw = buildDrawtextFilter({