feat(transcode): add multi-resolution strategy with configurable ladders and fallback (#438)

* feat(transcode): add multi-resolution strategy with configurable ladders and fallback

* feat(settings): show toast on settings update and add manual verification plan to PR template

* fix(webui): preserve video resolution and fix 480p label in download dropdowns

* fix(webui): display standard short-side resolution for vertical videos in seekbar

* fix(webui): fix portrait transcode resolution labeling and serialize settings toggles
This commit is contained in:
Yiling-J
2026-10-01 13:27:50 +08:00
committed by GitHub
parent a84da8678e
commit e007054f47
35 changed files with 1260 additions and 123 deletions
@@ -0,0 +1,16 @@
-- Migrate videoStrategy 'all' / 'full' to 'multi'
UPDATE "teams"
SET "settings" = jsonb_set("settings", '{transcode,videoStrategy}', '"multi"')
WHERE "settings"->'transcode'->>'videoStrategy' IN ('all', 'full');
-- Normalize legacy videoStrategy values 'single' / 'disable' to 'best_match'
UPDATE "teams"
SET "settings" = jsonb_set("settings", '{transcode,videoStrategy}', '"best_match"')
WHERE "settings"->'transcode'->>'videoStrategy' IN ('single', 'disable');
-- Backfill default videoResolutions where transcode settings exist without videoResolutions
UPDATE "teams"
SET "settings" = jsonb_set("settings", '{transcode,videoResolutions}', '["480p", "720p", "1080p", "1440p", "2160p"]'::jsonb)
WHERE "settings" IS NOT NULL
AND jsonb_typeof("settings"->'transcode') = 'object'
AND NOT ("settings"->'transcode' ? 'videoResolutions');
+4 -1
View File
@@ -48,7 +48,8 @@ declare global {
// ----------------------------------------------------------------------
// Team Settings
// ----------------------------------------------------------------------
export type VideoTranscodeStrategy = 'best_match' | 'all'
export type VideoTranscodeStrategy = 'best_match' | 'multi' | 'all'
export type VideoResolutionLadder = '480p' | '720p' | '1080p' | '1440p' | '2160p'
export type HardwareAcceleration = 'off' | 'auto'
export type HdrType = 'pq' | 'hlg' | 'dovi_p5' | 'dovi_p8' | 'sdr'
@@ -61,6 +62,7 @@ declare global {
export interface TranscodeSettings {
videoStrategy: VideoTranscodeStrategy
videoResolutions?: VideoResolutionLadder[]
hardwareAcceleration?: HardwareAcceleration
threads?: number
hlsEnabled?: boolean
@@ -348,6 +350,7 @@ declare global {
// ----------------------------------------------------------------------
export interface TaskSpec {
videoStrategy?: VideoTranscodeStrategy
videoResolutions?: VideoResolutionLadder[]
hardwareAcceleration?: HardwareAcceleration
threads?: number
thumbnail?: boolean