我想:
const passthroughStream = new PassThrough()
ffmpeg(stream).audioBitrate(8)
.output(passthroughStream, { end: true })
.on('progress', (p) => console.log(p))
.on('error', (err) => console.log(err))
const bucketStreamParams = {
Bucket: 'mybucket',
Key: outputFilename,
Body: passthroughStream
}
const s3Response = await s3.upload(bucketStreamParams).promise()
但似乎什么也没有发生。我以为PassThrough
会处理这个问题,但似乎没有。任何帮助将不胜感激。
我需要添加一个.format
然后它起作用了:
ffmpeg(stream)
.format('mp3')
.output(passthroughStream, { end: true })
.on('error', (err) => console.log(err))
.run()
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)