Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail Generation Issue #3

Closed
chienhungchen opened this issue Oct 24, 2014 · 3 comments
Closed

Thumbnail Generation Issue #3

chienhungchen opened this issue Oct 24, 2014 · 3 comments

Comments

@chienhungchen
Copy link

Hey @owahab thanks for creating this gem.

I'm running into issues generating the thumbnail according to your example. I was wondering if you could give a little bit more details in the README on how to get it to work properly, including setups and such?

I thought I had to make sure my ffmpeg install had --with-openjpeg flagged, so I reinstalled it with that.

I also debugged through the commands and ffmpeg asked for me to add %03d to the jpg name. So my code is now

has_attached_file :video_content, :styles => {
        :medium => { :geometry => "640x480", :format => 'mp4' },
        :thumb => { :geometry => "320x240", :format => '%03d.jpg', :time => 10 }
    },
    :processors => [:transcoder],
    :s3_protocol => :https

Which now it it generates an empty jpg.

Any thoughts on how I'm supposed to be installing, setting up the configs, etc to make it generate a thumbnail correctly?

@malachaifrazier
Copy link

Ever figure this one out? I'm seeing the same thing

edk added a commit to edk/av that referenced this issue Dec 31, 2014
The issue at ruby-av/paperclip-av-transcoder#3
is caused, at least on my system with Paperclip 4.2, by the format
parameter of the form: ".FMT".  This caused the case statement to not
match any of the desired formats!  It's likely that other paperclip
version don't pass the dot before the format extension, but it seems
likely that the behavior may differ depending on the version.

This change looks for the end of the format string to match using a
regex, and should now properly find the format, allowing thumbnails
to be generated (as well as the proper switches for non image params)
@edk
Copy link

edk commented Dec 31, 2014

Hi, I've made a couple of pull requests:

@owahab
Copy link
Member

owahab commented Dec 31, 2014

@edk both pull requests break test cases for the two gems. Please check Travis build status.

@owahab owahab closed this as completed Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants