Vercel Serverless Functions 5MB body size limit

Viewed 679

I've just finished working on an application that besides everything converts a whole bunch of images into a video file using FFMPEG. The application is based on NextJS and the encoding is done on the NodeJS backend using NextJS API routes.

Everything works like a charm on the localhost, however when published on Vercel I get error 413 that is related to their 5mb body size limit (https://vercel.com/support/articles/how-to-bypass-vercel-5mb-body-size-limit-serverless-functions). If I understand correctly, they suggest me to send all my images to a third-party provider and then fetch them from there. I use Firebase for auth and general file storage. If I have a 2 minute video file that is running at 30 fps, that's 3600 images to send there which will I am afraid cost me a lot given there may be hundreds of video convertions a day.

What are my options in this case?

0 Answers
Related