feat(transcode): add hardware-accelerated video transcoding support (#352)

* feat(transcode): add hardware-accelerated video transcoding support

* feat(transcode): use encoder quality modes and source-capped maxrate for video transcode

* fix(transcode): scale max bitrate for downsampled preview framerates

* fix(transcode): propagate videoBitRate in getMediaInfoActivity and update auto description
This commit is contained in:
Yiling-J
2026-08-26 16:28:14 +08:00
committed by GitHub
parent 7b1428bf51
commit 8f55ba1d37
29 changed files with 1272 additions and 11 deletions
+2 -1
View File
@@ -371,11 +371,12 @@ describe('TeamService', () => {
expect(newSettings).toEqual({ theme: 'dark', semanticSearchEnabled: false })
await teamService.updateSettings(team.id, 'transcode.videoStrategy', 'all')
await teamService.updateSettings(team.id, 'transcode.hardwareAcceleration', 'auto')
const finalSettings = await teamService.getSettings(team.id)
expect(finalSettings).toEqual({
theme: 'dark',
transcode: { videoStrategy: 'all' },
transcode: { videoStrategy: 'all', hardwareAcceleration: 'auto' },
semanticSearchEnabled: false,
})
})
+7 -1
View File
@@ -31,7 +31,7 @@ export class TeamService {
data: {
name: 'Default Team',
settings: {
transcode: { videoStrategy: 'best_match' },
transcode: { videoStrategy: 'best_match', hardwareAcceleration: 'off' },
},
sandbox: { create: {} },
},
@@ -318,6 +318,12 @@ export class TeamService {
}
settings.transcode.videoStrategy = value
delete settings['transcode.videoStrategy']
} else if (key === 'transcode.hardwareAcceleration') {
if (!settings.transcode) {
settings.transcode = {}
}
settings.transcode.hardwareAcceleration = value
delete settings['transcode.hardwareAcceleration']
} else {
settings[key] = value
}