Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Vertical 9:16 export keeps the whole frame over a blurred fill instead of center-cropping lyrics off (#10377)
Adam Eivy867a8b5eef7a
diff --git a/client/src/components/musicVideo/PublishPostingPanel.jsx b/client/src/components/musicVideo/PublishPostingPanel.jsxindex 35322df0d4..b920ed405a 100644--- a/client/src/components/musicVideo/PublishPostingPanel.jsx+++ b/client/src/components/musicVideo/PublishPostingPanel.jsx@@ -47,7 +47,7 @@ function verticalCutChoices(project) {.map((e) => ({ id: e.id, label: `Social cut ${fmtSec(e.startSec ?? 0)}-${fmtSec(e.endSec ?? 0)}` }));const crop = (kit.exports || []).find((e) => e.kind === 'vertical-9x16' && e.filename);if (crop && (kit.master?.renderHistoryId ?? null) === (project?.renderHistoryId ?? null)) {- cuts.unshift({ id: 'kit-vertical', label: `Kit center-crop ${fmtSec(crop.startSec ?? 0)}-${fmtSec(crop.endSec ?? 0)}` });+ cuts.unshift({ id: 'kit-vertical', label: `Kit vertical (fit) ${fmtSec(crop.startSec ?? 0)}-${fmtSec(crop.endSec ?? 0)}` });}return cuts;}diff --git a/server/services/musicVideo/publish/payloads.js b/server/services/musicVideo/publish/payloads.jsindex a88921eea4..e6be2f6c40 100644--- a/server/services/musicVideo/publish/payloads.js+++ b/server/services/musicVideo/publish/payloads.js@@ -30,7 +30,7 @@ const isVerticalCut = (e) => e?.status === 'complete' && e.aspect === '9:16' &&/*** The vertical cuts a director can post (#10150), newest last: finished 9:16* excerpts flagged stale when the project changed since, plus the kit's- * center-crop 9:16 encode (16:9 renders) while the kit is fresh.+ * fit-with-blurred-fill 9:16 encode (16:9 renders) while the kit is fresh.*/function verticalCuts(project) {const kit = kitOf(project);diff --git a/server/services/musicVideo/publish/payloads.test.js b/server/services/musicVideo/publish/payloads.test.jsindex 7058e40f7c..d98a6ce257 100644--- a/server/services/musicVideo/publish/payloads.test.js+++ b/server/services/musicVideo/publish/payloads.test.js@@ -72,7 +72,7 @@ describe('buildPublishPayload (#9282)', () => {expect(() => buildPublishPayload('tiktok', project({}, []))).toThrow(/9:16 social cut/);});- it('uses the kit center-crop vertical encode for a 16:9 render with no social cut, and only while the kit is fresh (#10150)', () => {+ it('uses the kit fit-with-fill vertical encode for a 16:9 render with no social cut, and only while the kit is fresh (#10150)', () => {const exports = [{ kind: 'vertical-9x16', filename: 'vertical.mp4', startSec: 5, endSec: 35 }];const wide = { ...project({ exports, master: { filename: 'master.mp4', renderHistoryId: 'r1' } }, []), renderHistoryId: 'r1' };expect(buildPublishPayload('shorts', wide).video.name).toBe('vertical.mp4');diff --git a/server/services/musicVideo/publishKit.js b/server/services/musicVideo/publishKit.jsindex 8cd5689053..3cf177cb8b 100644--- a/server/services/musicVideo/publishKit.js+++ b/server/services/musicVideo/publishKit.js@@ -30,6 +30,8 @@ const projectBuilds = new Map();const MAX_THUMBNAILS = 6;// X caps a Premium upload's bitrate well under a 1080p master's; ~12 Mbps// keeps the analog grain without the upload being re-crushed.+// 9:16 canvas: the full frame fitted to width over a blurred, cover-scaled copy of itself, so edge text is never cropped.+export const VERTICAL_FIT_FILTER = 'split[bg][fg];[bg]scale=1080:1920:force_original_aspect_ratio=increase,crop=1080:1920,boxblur=24:4[b];[fg]scale=1080:1920:force_original_aspect_ratio=decrease[f];[b][f]overlay=(W-w)/2:(H-h)/2,setsar=1';const X_VIDEO_ARGS = ['-c:v', 'libx264', '-profile:v', 'high', '-preset', 'medium', '-b:v', '10M', '-maxrate', '12M', '-bufsize', '24M', '-pix_fmt', 'yuv420p'];const AUDIO_ARGS = ['-c:a', 'aac', '-b:a', '192k', '-movflags', '+faststart'];@@ -135,10 +137,11 @@ async function beginPublishKitBuild(projectId, jobId) {...(teaser ? [{ kind: 'teaser', label: `Teaser ${Math.round(teaser.endSec - teaser.startSec)}s`, filename: `${stem}-teaser.mp4`, window: teaser,args: ['-ss', String(teaser.startSec), '-t', String(teaser.endSec - teaser.startSec), '-i', masterPath, ...X_VIDEO_ARGS,'-af', `asetpts=PTS-STARTPTS${edgeFadeFilter(teaser.endSec - teaser.startSec)}`, ...AUDIO_ARGS] }] : []),- // #10150: Shorts/TikTok/Reels need 9:16; a 16:9 render gets a center-crop of the hook window (no generation).+ // #10150: Shorts/TikTok/Reels need 9:16; a 16:9 render gets the whole frame fitted over a blurred fill+ // of itself (#10377) — a center-crop silently dropped off-center lyric/title text....(teaser && musicVideoAspect(project) === '16:9' ? [{ kind: 'vertical-9x16', label: `Vertical 9:16 ${Math.round(teaser.endSec - teaser.startSec)}s`, filename: `${stem}-vertical.mp4`, window: teaser,args: ['-ss', String(teaser.startSec), '-t', String(teaser.endSec - teaser.startSec), '-i', masterPath,- '-vf', 'crop=trunc(ih*9/32)*2:ih,scale=1080:1920', ...X_VIDEO_ARGS,+ '-vf', VERTICAL_FIT_FILTER, ...X_VIDEO_ARGS,'-af', `asetpts=PTS-STARTPTS${edgeFadeFilter(teaser.endSec - teaser.startSec)}`, ...AUDIO_ARGS] }] : []),];const times = thumbnailTimes(project, durationSec);diff --git a/server/services/musicVideo/publishKit.test.js b/server/services/musicVideo/publishKit.test.jsindex 188aaa68f8..a314625479 100644--- a/server/services/musicVideo/publishKit.test.js+++ b/server/services/musicVideo/publishKit.test.js@@ -163,6 +163,10 @@ describe('publishing kit build (#9281)', () => {const first = (await projects.getProject(id)).publishKit;expect(first.exports.map((e) => e.kind)).toEqual(['x-1080p', 'preview-720p', 'teaser', 'vertical-9x16']);for (const e of first.exports) expect(existsSync(join(PATHS.videos, e.filename))).toBe(true);+ // #10377: the vertical cut fits the whole frame over a blurred fill instead of center-cropping text away.+ const vertical = first.exports.find((e) => e.kind === 'vertical-9x16');+ const probed = await runFfmpegProcess({ bin: ffmpeg, args: ['-hide_banner', '-i', join(PATHS.videos, vertical.filename), '-f', 'null', '-'] });+ expect(probed.ok).toBe(true);expect(first.thumbnails).toHaveLength(2); // the two performance shotsexpect(first.thumbnail).toBe(first.thumbnails[0]);expect(await readFile(join(PATHS.videos, first.captionsFilename), 'utf8')).toContain('the chorus line');