Skip to content

Commit

Permalink
chore(server): explicitly use svt-av1 encoder (immich-app#13389)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincox authored Oct 15, 2024
1 parent 8eb7980 commit e57bd94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/services/media.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ describe(MediaService.name, () => {
expect.objectContaining({
inputOptions: expect.any(Array),
outputOptions: expect.arrayContaining([
'-c:v av1',
'-c:v libsvtav1',
'-movflags faststart',
'-fps_mode passthrough',
'-map 0:0',
Expand Down
4 changes: 4 additions & 0 deletions server/src/utils/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,10 @@ export class VP9Config extends BaseConfig {
}

export class AV1Config extends BaseConfig {
getVideoCodec(): string {
return 'libsvtav1';
}

getPresetOptions() {
const speed = this.getPresetIndex() + 4; // Use 4 as slowest, giving us an effective range of 4-12 which is far more useful than 0-8
if (speed >= 0) {
Expand Down

0 comments on commit e57bd94

Please sign in to comment.