feat: Add Remotion rendering API with TTS and update Dockerfile to use Debian-slim for Remotion's glibc-dependent Chrome headless shell.

This commit is contained in:
Michael committed 2026-03-24 14:18:57 +01:00
1 parent fa4e6e3131
commit 4f69a2edda
2 files changed
+43 -68

No files matched your search

-14
View File
@@ -171,26 +171,12 @@ remotionRouter.post("/render", upload.array("images", 4), async (req, res) => {
console.log("🎬 Rendering media...", effectiveDurationInFrames, "frames");
// Find system Chromium: path written during Docker build, or fallback to common locations
let browserExecutable: string | undefined;
const savedPath = "/app/.chromium-path";
if (fs.existsSync(savedPath)) {
const p = fs.readFileSync(savedPath, "utf-8").trim();
if (p && fs.existsSync(p)) browserExecutable = p;
}
if (!browserExecutable) {
const chromiumPaths = ["/usr/bin/chromium-browser", "/usr/bin/chromium"];
browserExecutable = chromiumPaths.find(p => fs.existsSync(p));
}
console.log("🌐 Browser executable:", browserExecutable ?? "remotion bundled (fallback)");
await renderMedia({
composition: { ...composition, durationInFrames: effectiveDurationInFrames },
serveUrl: bundleLocation,
codec: "h264",
outputLocation,
inputProps,
browserExecutable,
chromiumOptions: {
disableWebSecurity: true,
ignoreCertificateErrors: true,