bash - Why node.js can not find the avconv? -


why using exec in node.js:

child = exec("avconv -i " + result.params.fulldestinationfilename + " -ab 128k -vcodec libx264 -vb 2000k -r 24 -s 1280x720 " + convertedfilename720p + ".mp4", function (error, stdout, stderr) {     sys.print('stdout: ' + stdout);     sys.print('stderr: ' + stderr);     if (error !== null) {         console.log('exec error: ' + error);     }     console.log("converted!"); }); 

i error:

  exec error: error: command failed: /bin/sh: avconv: command not found 

in bash can execute normally. node.js development use nodeclipse.

for reference

var exec = require('child_process').exec; exec("ls -la");     

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -