Search code examples
ruby-on-railsrubylinuxvideovideo-encoding

Converting video to flash and mp4 ruby on rails?


I'm currently the lead dev (read only dev!) on a website for our youth church called base..

http://mybase.co

At the moment i'm working on a "2.0" style iteration of the site hoping to make it more content rich and more mobile friendly..

We have been using Vimeo to host our videos but would like to start hosting our own videos so that when we wanna do an iphone app for streaming the latest content we've got a big catalog of videos on our own server ready to go, plus it gives us a lot of other flexibility..

I'm looking for a way of converting videos when we upload them to both a flash version and an iOS ready version.

The site is built on ruby on rails and hosted on a Ubuntu 10.04 server i have full root access to the server and can install anything necessary..

Basically what i'm asking is:

  1. Whats the easiest way of converting videos from ruby (i've heard some buzz about FFMPEG)
  2. Is it gonna totally hog the resources? (its a virtualized server with 1.5GB of ram hosting 2 other sites so anyway to keep resource usage down would be awesome even if it takes a few hours to convert)
  3. Is there a "nice" way of doing it? (a clean API as apposed to shelling out using system("convert ma videoze") )

Thanks :)

Daniel


Solution

    1. FFMPEG is really what you need here.

    2. As more jobs you'll send to it, as more it will eat of your RAM. But you can organize simple queue and background job for converting video.

    3. I have never used gems for it but you can look this list: