How Guys I'm working on a project that need display same thing like this, I think it make sense to use some tools to automatically generate the thumbnails and save them in the database when I s开发者_运维百科ubmit a video
I'm also want some similar rails code that do the youtube alike function, could anyone give me suggestion rails code website.
Thanks
I created a gem to ease interaction between Rails apps and FFMPEG: https://github.com/owahab/paperclip-ffmpeg
Its easier if you use directly ffmpeg, you have to install first ffmpeg and the you can call with this linesystem "ffmpeg -itsoffset -1 -i #{path} -s 320x240 -y -vframes 1 -f image2 -an 'app/assets/images/#{@video.title}.jpg'"
-itsoffset is the time you want the thumbnail
-i is the input file
-an is the outpout file
I take a look for other options and this is the faster way to do.
Check this out :
http://thewebfellas.com/blog/2009/2/22/video-thumbnails-with-ffmpeg-and-paperclip
hope it helps... :)
精彩评论