feat(server, web): accepted codecs (#6460)

* chore: rebase

* chore: open api

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
Markus
2024-01-26 18:02:56 +01:00
committed by GitHub
parent 96b7885583
commit 8aef92affc
14 changed files with 181 additions and 10 deletions

View File

@@ -31,7 +31,9 @@ export const defaults = Object.freeze<SystemConfig>({
threads: 0,
preset: 'ultrafast',
targetVideoCodec: VideoCodec.H264,
acceptedVideoCodecs: [VideoCodec.H264],
targetAudioCodec: AudioCodec.AAC,
acceptedAudioCodecs: [AudioCodec.AAC],
targetResolution: '720',
maxBitrate: '0',
bframes: -1,
@@ -248,6 +250,14 @@ export class SystemConfigCore {
}
}
if (!config.ffmpeg.acceptedVideoCodecs.includes(config.ffmpeg.targetVideoCodec)) {
config.ffmpeg.acceptedVideoCodecs.unshift(config.ffmpeg.targetVideoCodec);
}
if (!config.ffmpeg.acceptedAudioCodecs.includes(config.ffmpeg.targetAudioCodec)) {
config.ffmpeg.acceptedAudioCodecs.unshift(config.ffmpeg.targetAudioCodec);
}
return config;
}