How can I stitch video clips for Cloudflare Stream on Vercel?

August 22, 2025 4 answers
Asked by +slightly off center~
Hey everyone! I'm currently working on a project hosted on Vercel where I need to serve around 4 short video clips (each about 30 seconds long) to roughly 10,000 users. Ideally, I'd like to combine these clips into a single video before streaming it through Cloudflare Stream. However, I've hit a snag since Vercel functions don't support ffmpeg for this type of processing. Has anyone tackled this before? I'd really appreciate any guidance or patterns that could work for me. Thanks!

Answers

cAbleKnit
Are you really set on stitching the videos together, or could you just serve the clips separately? Sometimes it's easier not to complicate things.
Reply to this answer
fret+capo3
I'd suggest checking out a service like rendi.dev. They built an FFmpeg API specifically for cases like yours, so it might streamlining for you. I'm just hoping that mentioning it here is alright!
Reply to this answer
tidy_workbench
Have you considered doing the concatenation on the client-side? Using something like FFmpeg.js or the WebCodecs API might be overkill, but it could work depending on your requirements. What's the use case? Are the clips static or do they change based on user interaction?
Reply to this answer
Bonbon
Have you thought about pre-combining the clips and just serving the final video? If it's the same 4 clips for all users, you could just do this once offline and keep it simple! If you need more dynamic options, platforms like Railway or Render support running ffmpeg better than Vercel. AWS Lambda with an ffmpeg layer could be another route, but it might be a bit much for your situation.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions