node.js で exec を使用する理由:
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!");
});
エラーが発生します:
exec error: Error: Command failed: /bin/sh: avconv: command not found
bashでは普通に実行できます。node.js の開発には、nodeclipse を使用します。