1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00:00

feat(server): add pcm_s16le accepted audio codec (#13418)

This commit is contained in:
pyorot 2024-10-18 13:26:16 +01:00 committed by GitHub
parent 12628b80bc
commit b1149881bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 10 additions and 5 deletions

View file

@ -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",

Binary file not shown.

View file

@ -8507,7 +8507,8 @@
"enum": [
"mp3",
"aac",
"libopus"
"libopus",
"pcm_s16le"
],
"type": "string"
},

View file

@ -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",

View file

@ -163,7 +163,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',

View file

@ -278,6 +278,7 @@ export enum AudioCodec {
MP3 = 'mp3',
AAC = 'aac',
LIBOPUS = 'libopus',
PCMS16LE = 'pcm_s16le',
}
export enum VideoContainer {

View file

@ -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],

View file

@ -102,6 +102,7 @@
onSelect={() => (config.ffmpeg.acceptedVideoCodecs = [config.ffmpeg.targetVideoCodec])}
/>
<!-- PCM is excluded here since it's a bad choice for users storage-wise -->
<SettingSelect
label={$t('admin.transcoding_audio_codec')}
{disabled}
@ -145,6 +146,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))}
/>