From 049beb881886088df7ef29197c172f8ff3edba83 Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Thu, 21 May 2026 00:14:11 -0400 Subject: [PATCH] recorders: add granular codec / container / port columns Expands recorders with video bitrate, framerate, audio codec / bitrate / channels, container format, and a node_id/device_index pair so the UI can pin SDI recorders to a specific node + DeckLink port instead of relying on a flat "BM1/BM2" index. capture-manager.js consumes these via env vars and builds ffmpeg args from them. --- .../src/db/migrations/008-codec-settings.sql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 services/mam-api/src/db/migrations/008-codec-settings.sql diff --git a/services/mam-api/src/db/migrations/008-codec-settings.sql b/services/mam-api/src/db/migrations/008-codec-settings.sql new file mode 100644 index 0000000..e05df53 --- /dev/null +++ b/services/mam-api/src/db/migrations/008-codec-settings.sql @@ -0,0 +1,26 @@ +-- 008 — Extended codec controls for recorders. +-- +-- Adds video bitrate, framerate, audio codec / bitrate / channels, and +-- container format columns to recorders so the UI can offer granular +-- control instead of the four-options dropdown. capture-manager.js reads +-- these via env vars and builds ffmpeg args from them. + +ALTER TABLE recorders + ADD COLUMN IF NOT EXISTS recording_video_bitrate TEXT, + ADD COLUMN IF NOT EXISTS recording_framerate TEXT, + ADD COLUMN IF NOT EXISTS recording_audio_codec TEXT DEFAULT 'pcm_s24le', + ADD COLUMN IF NOT EXISTS recording_audio_bitrate TEXT, + ADD COLUMN IF NOT EXISTS recording_audio_channels INTEGER DEFAULT 2, + ADD COLUMN IF NOT EXISTS recording_container TEXT DEFAULT 'mov', + ADD COLUMN IF NOT EXISTS proxy_video_bitrate TEXT DEFAULT '8M', + ADD COLUMN IF NOT EXISTS proxy_framerate TEXT, + ADD COLUMN IF NOT EXISTS proxy_audio_codec TEXT DEFAULT 'aac', + ADD COLUMN IF NOT EXISTS proxy_audio_bitrate TEXT DEFAULT '192k', + ADD COLUMN IF NOT EXISTS proxy_audio_channels INTEGER DEFAULT 2, + ADD COLUMN IF NOT EXISTS proxy_container TEXT DEFAULT 'mp4', + ADD COLUMN IF NOT EXISTS node_id UUID, + ADD COLUMN IF NOT EXISTS device_index INTEGER; + +-- node_id is the cluster_nodes.id the recorder is pinned to (for SDI +-- recorders this is the node hosting the DeckLink card). device_index is +-- the DeckLink port index on that node.