ruby-av / paperclip-av-transcoder

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

Fix issue with shorter vides (less than 3 seconds) causing issues with thumbnail generation #61

Open iCH-Borovich opened 8 months ago

iCH-Borovich commented 8 months ago

I've recently encountered some challenges while working with this gem, particularly in understanding the :time parameter, which was not clearly documented.

Moreover, I faced issues when uploading videos shorter than 3 seconds. After a thorough review and analysis of the source code, I have implemented a fix. As a solution, I've set the default value to check the video's length and, if it falls outside the :time value, automatically selecting an appropriate frame, preferably the first one.

I've also included a small description of the :time parameter to enhance the documentation.