Enlarge watermark badge for preview/encode parity and document video title fields.

Fix double-scaled badge preview, bump default watermark to 42% frame width, and update OSS docs/API for title vs songTitle separation and shared typography.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Atakan Doğan Özban
2026-07-27 18:28:07 +02:00
co-authored by Cursor
parent c8015937f9
commit 56880256e5
8 changed files with 76 additions and 45 deletions
+6 -2
View File
@@ -13,6 +13,10 @@ import {
buildArtTrackFilterComplex,
type LayoutSettings,
} from "../layout";
import {
WATERMARK_WIDTH_FRACTION,
watermarkFontSizeForWidth,
} from "../preview-typography";
import { getWatermarkPath } from "../storage";
import {
buildDrawtextFilter,
@@ -113,8 +117,8 @@ export async function encodeVideo(options: {
const settings = normalizeWatermarkSettings(options.watermark, options.includeWatermark);
const layout = options.layout?.template ? options.layout : null;
const watermarkWidth = Math.max(1, Math.round(res.width * 0.32));
const fontSize = Math.max(16, Math.round(res.width * 0.018));
const watermarkWidth = Math.max(1, Math.round(res.width * WATERMARK_WIDTH_FRACTION));
const fontSize = watermarkFontSizeForWidth(res.width);
const fontfile = await resolveFontfileEscaped(settings);
const args = ["-y", "-loop", "1", "-r", "1", "-i", options.imagePath, "-i", options.audioPath];