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:
- Memory leak after dealing with multiple buffers.
- Converting 2 buffers simultaneity can can be very slow on a singleton app.
The Alternative is:
Write the buffer stream to a temp directory using ffmpeg-stream .
Afterwards combine the temporary files fluent-ffmpeg.
- Example of creating temp files with nodeJS node-tmp
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.