mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-04 17:01:40 -05:00
output options
This commit is contained in:
parent
4702c1cbd4
commit
3abe835452
2 changed files with 13 additions and 7 deletions
|
@ -12,5 +12,7 @@
|
|||
"ssh-local-user": "alarm",
|
||||
"ssh-port": 22,
|
||||
"customOutputOptions": "",
|
||||
"customVideoOptions": "",
|
||||
"customAudioOptions": "-b:a 128k -ac 1 -ar 11025 -acodec libmp3lame",
|
||||
"configured": false
|
||||
}
|
||||
|
|
18
main.js
18
main.js
|
@ -63,16 +63,20 @@ let spawn = function() {
|
|||
ffmpeg.setFfmpegPath(config.ffmpegPath)
|
||||
delete cmd;
|
||||
cmd = ffmpeg({
|
||||
source: source,
|
||||
stdoutLines: 20
|
||||
})
|
||||
.videoCodec('copy');
|
||||
source: source,
|
||||
stdoutLines: 20
|
||||
});
|
||||
if (config.customOutputOptions !== "")
|
||||
cmd.outputOptions(config.customOutputOptions.split(','));
|
||||
cmd.outputOptions(config.customOutputOptions.replace(/\s+\,\s+/g, ',').replace(/\s+\-/g, ',-').split(','));
|
||||
if (config.customAudioOptions !== "")
|
||||
cmd.outputOptions(config.customAudioOptions.split(','));
|
||||
cmd.outputOptions(config.customAudioOptions.replace(/\s+\,\s+/g, ',').replace(/\s+\-/g, ',-').split(','));
|
||||
else
|
||||
cmd.AudioCodec('copy');
|
||||
cmd.AudioCodec('copy');
|
||||
if (config.customVideoOptions !== "")
|
||||
cmd.outputOptions(config.customVideoOptions.replace(/\s+\,\s+/g, ',').replace(/\s+\-/g, ',-').split(','));
|
||||
else
|
||||
cmd.videoCodec('copy');
|
||||
|
||||
cmd.on('start', function(commandLine) {
|
||||
status.running = 0;
|
||||
logger.log(importance[4], 'Spawned Ffmpeg with command: ' + commandLine);
|
||||
|
|
Loading…
Add table
Reference in a new issue