From a8b59f087dc386288c50c61887a66fc12bb2ea32 Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Tue, 2 Jun 2026 22:10:30 +0000 Subject: [PATCH] fix(recorders): pre-create live asset with .mxf key when growing_enabled (was .mov, broke proxy lookup -> error) --- services/mam-api/src/routes/recorders.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/mam-api/src/routes/recorders.js b/services/mam-api/src/routes/recorders.js index 916b5e2..04ca3ef 100644 --- a/services/mam-api/src/routes/recorders.js +++ b/services/mam-api/src/routes/recorders.js @@ -521,9 +521,17 @@ router.post('/:id/start', requireRecorderEdit, async (req, res, next) => { // live-asset: create the asset row right now (status='live') so the // library shows the recording while it is happening. + // + // CRITICAL: the original_s3_key extension MUST match what the capture + // sidecar actually produces, or the post-stop proxy/promotion worker + // downloads a nonexistent object and the asset goes to 'error'. + // - growing-files ON → capture-manager writes a growing OP1a/RDD-9 MXF + // (GROWING_EXT = 'mxf'), uploaded by the promotion worker. So the key + // MUST be .mxf regardless of the recorder's configured container. + // - growing-files OFF → ffmpeg muxes the configured container (mov/mp4…). const assetIdLive = uuidv4(); try { - const ext = recorder.recording_container || 'mov'; + const ext = recorder.growing_enabled ? 'mxf' : (recorder.recording_container || 'mov'); await pool.query( `INSERT INTO assets ( id, project_id, bin_id, filename, display_name, status, media_type,