Forum: Ruby on Rails Upload AVI convert to quicktime/flash

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
539a351d5e60062693df414e9bbb3465?d=identicon&s=25 Ken (Guest)
on 2006-05-27 00:57
Is there a way to upload an AVI and convert it into quicktime, or flash,
and generate an output in those format(s).

Like YouTube...

I have no idea how that is done. I am fascinated and was wondering if it
was possible.

Cheers.
D5145c421cd25af6fa577c15219add90?d=identicon&s=25 unknown (Guest)
on 2006-05-27 01:15
(Received via mailing list)
Unless there's something already written, I assume you'll have to find
a program which does this and has a command line interface (Google(avi
mov command line)). That's how I used to handle zip files in the ASP
3.0 days. I expect Ruby, like most languages, has a way of doing
things from the command line. I don't know if there's another way, but
I hope this has pointed you in the right direction. You'll have to do
a bit of research yourself into what program to use and the Ruby
syntax, unless someone else here already knows.
-Nathan
25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-05-27 01:15
(Received via mailing list)
On 5/26/06, Ken <kenkam@gmail.com> wrote:
> Is there a way to upload an AVI and convert it into quicktime, or flash,
> and generate an output in those format(s).
>
> Like YouTube...
>
> I have no idea how that is done. I am fascinated and was wondering if it
> was possible.
>

Sure.
1. Accept a file upload (preferably via a small cluster of Mongrels,
so you don't lock up the app during the long process)
2. Tell the user their upload completed
3. Send a message to, say, BackgrounDRb containing the file path you
want to convert.
4. Have the background process do a system() call to some external
tool that converts the video for you. There are numerous good choices,
depending on your OS.
5. Mark the content as being converted in your app's DB when the
process completes.
6. Buy more servers as you start getting popular.
539a351d5e60062693df414e9bbb3465?d=identicon&s=25 Ken Kam (kenkam)
on 2006-05-27 02:42
Wilson Bilkovich wrote:
> On 5/26/06, Ken <kenkam@gmail.com> wrote:
>> Is there a way to upload an AVI and convert it into quicktime, or flash,
>> and generate an output in those format(s).
>>
>> Like YouTube...
>>
>> I have no idea how that is done. I am fascinated and was wondering if it
>> was possible.
>>
>
> Sure.
> 1. Accept a file upload (preferably via a small cluster of Mongrels,
> so you don't lock up the app during the long process)
> 2. Tell the user their upload completed
> 3. Send a message to, say, BackgrounDRb containing the file path you
> want to convert.
> 4. Have the background process do a system() call to some external
> tool that converts the video for you. There are numerous good choices,
> depending on your OS.
> 5. Mark the content as being converted in your app's DB when the
> process completes.
> 6. Buy more servers as you start getting popular.

Wow

Thanks for pointing me to BackgrounDRb. This thing looks very promising.

Just a quick question. Can I use fcgi instead of mongrel? What's the
difference?

And I look the last point of your list. Ha ha.
539a351d5e60062693df414e9bbb3465?d=identicon&s=25 Ken Kam (kenkam)
on 2006-05-27 02:42
Wilson Bilkovich wrote:
> On 5/26/06, Ken <kenkam@gmail.com> wrote:
>> Is there a way to upload an AVI and convert it into quicktime, or flash,
>> and generate an output in those format(s).
>>
>> Like YouTube...
>>
>> I have no idea how that is done. I am fascinated and was wondering if it
>> was possible.
>>
>
> Sure.
> 1. Accept a file upload (preferably via a small cluster of Mongrels,
> so you don't lock up the app during the long process)
> 2. Tell the user their upload completed
> 3. Send a message to, say, BackgrounDRb containing the file path you
> want to convert.
> 4. Have the background process do a system() call to some external
> tool that converts the video for you. There are numerous good choices,
> depending on your OS.
> 5. Mark the content as being converted in your app's DB when the
> process completes.
> 6. Buy more servers as you start getting popular.

Wow

Thanks for pointing me to BackgrounDRb. This thing looks very promising.

Just a quick question. Can I use fcgi instead of mongrel? What's the
difference?

And I like the last point of your list. Ha ha.
25e11a00a89683f7e01e425a1a6e305c?d=identicon&s=25 Wilson Bilkovich (Guest)
on 2006-05-27 03:46
(Received via mailing list)
On 5/26/06, Ken Kam <kenkam@gmail.com> wrote:
> >
> > process completes.
>
You could use FCGI, but Mongrel has a much easier and cooler way to
set up clusters, which you will quickly need to keep your sanity.
Might as well start off right.
It's also about 100 times easier to install than FastCGI.
This topic is locked and can not be replied to.