ruby-av / paperclip-av-transcoder

Audio/Video Transcoder for Paperclip using FFMPEG/Avconv
MIT License
136 stars 83 forks source link

add seeking support for creating thumbnails of video #12

Closed attenzione closed 9 years ago

attenzione commented 9 years ago

support time in style params, including lambda

model Fake

  has_attached_file :attachment, url:  '/uploads/:class/:id/:style.:extension',
                                 path: ':rails_root/public:url',
                                 styles: {
                                    thumb: { format: 'jpg', time: -> (attachment) { attachment.instance.method(:style_time_for) }, processors: [ :transcoder ] }
                                 }

  def style_time_for(meta, options)
    meta[:duration] / 2
  end

end

should fix issue #2

attenzione commented 9 years ago

Travis CI build failed because it's required updated av gem, which i already submitted. Need to bump version to 0.8.2 and resubmit this request with fixed dependencies

owahab commented 9 years ago

AV 0.9.0 was released. Please update the pull request.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.48%) to 92.68% when pulling a2463aeaa5112907bbaddfc29e60702f745b9eb7 on attenzione:master into b8f777e3389fea1dfbbe7171837ae57b0adf5692 on ruby-av:master.

tux-mind commented 9 years ago

please explain this feature into the README too :blush: