Dealing with media file formats and RMagick

Hello,

I basically have the following problem - I have a site that will allow
people to upload videos. The video may be in any format - .mov, .avi,
.wmv
etc… I can either use embedded Windows Media Player, or embedded
Quicktime
to play the files but the problem is, how do I create stills from the
movies
to display them as .jpg’s on my site so when somebody clicks on them,
the
video starts playing? RMagick only supports .avi files. Are there any
other packages out there for Rails?

Thanks.

what platform are you on?
you may have some luck with the ffmpeg project which supports many video
formats:
http://ffmpeg.sourceforge.net/index.php

and then read these:
http://www.db75.com/new_blog/?p=130
http://www.db75.com/new_blog/?p=211

I’m sure within all that there is an answer to your question.
also, makes me wonder if I should be doing that for something…

dorian

Thanks.

+1 for ffmpeg. I’m using mencoder/mplayer in a project (which uses
ffmpeg) and it handles anything I throw at it. It creates stills and
can even convert to flv. I would really love a ruby friendly module
though.

As for windows, I’ve seen folks use Sorensen Squeeze for this sort of
thing. I believe it can watch a directory and convert videos as
they’re dropped in. Be prepared to pay some $$$ for anything on
Windows though.

I’m on Windows. So I guess these may not help unless they have a
windows
version. Bummer, do you have anything else? A lot of the Macromedia
Flash
stuff could possibly help here. They have a way of doing the encoding
and
converting into .flv. Although, still trying to figure out how to do it
automatically. Anything else on the Windows side would be helpful.

Thanks a bunch.

One of the blog posts listed by Dorian shows how to fork off an ffmpeg
process to do the conversion on-demand. Is there a way to use IO.popen
to
collect some kind of status after the conversion has completed to know
when
the conversion is done? There seems to be a ffmpeg for Windows too.

Thanks.