This commit is contained in:
jean-emmanuel 2018-03-27 17:34:28 +02:00
parent 774416af96
commit 998076a2d4
2 changed files with 0 additions and 34 deletions

View file

@ -59,38 +59,6 @@ var bindCallbacks = function(callbacks) {
}
// video streams
var rtsp = require('rtsp-ffmpeg'),
urls = settings.read('videoStreams'),
streams = {},
framerate = 10,
resolution = undefined
for (var i in urls) {
if (/framerate\s*=\s*[0-9]+/.test(urls[i])) {
framerate = Math.max(Math.min(parseInt(urls[i].split('=').pop()), 60), 0)
}
if (/resolution\s*=\s*[0-9]+x[0-9]+/.test(urls[i])) {
resolution = urls[i].split('=').pop().trim()
}
}
urls = urls.filter(item => item.indexOf('rtsp://') > -1)
for (let i = 0; i < urls.length; i++) {
streams[i] = new rtsp.FFMpeg({
input: urls[i],
rate: framerate,
resolution: resolution,
})
streams[i].on('data', (data)=>{
ipc.send('video', [i, data.toString('base64')])
})
}
///
console.log('App available at ' + appAddresses.join(' & '))
module.exports = {

View file

@ -56,7 +56,6 @@ var options = {
true : 'examples can\'t be listed if --load is set'
}
},
'video-streams':{type:'array',describe:'video stream urls (rtsp://)'},
'url-options':{type:'array',describe:'url options (opt=value pairs)',
check: (u, argv)=>{
return (!u || !argv.n) ?
@ -121,7 +120,6 @@ var makeDefaultConfig = function(argv){
sessionFile: argv.l || false,
newSession: argv.b || false,
customModule: argv.c || false,
videoStreams: argv['video-streams'] || [],
fullScreen: argv['fullscreen'] || false,
noGui: argv.n || false,
guiOnly: typeof argv.g == 'string' ? argv.g.length ? argv.g : true : false,