Skip to content

Commit

Permalink
added pcm_s16le accepted audio codec
Browse files Browse the repository at this point in the history
  • Loading branch information
pyorot committed Oct 13, 2024
1 parent f29fb16 commit bb0ce08
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/docs/install/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The default configuration looks like this:
"targetVideoCodec": "h264",
"acceptedVideoCodecs": ["h264"],
"targetAudioCodec": "aac",
"acceptedAudioCodecs": ["aac", "mp3", "libopus"],
"acceptedAudioCodecs": ["aac", "mp3", "libopus", "pcm_s16le"],
"acceptedContainers": ["mov", "ogg", "webm"],
"targetResolution": "720",
"maxBitrate": "0",
Expand Down
3 changes: 3 additions & 0 deletions mobile/openapi/lib/model/audio_codec.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8507,7 +8507,8 @@
"enum": [
"mp3",
"aac",
"libopus"
"libopus",
"pcm_s16le"
],
"type": "string"
},
Expand Down
3 changes: 2 additions & 1 deletion open-api/typescript-sdk/src/fetch-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3501,7 +3501,8 @@ export enum TranscodeHWAccel {
export enum AudioCodec {
Mp3 = "mp3",
Aac = "aac",
Libopus = "libopus"
Libopus = "libopus",
Pcms16le = "pcm_s16le"
}
export enum VideoContainer {
Mov = "mov",
Expand Down
2 changes: 1 addition & 1 deletion server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const defaults = Object.freeze<SystemConfig>({
targetVideoCodec: VideoCodec.H264,
acceptedVideoCodecs: [VideoCodec.H264],
targetAudioCodec: AudioCodec.AAC,
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS],
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS, AudioCodec.PCMS16LE],
acceptedContainers: [VideoContainer.MOV, VideoContainer.OGG, VideoContainer.WEBM],
targetResolution: '720',
maxBitrate: '0',
Expand Down
1 change: 1 addition & 0 deletions server/src/enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ export enum AudioCodec {
MP3 = 'mp3',
AAC = 'aac',
LIBOPUS = 'libopus',
PCMS16LE = 'pcm_s16le',
}

export enum VideoContainer {
Expand Down
2 changes: 1 addition & 1 deletion server/src/services/system-config.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
threads: 0,
preset: 'ultrafast',
targetAudioCodec: AudioCodec.AAC,
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS],
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS, AudioCodec.PCMS16LE],
targetResolution: '720',
targetVideoCodec: VideoCodec.H264,
acceptedVideoCodecs: [VideoCodec.H264],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
{ value: AudioCodec.Aac, text: 'AAC' },
{ value: AudioCodec.Mp3, text: 'MP3' },
{ value: AudioCodec.Libopus, text: 'Opus' },
{ value: AudioCodec.Pcms16le, text: 'PCM (16 bit)' },
]}
isEdited={!isEqual(sortBy(config.ffmpeg.acceptedAudioCodecs), sortBy(savedConfig.ffmpeg.acceptedAudioCodecs))}
/>
Expand Down

0 comments on commit bb0ce08

Please sign in to comment.