From 066b9b17d3fdb62a72acb1b0f40d9c4fc3f87f4e Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Wed, 20 May 2026 23:41:42 -0400 Subject: [PATCH] feat: expand GPU transcoding settings (extension, framerate, rc mode, audio) --- services/mam-api/src/routes/settings.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/services/mam-api/src/routes/settings.js b/services/mam-api/src/routes/settings.js index 4d2a390..89834e2 100644 --- a/services/mam-api/src/routes/settings.js +++ b/services/mam-api/src/routes/settings.js @@ -201,14 +201,20 @@ router.get('/transcoding', async (req, res, next) => { try { const result = await pool.query( `SELECT key, value FROM settings - WHERE key IN ('gpu_transcode_enabled','gpu_codec','gpu_preset','gpu_bitrate_mbps','gpu_node')` + WHERE key IN ('gpu_transcode_enabled','gpu_codec','gpu_preset','gpu_bitrate_mbps','gpu_node', + 'gpu_extension','gpu_framerate','gpu_rc_mode','gpu_audio_codec','gpu_audio_bitrate_kbps')` ); const out = { - gpu_transcode_enabled: 'false', - gpu_codec: 'h264_nvenc', - gpu_preset: 'p4', - gpu_bitrate_mbps: '8', - gpu_node: '', + gpu_transcode_enabled: 'false', + gpu_codec: 'h264_nvenc', + gpu_preset: 'p4', + gpu_bitrate_mbps: '8', + gpu_node: '', + gpu_extension: 'mp4', + gpu_framerate: 'passthrough', + gpu_rc_mode: 'cbr', + gpu_audio_codec: 'aac', + gpu_audio_bitrate_kbps: '192', }; for (const { key, value } of result.rows) out[key] = value; res.json(out); @@ -219,7 +225,10 @@ router.get('/transcoding', async (req, res, next) => { router.put('/transcoding', async (req, res, next) => { try { - const allowed = ['gpu_transcode_enabled', 'gpu_codec', 'gpu_preset', 'gpu_bitrate_mbps', 'gpu_node']; + const allowed = [ + 'gpu_transcode_enabled', 'gpu_codec', 'gpu_preset', 'gpu_bitrate_mbps', 'gpu_node', + 'gpu_extension', 'gpu_framerate', 'gpu_rc_mode', 'gpu_audio_codec', 'gpu_audio_bitrate_kbps', + ]; for (const key of allowed) { if (req.body[key] !== undefined) { await pool.query(