Socket
Socket
Sign inDemoInstall

screencap

Package Overview
Dependencies
4
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

37

lib/screencap-linux.js

@@ -78,3 +78,3 @@ var ffmpeg = require('fluent-ffmpeg');

};
this.pipe = function(res) {
this.capturePipe = function(duration,res) {
console.log("Starting Screen Capture: Duration ", duration, " seconds");

@@ -88,3 +88,7 @@ console.log("Screen Capture Piped");

.addOptions([
"-movflags frag_keyframe+faststart"
"-movflags frag_keyframe+faststart",
"-preset ultrafast",
"-tune zerolatency",
"-threads 0",
"-async 1"
])

@@ -97,9 +101,28 @@ .input(':0.0+0,0')

.on('end', function() {
console.log('Screen Capture Completed.');
console.log('file has been converted succesfully');
})
.output(pipe)
.on('error', function(e) {
console.log("ERROR:",e);
});
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
.pipe(res, {end:true});
};
this.shotPipe = function(res) {
console.log("Starting Screen Shot");
console.log("Piping");
ffmpeg()
.videoBitrate(this.videoBitrate)
.audioBitrate(this.audioBitrate)
.duration('0.1')
.input(':0.0+0,0')
.inputOptions([
'-f x11grab'
])
.on('end', function() {
console.log('file has been converted succesfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
.pipe(res, {end:true});
};

@@ -106,0 +129,0 @@ return this;

38

lib/screencap-mac.js

@@ -78,3 +78,3 @@ var ffmpeg = require('fluent-ffmpeg');

};
this.pipe = function(res) {
this.capturePipe = function(duration,res) {
console.log("Starting Screen Capture: Duration ", duration, " seconds");

@@ -88,3 +88,7 @@ console.log("Screen Capture Piped");

.addOptions([
"-movflags frag_keyframe+faststart"
"-movflags frag_keyframe+faststart",
"-preset ultrafast",
"-tune zerolatency",
"-threads 0",
"-async 1"
])

@@ -97,10 +101,28 @@ .input('video=0')

.on('end', function() {
console.log('Screen Capture Completed.');
console.log('file has been converted succesfully');
})
.output(pipe)
.on('error', function(e) {
console.log("ERROR:",e);
});
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
.pipe(res, {end:true});
};
this.shotPipe = function(res) {
console.log("Starting Screen Shot");
console.log("Piping");
ffmpeg()
.videoBitrate(this.videoBitrate)
.audioBitrate(this.audioBitrate)
.duration('0.1')
.input('video=0')
.inputOptions([
'-f avfoundation'
])
.on('end', function() {
console.log('file has been converted succesfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
.pipe(res, {end:true});
};
return this;

@@ -107,0 +129,0 @@

@@ -41,6 +41,6 @@ 'use strict';

} else if (path.extname(output)==".gif") {
var screen = screencap(output);
var screen = screencap({},output);
screen.gif('350',seconds);
} else if (path.extname(output)==".png") {
var screen = screencap(output);
var screen = screencap({},output);
screen.shot();

@@ -47,0 +47,0 @@ } else {

{
"name": "screencap",
"version": "0.0.5",
"version": "0.0.6",
"description": "A Screen Capture (Image & Video) Library",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc