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:
parent
12628b80bc
commit
b1149881bd
8 changed files with 10 additions and 5 deletions
|
@ -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",
|
||||
|
|
BIN
mobile/openapi/lib/model/audio_codec.dart
generated
BIN
mobile/openapi/lib/model/audio_codec.dart
generated
Binary file not shown.
|
@ -8507,7 +8507,8 @@
|
|||
"enum": [
|
||||
"mp3",
|
||||
"aac",
|
||||
"libopus"
|
||||
"libopus",
|
||||
"pcm_s16le"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -278,6 +278,7 @@ export enum AudioCodec {
|
|||
MP3 = 'mp3',
|
||||
AAC = 'aac',
|
||||
LIBOPUS = 'libopus',
|
||||
PCMS16LE = 'pcm_s16le',
|
||||
}
|
||||
|
||||
export enum VideoContainer {
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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))}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue