私はこれを理解しようとする悪夢を見ています。昨日これについて質問しましたが、これまでのところ、簡単に言えば、私の人生ではこれを理解することはできません.
私がやりたいのは、node.jsアプリでFFmpegを使用して.aviファイルを.flvファイルにトランスコードすることだけです。これはFFmpegのコマンドラインを使用するだけで機能しますが、アプリでは機能しません。コードは次のとおりです。
var ffmpeg = require('fluent-ffmpeg');
//make sure you set the correct path to your video file
var proc = new ffmpeg({ source: 'C:/Users/Jay/Documents/movie/drop.avi', nolog: true });
//Set the path to where FFmpeg is installed
proc.setFfmpegPath("C:\\Users\\Jay\\Documents\\FFMPEG\\bin");
proc
//set the size
//.withSize('50%') <-- error appears after this line
// set fps
//.withFps(24)
// set output format to force
//.toFormat('flv')
// setup event handlers
.on('end', function() {
console.log('file has been converted successfully');
})
.on('error', function(err) {
console.log('an error happened: ' + err.message);
})
// save to file <-- the new file I want -->
.saveToFile('C:/Users/Jay/Documents/movie/drop.flv');
上記で指定した行にエラーが表示されます。赤字のエラーではありませんが、単に次のように表示されます。
an error happened: spawn ENOENT
誰かがこれに出くわしましたか?