尝试将.gif
转换为.mp4
:
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var ffmpeg = require('fluent-ffmpeg');
var proc = new ffmpeg({ source: 'myfile.gif' })
.withAspect('4:3')
.withSize('640x480')
.applyAutopadding(true, 'white')
.saveToFile('myfile.avi', function(stdout, stderr) {
console.log('file has been converted succesfully');
});
app.listen(3000, function() {
console.log("Server Running on 3000");
});
在Windows 10和Ubuntu 14上获得相同的错误:Error: Cannot find ffmpeg
。
代码有什么问题?请帮忙。