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.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user