下载并安装ffmpeg
http://ffmpeg.org/download.html?aemtn=tg-on
https://www.gyan.dev/ffmpeg/builds/
配置环境变量:
查询版本
装包:
yarn add fluent-ffmpeg
const ffmpeg = require('fluent-ffmpeg')
ffmpeg('/temp/ai/hello.webm')
.output(`/temp/ai/hello-${Date.now()}.mp3`)
.on('end', function () {
console.log('Finished processing')
})
.run()