fix(cli): align render output naming and add WebM support to studioServer (#109)

## Summary

- CLI render: use timestamped filenames (`project_date_time.ext`) matching the studio's naming convention, preventing overwrites of previous renders
- studioServer: read `fps`/`quality`/`format` from POST body instead of hardcoding `fps:30`/`quality:standard`/`mp4`
- studioServer: use timestamped job IDs matching the studio pattern
- studioServer: fix download endpoint to serve correct content-type for WebM

## Test plan

- [x] `hyperframes render --format webm` outputs timestamped WebM file
- [x] `hyperframes render` outputs timestamped MP4 (no overwrite)
- [x] Studio embedded server (`hyperframes dev`) renders with correct format when selected in UI
- [x] Download endpoint serves correct MIME type for WebM renders
This commit is contained in:
Miguel Ángel
2026-03-28 21:49:10 +01:00
committed by GitHub
parent 40bd159103
commit 95d7dc0623
5 changed files with 198 additions and 66 deletions
+4 -1
View File
@@ -118,9 +118,12 @@ Examples:
// ── Resolve output path ───────────────────────────────────────────────
const rendersDir = resolve("renders");
const ext = format === "webm" ? ".webm" : ".mp4";
const now = new Date();
const datePart = now.toISOString().slice(0, 10);
const timePart = now.toTimeString().slice(0, 8).replace(/:/g, "-");
const outputPath = args.output
? resolve(args.output)
: join(rendersDir, `${project.name}${ext}`);
: join(rendersDir, `${project.name}_${datePart}_${timePart}${ext}`);
// Ensure output directory exists
mkdirSync(dirname(outputPath), { recursive: true });