I am waiting for requests, you can parse it as for loop that create those 
objects -
new Mpeg1Muxer({
           url: this.streamUrl,
  timer: this.timer,
  name: this.name,
  sid : this.stream_id
    });


And the implementation of this object is :

(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);


this is not the problem of the implementation in the code, its problem of 
the limitation of "FFMPEG" processes that I can create.
If you have other solutions, I would like to hear! 
thanks anyway.



On Monday, July 6, 2015 at 4:04:15 AM UTC+3, Sam Roberts wrote:
>
> Can you provide minimal code to reproduce this problem? I could try 
> and build it from your example, but don't have time, if you gave me a 
> snippet I could just run, I would, and could see what your issue is. 
>
>
> On Mon, Jun 29, 2015 at 10:37 AM, Matt <[email protected] <javascript:>> 
> 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. 
>
> -- 
> http://StrongLoop.com makes it easy to develop APIs in Node, plus get 
> DevOps capabilities like monitoring, debugging and clustering. 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/4d5dfdca-cb27-4804-8fac-d89471fb0099%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to