Forum: Ruby on Rails make jpg thumbnails from vids in database

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.
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 Paul Smith (Guest)
on 2007-04-02 01:31
Hey does anyone know of any resources (web, books, anything) that could
explain how to make a rails app "read" a file in the database like a
video file and creates a jpg thumbnail?

This would be very helpful as I am trying to create a site where users
can uplaod video files, but I would like to have the rails app
automatically read and create a jpg thumbnail for preview before the
user downloads.

Thanks guys
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 Paul Smith (Guest)
on 2007-04-02 01:43
Paul Smith wrote:
> Hey does anyone know of any resources (web, books, anything) that could
> explain how to make a rails app "read" a file in the database like a
> video file and creates a jpg thumbnail?
>
> This would be very helpful as I am trying to create a site where users
> can uplaod video files, but I would like to have the rails app
> automatically read and create a jpg thumbnail for preview before the
> user downloads.
>
> Thanks guys


I don't knwo hwo to edit in these forums, but when I said read the file
I meant read the location fo the file in the database like
blank_video.avi and then generate a thumbnail from that .avi
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-02 13:37
(Received via mailing list)
I think you're looking for RMovie. http://rmovie.rubyforge.org/ :)

RSL
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 PaulSmith (Guest)
on 2007-04-03 23:27
That looks VERY useful thanks! Do you know of any online articles
explaining how to implement in Rails. Or if not would you use the code
in the model or something?
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-04 00:47
(Received via mailing list)
I don't recall an rmovie tutorial anywhere but you might want to keep
Googling. The model's the most logical place for it IMO. I've used it
before
but I wrote my own initialize method do, which is something most people
don't advocate from what I've read on the net. I'm reluctant to get more
specific because of that.

RSL
D0cd6b10e01bacb976b3b815a9c660bc?d=identicon&s=25 Alex Wayne (squeegy)
on 2007-04-04 00:59
Russell Norris wrote:
> I think you're looking for RMovie. http://rmovie.rubyforge.org/ :)
>
> RSL

Holy crap.  There is already a ruby version of almost everything.

I love this community.
486bc2e99e507e271cb2b8eaa6501b60?d=identicon&s=25 Mark (Guest)
on 2007-04-04 01:50
Any idea how to accomplish the same results (take a screenshot) from
Flash files instead of movie files?

Thanks.


Alex Wayne wrote:
> Russell Norris wrote:
>> I think you're looking for RMovie. http://rmovie.rubyforge.org/ :)
>>
>> RSL
>
> Holy crap.  There is already a ruby version of almost everything.
>
> I love this community.
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 PaulSmith (Guest)
on 2007-04-04 03:51
Well if it's flash video then rmovie can get thumbnails of it, but I
didn't say swf's, but as you can see I'm not exactly an expert on rmovie
haha

Mark wrote:
> Any idea how to accomplish the same results (take a screenshot) from
> Flash files instead of movie files?
>
> Thanks.
>
>
> Alex Wayne wrote:
>> Russell Norris wrote:
>>> I think you're looking for RMovie. http://rmovie.rubyforge.org/ :)
>>>
>>> RSL
>>
>> Holy crap.  There is already a ruby version of almost everything.
>>
>> I love this community.
D8649b527b046c7db1ce2617ede526a7?d=identicon&s=25 Paul Smith (Guest)
on 2007-04-04 05:09
Sorry about the double reply, but I don't know how to edit...One more
question on Rmovie. In order to use it ffmpeg would have to be installed
on the server right? if that's true do most hosting companies allow or
have a way to install ffmpeg? I am fairly new to rails and the various
hosting companies/methods so I'm not sure the best way to implement this
(mostly in terms of how to host it). Thanks for any help!

PaulSmith wrote:
> Well if it's flash video then rmovie can get thumbnails of it, but I
> didn't say swf's, but as you can see I'm not exactly an expert on rmovie
> haha
>
> Mark wrote:
>> Any idea how to accomplish the same results (take a screenshot) from
>> Flash files instead of movie files?
>>
>> Thanks.
>>
>>
>> Alex Wayne wrote:
>>> Russell Norris wrote:
>>>> I think you're looking for RMovie. http://rmovie.rubyforge.org/ :)
>>>>
>>>> RSL
>>>
>>> Holy crap.  There is already a ruby version of almost everything.
>>>
>>> I love this community.
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2007-04-04 12:53
(Received via mailing list)
On 04 Apr 2007, at 05:09, Paul Smith wrote:

> Sorry about the double reply, but I don't know how to edit...One more
> question on Rmovie. In order to use it ffmpeg would have to be
> installed
> on the server right? if that's true do most hosting companies allow or
> have a way to install ffmpeg? I am fairly new to rails and the various
> hosting companies/methods so I'm not sure the best way to implement
> this
> (mostly in terms of how to host it). Thanks for any help!

I doubt a shared hosting company will have ffmpeg installed by
default. However, it never hurts to ask. If you haven't decided on
your hosting yet, just include this question in your presales
inquiry. If you want total control over what will be installed, go
for a VPS instead.


Best regards

Peter De Berdt
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-04 15:46
(Received via mailing list)
You're going to most likely need to compile it on your own server. Not a
terribly difficult task. I've done it a few times. You'll need to look
into
how to compile it with flv or swf support though. I'm sure there's
something
out there in Google land. Dreamhost's wiki [ http://wiki.dreamhost.com/
]
has excellent instructions on compiling ffmpeg from source. Even if
you're
on a different host it'd probably server you well to give those docs a
once
over.

RSL
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 Paul Smith (Guest)
on 2007-04-04 16:56
I don't have a host yet so that's why I asked. I was actually looking
into dreamhost quite a bit, but is it as good as other Rails specific
hosting? The price is really good so I wasn't sure? Any input from
people who have used them would be great. And how much demand would
extracting and saving the thumbnail put on the server? Would it bog down
the server a lot?

Russell Norris wrote:
> You're going to most likely need to compile it on your own server. Not a
> terribly difficult task. I've done it a few times. You'll need to look
> into
> how to compile it with flv or swf support though. I'm sure there's
> something
> out there in Google land. Dreamhost's wiki [ http://wiki.dreamhost.com/
> ]
> has excellent instructions on compiling ffmpeg from source. Even if
> you're
> on a different host it'd probably server you well to give those docs a
> once
> over.
>
> RSL
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-04 19:28
(Received via mailing list)
I've got a few sites up on DH and I like it. They've had some problems
over
the past year but once they got them fixed it's been smooth sailing for
me.
Consensus on the mailing list is [obviously] going to vary. Most people
here, from what I gather, aren't running on shared hosting. I'm just not
ready or able to pop down that kind of money for a vps or whatever. DH
does
what I need, is incredibly customizeable, and [in my opinion] provides
really good customer service. YMMV

RSL
27d842adc36d4b835b164dc2606a5d17?d=identicon&s=25 Paul Smith (Guest)
on 2007-04-05 01:11
Thanks that helped a lot. I don't have that kind of cash either so I
think I'll go with them. Plus their wiki is REALLY helpful.

Russell Norris wrote:
> I've got a few sites up on DH and I like it. They've had some problems
> over
> the past year but once they got them fixed it's been smooth sailing for
> me.
> Consensus on the mailing list is [obviously] going to vary. Most people
> here, from what I gather, aren't running on shared hosting. I'm just not
> ready or able to pop down that kind of money for a vps or whatever. DH
> does
> what I need, is incredibly customizeable, and [in my opinion] provides
> really good customer service. YMMV
>
> RSL
91308e9bc88cb069fd1bcf88e910d042?d=identicon&s=25 Nick Snels (nicksnels)
on 2007-04-05 08:18
Hi Paul,

not everybody is so happy with Dreamhost and using Rails on it. You
might want to check out http://www.railshostinginfo.com and read the
comments about Dreamhost before you decide to go with them.

Kind regards,

Nick
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-05 16:50
(Received via mailing list)
That being said, keep in mind that forums tend to be full of complaints
when
things aren't working rather than praise because things are. There are a
lot
of people who _are_ happy with DH and don't post comments on random
review
sites because we're busy working on projects or doing things in our
non-job
lives. :)

RSL
00973881979aa0a660ffbbb2f7a907fb?d=identicon&s=25 Peter De Berdt (Guest)
on 2007-04-05 17:35
(Received via mailing list)
Exactly. But where there's smoke, there's usually fire :-)

The problem with most of the big shared hosting companies is that
you're in fact rolling a dice as a customer. Your hosting can be
great or it can be a true hell. I have experience with quite a few
shared hosting companies and most of them really give it their best,
but if things go wrong, you can be in for quite a wait and can't fix
the server yourself.

DH was good enough for my personal stuff, but it was a big mistake
running our customers' sites on it: one day performance of the sites
just went down the drain, support took quite a while to answer (in
the meanwhile we were taking heavy fire from our customers as you can
imagine and couldn't give them any explanation), they did "something"
and things went well for... 2 hours, then the server just went down
completely, for over a day. I had backups of all data from the day
before (lucky me), because they had to restore an older backup. But
in defence of DH, the same has happened at hostingzoom and a few
other shared hosts we were hosting PHP apps on as well. Also, if
you're living in Europe, keep in mind your business hours are night
time in the US (and that's when most shared hosts do their server
reboots and all the stuff I have never had to do with my VPS's or
dedicated servers).

Bottom line, if you're doing commercial applications (i.e. you're
making money off them), either explain and advise your customer to
take a VPS or get one yourself. We went from a single VPS at
Rimuhosting to three dedicated servers over the last year and a half
and up until now, none of our sites have gone down and we kept total
control over when to upgrade the server OS and/or apps. I don't have
to live in fear every day over and over anymore :-)

On 05 Apr 2007, at 16:50, Russell Norris wrote:

> That being said, keep in mind that forums tend to be full of
> complaints when things aren't working rather than praise because
> things are. There are a lot of people who _are_ happy with DH and
> don't post comments on random review sites because we're busy
> working on projects or doing things in our non-job lives. :)
>
> not everybody is so happy with Dreamhost and using Rails on it. You
> might want to check out http://www.railshostinginfo.com and read the
> comments about Dreamhost before you decide to go with them.

Best regards

Peter De Berdt
813679171280808f051b5754c9db45a6?d=identicon&s=25 Wes (Guest)
on 2007-04-05 17:48
(Received via mailing list)
On thumbnailing Flash:
See the article below - specifically the section titled "Adding a
Video Thumbnail". Sub in your FLV file.
http://blog.go4teams.com/?p=56

On DreamHost:
I have several clients I work with on DreamHost - in short, when it's
going good, it's going GOOD. When it's bad... it's BAD. They have had
quite a few bouts with extended downtime in the past couple of years.

In short, when it comes to web hosting, you get what you pay for.

Wes
5030981121b21bed8aee074f68bd5074?d=identicon&s=25 Russell Norris (Guest)
on 2007-04-05 17:52
(Received via mailing list)
I too admit there are shortcomings and if/when my app with the biggest
potential starts outgrowing DH I'll have to [and also be able to afford
to]
move to a different host but I just wanted to put out there that there
_are_
some happy customers and not just disgruntled ones. I'm mostly gruntled.
Though that outage last year was particularly nasty. I've been lucky
though
since then that none of the minor problems have affected my server at
all.

RSL
This topic is locked and can not be replied to.