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.
This commit is contained in:
Zac Gaetano 2026-05-21 00:14:11 -04:00
parent a39c9831c5
commit 049beb8818

View file

@ -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.