@t3lnet/sceneforge 1.0.25 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -182,6 +182,7 @@ export async function runRecordDemoCommand(argv) {
182
182
  const hqVideo = hasFlag(args, "--hq-video");
183
183
  const hqFormat = getFlagValue(args, "--hq-format") ?? "jpeg";
184
184
  const hqQuality = parseInt(getFlagValue(args, "--hq-quality") ?? "100", 10);
185
+ const hqFps = parseInt(getFlagValue(args, "--hq-fps") ?? "30", 10);
185
186
 
186
187
  if (!baseUrl) {
187
188
  console.error("[error] --base-url is required");
@@ -303,7 +304,7 @@ export async function runRecordDemoCommand(argv) {
303
304
  const finalVideoPath = path.join(outputPaths.videosDir, `${definition.name}.webm`);
304
305
  try {
305
306
  if (!demoError && result?.success) {
306
- await cdpRecorder.assembleVideo(finalVideoPath);
307
+ await cdpRecorder.assembleVideo(finalVideoPath, { fps: hqFps });
307
308
  console.log(`[record] High-quality video saved: ${finalVideoPath}`);
308
309
  if (result.scriptPath) {
309
310
  await alignScriptToVideo(result.scriptPath, finalVideoPath, videoRecordingStartTime);
@@ -183,17 +183,8 @@ export function createCDPRecorder(page, options) {
183
183
  throw new Error("No frames captured - cannot assemble video");
184
184
  }
185
185
 
186
- // Calculate actual FPS from captured frame timestamps
187
- let fps = fpsOverride;
188
- if (!fps && frameTimestamps.length > 1) {
189
- const firstTimestamp = frameTimestamps[0].timestamp;
190
- const lastTimestamp = frameTimestamps[frameTimestamps.length - 1].timestamp;
191
- const durationSec = lastTimestamp - firstTimestamp;
192
- if (durationSec > 0) {
193
- fps = Math.round(frameTimestamps.length / durationSec);
194
- }
195
- }
196
- fps = fps || 30; // Default to 30fps
186
+ // Use provided fps or default to 30
187
+ const fps = fpsOverride || 30;
197
188
 
198
189
  console.log(`[cdp-recorder] Assembling video at ${fps} fps`);
199
190
 
@@ -259,5 +250,6 @@ High-Quality Recording Options:
259
250
  --hq-video Use CDP-based high-quality recording instead of Playwright
260
251
  Captures frames at maximum quality and assembles with FFmpeg
261
252
  --hq-format <format> Frame format: jpeg (default) or png (lossless, larger files)
262
- --hq-quality <1-100> JPEG quality (default: 100, ignored for PNG)`;
253
+ --hq-quality <1-100> JPEG quality (default: 100, ignored for PNG)
254
+ --hq-fps <fps> Output framerate (default: 30)`;
263
255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t3lnet/sceneforge",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "SceneForge runner and generation utilities for YAML-driven demos",
5
5
  "license": "MIT",
6
6
  "author": "T3LNET",