If you are dealing with videos in your application as opposed to use some online service such as brightcove you are probably familiar with ffmpeg. Have you ever had to use it to obtain meta data about video files in your Ruby/Rails application?
I have done some search online and I have found suggestions for PHP but nothing using Ruby. Naturally you can do it with Ruby code, and it's not terribly complicated, but you need to know a couple of tricks.
Let's suppose you have a video in some format and you need to obtain its duration, width and height. This is all you need to do: