如何在nodejs中将mp4转换为flv

时间:2016-08-03 10:52:52

标签: node.js npm

我是nodejs的新手。我需要将任何视频转换为.flv格式。是否可以在nodejs中进行视频转换。我尝试了下面的

var converter = require('format-converter');

converter.setFfmpegPath("ffmpeg");


converter.convert("/home/ults/Downloads/Best Catches in Cricket History! Best Acrobatic Catches! (Please comment the best catch).mp4", "/home/ults/Best Catches in Cricket History! Best Acrobatic Catches! (Please comment the best catch).mp3", function(err) {
    if (err) throw err;
    console.log("done");
});

// get the percentage
converter.on("progress", function(percentage) {
    console.log(percentage);
});

请帮助..

0 个答案:

没有答案