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. -- Posted via http://www.ruby-forum.com/.
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 On 26/05/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. > > Cheers. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
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.
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. -- Posted via http://www.ruby-forum.com/.
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. -- Posted via http://www.ruby-forum.com/.
On 5/26/06, Ken Kam <kenkam@gmail.com> wrote:> 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. >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.