I'm using node.js as a web server (fluent-ffmpeg as the ffmpeg library).
I have two videos on amazon s3, when I retrieve them, they come as Buffer objects.
I'd like to retrieve them, combine them, and send them to the client, without having to save them as files.
There is a case where you can store the buffers into memory, and read from memory to combine both of them. But this have some serious implications and not advised to do:
The Alternative is:
Write the buffer stream to a temp directory using ffmpeg-stream .
Afterwards combine the temporary files fluent-ffmpeg.
related questions: 1. Merge Multiple Videos using node fluent ffmpeg
If this is a huge set of videos, aka album to be combined (like 2Gb per video), services like AWS Lambda could essentially help. Since the service stores buffers, and doesn't fail to run multiple jobs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With