Max Williams
Max Williams

Reputation: 32945

Video upload to Heroku with Paperclip - How to make thumbnails?

I've just added video uploading with paperclip to a Rails 3 app I have on Heroku. It works fine but I don't know how to generate thumbnails for the videos. I guess I should use one of the video processing add-ons in heroku?

Any recommendations for which are easiest to connect to Paperclip?

Upvotes: 4

Views: 2207

Answers (1)

Christian Fazzini
Christian Fazzini

Reputation: 19723

We currently use the Zencoder encoding service to encode video uploads. Which is great, because their service provides thumbnail generation on video files.

I would advise doing any resource intensive processes, such as encoding, outside the web app. As this can take an entire HTTP Request handler (or in your case a web dyno). Sure you can request for more web dynos. But these are expensive.

An alternative option is to do the processing in the background. But such tasks would be better off outside the web server. This is where an API service like Zencoder comes well.

Here's a set of instructions to get you started.

Another alternative is Panda Stream. Which Heroku does offer as an addon. Both Panda Stream and Zencoder will do what you need. Both also go on different price models. Unfortunately, I cannot give you any more info on Panda, since I haven't used them.

As far as which uploader to use. Paperclip will do the job fine. I am guessing, since you are using Heroku, and you are uploading to Amazon S3. On our environment, we are using Carrierwave.

Upvotes: 5

Related Questions