Support inputOptions and scaleFilter

This commit is contained in:
Chocobozzz 2021-12-14 09:33:44 +01:00
parent a8b0d684ba
commit 3513db0102
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -48,21 +48,13 @@ async function update (peertubeHelpers, transcodingManager, settingsManager) {
const profiles = JSON.parse(profilesString)
for (const profile of profiles.vod) {
const builder = () => {
return {
outputOptions: profile.outputOptions
}
}
const builder = () => buildResult(profile)
transcodingManager.addVODProfile(profile.encoderName, profile.profileName, builder)
}
for (const profile of profiles.live) {
const builder = () => {
return {
outputOptions: profile.outputOptions
}
}
const builder = () => buildResult(profile)
transcodingManager.addLiveProfile(profile.encoderName, profile.profileName, builder)
}
@ -91,3 +83,11 @@ async function update (peertubeHelpers, transcodingManager, settingsManager) {
async function removePrevious (transcodingManager) {
transcodingManager.removeAllProfilesAndEncoderPriorities()
}
function buildResult (profile) {
return {
outputOptions: profile.outputOptions,
inputOptions: profile.inputOptions,
scaleFilter: profile.scaleFilter
}
}