framework for Montage API++++
parent
75aac6416d
commit
fc25c7706a
|
@ -829,11 +829,9 @@ module.exports = (s,config,lang) => {
|
|||
monitorsInputs.push(buildMainInput(monitor,null,monitorCopy))
|
||||
})
|
||||
if(monitorsInputs.length < 9){
|
||||
var pipeStart = 6
|
||||
const numberOfInputsToAdd = 9 - monitorsInputs.length
|
||||
for (let i = 0; i < numberOfInputsToAdd; i++) {
|
||||
monitorsInputs.push(`-loop 1 -i ${s.mainDirectory + '/web/libs/img/bg.jpg'}`)
|
||||
++pipeStart
|
||||
}
|
||||
}
|
||||
return monitorsInputs
|
||||
|
@ -842,9 +840,8 @@ module.exports = (s,config,lang) => {
|
|||
let ffmpegParts = []
|
||||
const groupKey = monitors[0].ke
|
||||
const monitorsForMontage = filterMonitorsListForMontage(monitors)
|
||||
const monitorsInputs = reusePriorConsumption ?
|
||||
buildMontageInputsFromPriorConsumption(monitorsForMontage) :
|
||||
buildMontageInputsFromSource(monitorsForMontage);
|
||||
// const monitorsInputs = !!reusePriorConsumption ? buildMontageInputsFromPriorConsumption(monitorsForMontage) : buildMontageInputsFromSource(monitorsForMontage);
|
||||
const monitorsInputs = buildMontageInputsFromPriorConsumption(monitorsForMontage);
|
||||
ffmpegParts.push(`-loglevel warning`)
|
||||
ffmpegParts.push(...monitorsInputs)
|
||||
ffmpegParts.push(calculateFilterComplexForMontage(monitorsForMontage))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module.exports = (s,config,lang) => {
|
||||
function buildMontageInputsFromPriorConsumption(monitorsForMontage){
|
||||
const inputs = []
|
||||
const monitorsInputs = []
|
||||
monitorsForMontage.forEach((monitor) => {
|
||||
const groupKey = monitor.ke
|
||||
const monitorId = monitor.mid
|
||||
|
@ -20,16 +20,15 @@ module.exports = (s,config,lang) => {
|
|||
// streamURL = '/'+req.params.auth+'/mp4/'+v.ke+'/'+v.mid+'/s.mp4'
|
||||
// break;
|
||||
}
|
||||
if(streamURL)inputs.push(`-i ${streamURL}`)
|
||||
if(streamURL)monitorsInputs.push(`-re -i ${streamURL}`)
|
||||
})
|
||||
if(monitorsForMontage.length < 9){
|
||||
var pipeStart = 6
|
||||
for (let i = 0; i < monitorsForMontage.length - 9; i++) {
|
||||
monitorsInputs.push(`-i pipe:${pipeStart}`)
|
||||
++pipeStart
|
||||
if(monitorsInputs.length < 9){
|
||||
const numberOfInputsToAdd = 9 - monitorsInputs.length
|
||||
for (let i = 0; i < numberOfInputsToAdd; i++) {
|
||||
monitorsInputs.push(`-loop 1 -i ${s.mainDirectory + '/web/libs/img/bg.jpg'}`)
|
||||
}
|
||||
}
|
||||
return inputs
|
||||
return monitorsInputs
|
||||
}
|
||||
function filterMonitorsListForMontage(monitors){
|
||||
let monitorsSelected = ([]).concat(monitors).filter((monitor) => {
|
||||
|
|
|
@ -881,7 +881,6 @@ module.exports = function(s,config,lang,app,io){
|
|||
const theGroup = s.group[groupKey]
|
||||
const monitors = s.getPostData(req,'monitors',true)
|
||||
const reusePriorConsumption = req.query.reuse === '1'
|
||||
console.log('reusePriorConsumption',reusePriorConsumption)
|
||||
const monitorsToMontage = []
|
||||
monitors.forEach((monitorId) => {
|
||||
const monitorConfig = s.group[groupKey].rawMonitorConfigurations[monitorId]
|
||||
|
|
Loading…
Reference in New Issue