mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-04 17:01:40 -05:00
fix
This commit is contained in:
parent
32f79e7eb0
commit
4702c1cbd4
2 changed files with 7 additions and 5 deletions
10
main.js
10
main.js
|
@ -37,8 +37,8 @@ let logger = new(winston.Logger)({
|
|||
new(winston.transports.Console)({
|
||||
level: 'success'
|
||||
}),
|
||||
new(winston.winston.transports.File)({
|
||||
file: __dirname + '/process.log',
|
||||
new(winston.transports.File)({
|
||||
filename: __dirname + '/process.log',
|
||||
colorize: true,
|
||||
timestamp: true,
|
||||
json: true,
|
||||
|
@ -67,10 +67,12 @@ let spawn = function() {
|
|||
stdoutLines: 20
|
||||
})
|
||||
.videoCodec('copy');
|
||||
|
||||
if (config.customOutputOptions !== "")
|
||||
cmd.outputOptions(config.customOutputOptions.split(','));
|
||||
|
||||
if (config.customAudioOptions !== "")
|
||||
cmd.outputOptions(config.customAudioOptions.split(','));
|
||||
else
|
||||
cmd.AudioCodec('copy');
|
||||
cmd.on('start', function(commandLine) {
|
||||
status.running = 0;
|
||||
logger.log(importance[4], 'Spawned Ffmpeg with command: ' + commandLine);
|
||||
|
|
|
@ -4,7 +4,7 @@ const fs = require('fs');
|
|||
let pid;
|
||||
|
||||
let config = JSON.parse(fs.readFileSync('./config.js'));
|
||||
let p = spawn(`ssh -p ${config['ssh-port']} -f -N -R ${process.argv[2]}:localhost:22 -f -N -R 0.0.0.0:${process.argv[3]}:${config.camIP}:${process.argv[4]} ${config['ssh-user']}@${config.master.replace(/((http|https)\:\/{2}|\:[0-9]+)/g, '')} && pidof ssh`, {
|
||||
let p = spawn(`ssh -oStrictHostKeyChecking=no -p ${config['ssh-port']} -f -N -R ${process.argv[2]}:localhost:22 -f -N -R 0.0.0.0:${process.argv[3]}:${config.camIP}:${process.argv[4]} ${config['ssh-user']}@${config.master.replace(/((http|https)\:\/{2}|\:[0-9]+)/g, '')} && pidof ssh`, {
|
||||
shell: true,
|
||||
detached: false
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue