diff options
| author | AppleDash <[email protected]> | 2021-01-29 06:40:02 -0500 |
|---|---|---|
| committer | AppleDash <[email protected]> | 2021-01-29 06:40:02 -0500 |
| commit | c998f388cbd83cafb1cfe7a3321a8db7d64d2149 (patch) | |
| tree | ea895efb212e10f67c6842d0afe75ef6823e2104 /lib/booru/image_processing/mp4_processor.rb | |
| parent | 008bf48f9d61ad27366f8c971e1da843bdbb64fe (diff) | |
Fix MP4 thumbs, fix gifsicle garbage in some gifs
Diffstat (limited to 'lib/booru/image_processing/mp4_processor.rb')
| -rw-r--r-- | lib/booru/image_processing/mp4_processor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/booru/image_processing/mp4_processor.rb b/lib/booru/image_processing/mp4_processor.rb index d0f49a9..72d0ccd 100644 --- a/lib/booru/image_processing/mp4_processor.rb +++ b/lib/booru/image_processing/mp4_processor.rb @@ -51,7 +51,7 @@ module Booru # generate gifs from mp4s; no idea why this is special-cased. duration = exec("ffprobe -loglevel quiet -of 'compact=nokey=1:print_section=0' -show_format_entry duration #{@original_path.shellescape}").chomp.to_f / 10 [[250, :thumb], [150, :thumb_small], [50, :thumb_tiny]].each do |w, n| - exec("ffmpeg -loglevel warning -i #{@original_path.shellescape} -vf \"fps=1/#{duration},scale=w=#{w}:h=#{w}:force_original_aspect_ratio=decrease\" -vframes 10 -qscale:v 2 -f image2pipe -vcodec ppm - | convert -delay 50 -loop 0 - gif:- | gifsicle -O2 > #{@directory}/#{n}.gif") + exec("ffmpeg -loglevel warning -i #{@original_path.shellescape} -vf \"fps=1/#{duration},scale=w=#{w}:h=#{w}:force_original_aspect_ratio=decrease\" -vframes 10 -qscale:v 2 -f image2pipe -vcodec ppm - | convert -delay 50 -loop 0 - gif:- | gifsicle --no-warnings -O2 > #{@directory}/#{n}.gif") end end end |
