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

0
1
Asked By PixelPanda42 On

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!

4 Answers

Answered By CuriousCoder99 On

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.

Answered By TechieTina On

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?

Answered By VideoGuru123 On

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!

Answered By DevWhiz On

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.

Related Questions

Extract Audio From Video File

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.