mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-04 06:54:28 +00:00
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:
@@ -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,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user