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