feat: expand GPU transcoding settings (extension, framerate, rc mode, audio)

This commit is contained in:
Zac Gaetano 2026-05-20 23:41:42 -04:00
parent 629022ab5f
commit 066b9b17d3

View file

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