# Dealing with media file formats and RMagick

**URL:** <https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610>\
**Category:** Rails\
**Created:** [May 16, 2006, 4:00am UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610 "2006-05-16T04:00:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![samonderous](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@samonderous](https://www.ruby-forum.com/u/samonderous)\
**Post date:** [May 16, 2006, 4:00am UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610/1 "2006-05-16T04:00:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![samonderous](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@samonderous](https://www.ruby-forum.com/u/samonderous)\
**Post date:** [May 16, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610/2 "2006-05-16T19:35:58Z")

</div>

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](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=130)  
[http://www.db75.com/new\_blog/?p=211](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

---

<div class="post-metadata">

**Author:** ![samonderous](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@samonderous](https://www.ruby-forum.com/u/samonderous)\
**Post date:** [May 21, 2006, 8:25pm UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610/3 "2006-05-21T20:25:59Z")

</div>

> > > 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.

---

<div class="post-metadata">

**Author:** ![samonderous](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@samonderous](https://www.ruby-forum.com/u/samonderous)\
**Post date:** [May 16, 2006, 9:19pm UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610/4 "2006-05-16T21:19:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![samonderous](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3da27b/32.png) [@samonderous](https://www.ruby-forum.com/u/samonderous)\
**Post date:** [May 22, 2006, 10:35am UTC](https://www.ruby-forum.com/t/dealing-with-media-file-formats-and-rmagick/60610/5 "2006-05-22T10:35:51Z")

</div>

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.
