Comments (1)
I finally found out the solution! And what I miss is I have to add input and output format
.inputFormat('mp4')
.outputFormat('mp3')
example
private async getOutputStream(props: {
inputStream: AxiosResponse;
output: {
bucketName: string;
key: string;
};
}): Promise<
CompleteMultipartUploadCommandOutput | AbortMultipartUploadCommandOutput
> {
const output = props.output;
const passThrough = new PassThrough();
const upload = new Upload({
client: this.client,
params: { Bucket: output.bucketName, Key: output.key, Body: passThrough },
queueSize: this.CONCURRENCY,
partSize: this.PART_SIZE,
leavePartsOnError: false,
});
// Convert vdo to mp3 and upload to s3
ffmpeg(props.inputStream.data)
.inputFormat('mp4')
.outputFormat('mp3')
.on('start', () => {
console.log('Processing....');
})
.on('error', (err) => {
console.log('An error occurred: ' + err.message);
})
.on('end', () => {
console.log('Processing finished !');
})
.pipe(passThrough, { end: true });
return await upload.done();
}
from node-fluent-ffmpeg.
Related Issues (20)
- FFmpeg Error: Error: Output format wav is not available HOT 3
- Is it possible to write multiple output files from a complex filter? HOT 1
- How to record screen on Mac?
- How to add cover image to audio on the "fly" (stream) ?
- pass text file to complexFilter
- ffmpeg : ffmpeg error :Output format xxx is not available HOT 1
- Error: Cannot find ffmpeg on Azure Function HOT 1
- Take url as input HOT 2
- How do I use transitions in fluent-ffmpeg
- When I install v2.1.3 package is really large and contains coverage directory
- Error: Input format lavfi is not available
- ReferenceError: `__dirname` is not defined
- Property 'on' does not exist on type 'FfmpegCommand'. Did you mean to access the static member 'FfmpegCommand.on' instead? HOT 4
- Crash when setting ffmpeg path after successfully converting
- vstack passthrough stream of buffered images HOT 1
- Crush on second instance of ffmpeg HOT 1
- Input format v4l2 is not available
- Can someone help me use fetch to transcode and return a response object that is a stream? HOT 1
- Input Format dshow is not avaiable
- ReferenceError: setImmediate is not defined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-fluent-ffmpeg.