--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/8b4b24c8-20b9-4cc7-b5ce-f1286874c479%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
this.stream = child_process.spawn("ffmpeg", [ "-i", this.url, "-rtsp_transport", "tcp",'-f', 'mpeg1video', '-b:v', '800k', '-r', '30', '-'], {
detached: false
});
this.inputStreamStarted = true;
this.stream.stdout.on('data', function(data) {
return self.emit('mpeg1data', data);
});
this.stream.stderr.on('data', function(data) {
return self.emit('ffmpegError', data);
});
this is part of the code in the object I wrote, just spawning this child process and wait for events in the wrapper.
Its not a problem that the solution is clustering or queue because each request execute at the moment its arrive. When I open the Task Manager
I can see only 5 process of ffmpeg.exe , I tried to create manually the process from the cmd line and still, the maximum is 4~5 processes.
Any Idea?
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/bd610254-3ddb-4fde-ab9b-9614f58284e0%40googlegroups.com.
On Mon, Jun 29, 2015 at 10:37 AM, Matt <hel...@gmail.com> wrote:
> You've exhausted the threadpool. Try setting the UV_THREADPOOL_SIZE env var
> higher and see if you can spawn more.
Child processes don't go through the thread pool.
The spawn is synchronous, the IPC (if any) on stdio is async, uses
pipes, and goes through the epoll() event loop.
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CACmrRmQ1rT1QLPNm9KN7xVZ9G98hEjTGGcyP3ijs5_PEF4%2B2Sg%40mail.gmail.com.
new Mpeg1Muxer({
url: this.streamUrl,
timer: this.timer,
name: this.name,
sid : this.stream_id
});
(function() {
var Mpeg1Muxer, child_process, events, util;
child_process = require('child_process');
util = require('util');
events = require('events');
Mpeg1Muxer = function(options) {
var self;
self = this;
this.url = options.url;
this.timer = options.timer;
this.name = options.name;
this.sid = options.sid;
var fs = require('fs');
var dir = 'LOCATION_DIR';
if (!fs.existsSync(dir)){
fs.mkdirSync(dir);
}
this.stream = child_process.spawn("ffmpeg",['-i',this.url,'-t',this.timer/1000,'-preset','ultrafast','-threads','2','-r',(1/3),'-an','-y','-update','1','SOME_DIR/1.jpg'] , {
detached: false
});
this.inputStreamStarted = true;
this.stream.stdout.on('data', function(data) {
return self.emit('mpeg1data', data);
});
this.stream.stderr.on('data', function(data) {
return self.emit('ffmpegError', data);
});
return this;
};
util.inherits(Mpeg1Muxer, events.EventEmitter);
module.exports = Mpeg1Muxer;
}).call(this);