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
+2
View File
@@ -105,6 +105,7 @@ export const assetInfoSchema = z.object({
width: z.number(),
height: z.number(),
size: z.number(),
resolution: z.string().optional(),
hdr: z.boolean().optional(),
}),
)
@@ -357,6 +358,7 @@ export interface VideoTranscode {
width: number
height: number
size: number
resolution?: string
hdr?: boolean
}
+24
View File
@@ -69,11 +69,30 @@ export const listMembersQuerySchema = z.object({
export const VideoTranscodeStrategy = {
// eslint-disable-next-line @typescript-eslint/naming-convention
best_match: 'best_match',
multi: 'multi',
all: 'all',
} as const
export type VideoTranscodeStrategy =
(typeof VideoTranscodeStrategy)[keyof typeof VideoTranscodeStrategy]
export const VideoResolutionLadder = {
r480p: '480p',
r720p: '720p',
r1080p: '1080p',
r1440p: '1440p',
r2160p: '2160p',
} as const
export type VideoResolutionLadder =
(typeof VideoResolutionLadder)[keyof typeof VideoResolutionLadder]
export const DEFAULT_VIDEO_RESOLUTIONS: VideoResolutionLadder[] = [
'480p',
'720p',
'1080p',
'1440p',
'2160p',
]
export const HardwareAcceleration = {
off: 'off',
auto: 'auto',
@@ -96,6 +115,10 @@ export const updateTeamSettingsRequestSchema = z.union([
key: z.literal('transcode.videoStrategy'),
value: z.nativeEnum(VideoTranscodeStrategy),
}),
z.object({
key: z.literal('transcode.videoResolutions'),
value: z.array(z.nativeEnum(VideoResolutionLadder)),
}),
z.object({
key: z.literal('transcode.hardwareAcceleration'),
value: z.nativeEnum(HardwareAcceleration),
@@ -126,6 +149,7 @@ export interface TeamAppearanceSettings {
export interface TeamSettingsResponse {
transcode?: {
videoStrategy?: VideoTranscodeStrategy
videoResolutions?: VideoResolutionLadder[]
hardwareAcceleration?: HardwareAcceleration
threads?: number
hlsEnabled?: boolean