Thanks for filling out our form!
Here's what happens next:

We'll write you back as soon as possible, right now we might be very busy saving the World. Give us a day or two, we'll contact you for sure.


In the meantime, perhaps you would like to take a look at one of our blog posts that explains

How do we work with our Clients
How we can help you with your business

In Touch,
Prograils Team

Prograils blog

Jarek Jeleniewicz on 06.01.15 in Ruby on Rails
Post carrer wave   video conversion

CarrierWave - basic video conversion

Months ago we wrote about video converting with CarrierWave. Implementation with Voyeur gem is pretty outdated at the moment, so we though we could share something more up to date

Months ago we wrote about video converting with CarrierWave. Implementation with Voyeur gem is pretty outdated at the moment, so I though that I could write something more up to date. This time I have used streamio-ffmpeg. However, this may not work with the latest ffmpeg builds. ffmpeg itself is required and needs to be installed manually, for example with homebrew on OSX. I have used the following code with ffmpeg version 2.4.4.

Add to your gemfile:

gem 'streamio-ffmpeg'

Custom processor will look like this (lib/carrierwave_processing/):

and your CarrierWave uploader will be something like:

You also need an initializer that will load your custom processor (config/initializers/carrierwave_processors.rb)

If you also need to use different formats of uploaded file in views you need to add some code to uploader mounted in your model. In my case, I have post model.

And now you are ready to convert some media files ;)

This is first part of bigger series about CarrierWave and video conversion. Stay tuned for more!

Sample app, that illustrates this blog post can be found here: prograils/video-converter-test

Photo by: startupstockphotos.com

Share on
comments powered by Disqus