Skip to main content

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

Rails • Asked by Daniel Weaver

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.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.