rtsp: remove from app (-> https://github.com/jean-emmanuel/rtsp2osc)
This commit is contained in:
parent
dfdac01bf3
commit
9b9a8b45fb
2 changed files with 0 additions and 34 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue