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

Should throw an exception with thumb.time > video.length #31

Closed
blaind opened this issue Sep 21, 2013 · 6 comments
Closed

Should throw an exception with thumb.time > video.length #31

blaind opened this issue Sep 21, 2013 · 6 comments

Comments

@blaind
Copy link

blaind commented Sep 21, 2013

I'm using the following thumbnail style: :thumb => { :geometry => '128x120', :format => 'jpg', :time => 5}

The problem is that thumbnail generation silently fails for videos that are less than 5 seconds in length, producing a thumbnail that is zero bytes in length.

Should there be either a raised exception, or retry for thumbnail generation for example from the beginning of video?

@owahab
Copy link
Owner

owahab commented Oct 3, 2013

Retrying the thumbnail from the beginning is not an expected behavior.
Throwing an exception might be a better idea.

@owahab
Copy link
Owner

owahab commented Oct 3, 2013

Updating title.

@jebw
Copy link

jebw commented Nov 29, 2013

Whilst I can see why throwing a exception is the 'correct' behaviour - in real terms, what can you do a that point. You catch the exception, but you still don't have a means to create the thumbnail from a different point.

The following commit checks the length of the video, if its too short, then it just grabs a frame from the middle of the video (this is better than the start since some videos will begin with a black screen).

jebw@fcaaf40

This should at least result in a usable thumbnail.

@owahab
Copy link
Owner

owahab commented Dec 1, 2013

@jebw not really. Because you might end up grabbing a black frame.

@attenzione
Copy link

please, review my comment in another issue, this is easy implemented solution #48 (comment)

@owahab
Copy link
Owner

owahab commented Apr 9, 2015

This project has been deprecated in favor of paperclip-av-transcoder.

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

No branches or pull requests

4 participants