Ask A Question


You’re not receiving notifications from this thread.

Would you transcode video in your Rails app or with an external service?

Daniel Weaver asked in Rails

I'm building an app that takes file uploads from a user and creates videos from them. I have the simplest-possible MVP runnign for it right now with a plain HTML form sending the contents to a serverless function on Zeit Now which returns a video URL.

Now I want user auth, proper database storage and start charging for it I'm building it out as a full Rails app.

My two options seem to be:

  1. Upload the user files to the Rails app and do the video encoding in a background job then finally upload to S3 (shown in Episode #150 Shrine Backgrounding and Video Transcoding

  2. Or I could use Active Storage to upload the source files direct to S3 and continue to use my Zeit Now serverless function to create the video via webhook calls.

Which would you choose and why? 🤔


I'm sticking with the external service for now. The biggest advantage is that it's already written and working.

Each video encode takes around 10 seconds and if I get a lot of users the server resources would need careful management in a Rails implementation. With the Zeit Now function it just scales automatically and can handle any number of encodes.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,969+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.