mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11: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",
|
"targetVideoCodec": "h264",
|
||||||
"acceptedVideoCodecs": ["h264"],
|
"acceptedVideoCodecs": ["h264"],
|
||||||
"targetAudioCodec": "aac",
|
"targetAudioCodec": "aac",
|
||||||
"acceptedAudioCodecs": ["aac", "mp3", "libopus"],
|
"acceptedAudioCodecs": ["aac", "mp3", "libopus", "pcm_s16le"],
|
||||||
"acceptedContainers": ["mov", "ogg", "webm"],
|
"acceptedContainers": ["mov", "ogg", "webm"],
|
||||||
"targetResolution": "720",
|
"targetResolution": "720",
|
||||||
"maxBitrate": "0",
|
"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": [
|
"enum": [
|
||||||
"mp3",
|
"mp3",
|
||||||
"aac",
|
"aac",
|
||||||
"libopus"
|
"libopus",
|
||||||
|
"pcm_s16le"
|
||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
|
@ -3501,7 +3501,8 @@ export enum TranscodeHWAccel {
|
||||||
export enum AudioCodec {
|
export enum AudioCodec {
|
||||||
Mp3 = "mp3",
|
Mp3 = "mp3",
|
||||||
Aac = "aac",
|
Aac = "aac",
|
||||||
Libopus = "libopus"
|
Libopus = "libopus",
|
||||||
|
PcmS16Le = "pcm_s16le"
|
||||||
}
|
}
|
||||||
export enum VideoContainer {
|
export enum VideoContainer {
|
||||||
Mov = "mov",
|
Mov = "mov",
|
||||||
|
|
|
@ -163,7 +163,7 @@ export const defaults = Object.freeze<SystemConfig>({
|
||||||
targetVideoCodec: VideoCodec.H264,
|
targetVideoCodec: VideoCodec.H264,
|
||||||
acceptedVideoCodecs: [VideoCodec.H264],
|
acceptedVideoCodecs: [VideoCodec.H264],
|
||||||
targetAudioCodec: AudioCodec.AAC,
|
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],
|
acceptedContainers: [VideoContainer.MOV, VideoContainer.OGG, VideoContainer.WEBM],
|
||||||
targetResolution: '720',
|
targetResolution: '720',
|
||||||
maxBitrate: '0',
|
maxBitrate: '0',
|
||||||
|
|
|
@ -278,6 +278,7 @@ export enum AudioCodec {
|
||||||
MP3 = 'mp3',
|
MP3 = 'mp3',
|
||||||
AAC = 'aac',
|
AAC = 'aac',
|
||||||
LIBOPUS = 'libopus',
|
LIBOPUS = 'libopus',
|
||||||
|
PCMS16LE = 'pcm_s16le',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum VideoContainer {
|
export enum VideoContainer {
|
||||||
|
|
|
@ -49,7 +49,7 @@ const updatedConfig = Object.freeze<SystemConfig>({
|
||||||
threads: 0,
|
threads: 0,
|
||||||
preset: 'ultrafast',
|
preset: 'ultrafast',
|
||||||
targetAudioCodec: AudioCodec.AAC,
|
targetAudioCodec: AudioCodec.AAC,
|
||||||
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS],
|
acceptedAudioCodecs: [AudioCodec.AAC, AudioCodec.MP3, AudioCodec.LIBOPUS, AudioCodec.PCMS16LE],
|
||||||
targetResolution: '720',
|
targetResolution: '720',
|
||||||
targetVideoCodec: VideoCodec.H264,
|
targetVideoCodec: VideoCodec.H264,
|
||||||
acceptedVideoCodecs: [VideoCodec.H264],
|
acceptedVideoCodecs: [VideoCodec.H264],
|
||||||
|
|
|
@ -102,6 +102,7 @@
|
||||||
onSelect={() => (config.ffmpeg.acceptedVideoCodecs = [config.ffmpeg.targetVideoCodec])}
|
onSelect={() => (config.ffmpeg.acceptedVideoCodecs = [config.ffmpeg.targetVideoCodec])}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- PCM is excluded here since it's a bad choice for users storage-wise -->
|
||||||
<SettingSelect
|
<SettingSelect
|
||||||
label={$t('admin.transcoding_audio_codec')}
|
label={$t('admin.transcoding_audio_codec')}
|
||||||
{disabled}
|
{disabled}
|
||||||
|
@ -145,6 +146,7 @@
|
||||||
{ value: AudioCodec.Aac, text: 'AAC' },
|
{ value: AudioCodec.Aac, text: 'AAC' },
|
||||||
{ value: AudioCodec.Mp3, text: 'MP3' },
|
{ value: AudioCodec.Mp3, text: 'MP3' },
|
||||||
{ value: AudioCodec.Libopus, text: 'Opus' },
|
{ value: AudioCodec.Libopus, text: 'Opus' },
|
||||||
|
{ value: AudioCodec.PcmS16Le, text: 'PCM (16 bit)' },
|
||||||
]}
|
]}
|
||||||
isEdited={!isEqual(sortBy(config.ffmpeg.acceptedAudioCodecs), sortBy(savedConfig.ffmpeg.acceptedAudioCodecs))}
|
isEdited={!isEqual(sortBy(config.ffmpeg.acceptedAudioCodecs), sortBy(savedConfig.ffmpeg.acceptedAudioCodecs))}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue