Reading mpeg4 dimensions and flv dimension using ruby

Hey guyz,
Well basically what i am trying to do is get ruby to read my video files
in so that i can get the dimensions of the video and then place the
dimension sizes in my view. The two formats i need to do this with are
mpeg4 (h.264) and FLV. Is there anyway i can get rails to access the
metadata of these formats and pull the dimensions from the metadata? Any
help would be greatly appreciated.
Thank you,

there is a ruby tool called FLVToole2 from
it parses FLV files and reads/writes metadata.

no idea about mp4, but if you don’t find any lib for that, you can
call ffmpeg from ruby

how do you call ffmpeg from ruby?

I seem to remember answering this very question here on the list, and
searching on shows it having been asked three times
already by
someone called Andrew (you or someone else), and answered twice.

Please see:

for a few answers.


with “system” or just the ffmpeg command inside ``, check out a ruby
tutorial on things like that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs