summaryrefslogtreecommitdiff
path: root/lib/booru/image_processing/webm_processor.rb
diff options
context:
space:
mode:
authorAppleDash <[email protected]>2021-03-21 14:32:56 -0400
committerAppleDash <[email protected]>2021-03-21 14:32:56 -0400
commit04a45953745bded2a05b362bf18552e5f41b1d36 (patch)
tree559d3f476a0761aa133e9de479bdabd53efb243f /lib/booru/image_processing/webm_processor.rb
parent9fa27117159ca74d9ef892cf12f8c939175bff8c (diff)
Make MP4 and WebM thumbs less BAD.
Diffstat (limited to 'lib/booru/image_processing/webm_processor.rb')
-rw-r--r--lib/booru/image_processing/webm_processor.rb24
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/booru/image_processing/webm_processor.rb b/lib/booru/image_processing/webm_processor.rb
index 3e3effb..d9cdd5c 100644
--- a/lib/booru/image_processing/webm_processor.rb
+++ b/lib/booru/image_processing/webm_processor.rb
@@ -29,16 +29,20 @@ module Booru
width &= 4_294_967_294
height &= 4_294_967_294
- # generate webm thumb
- ffmpeg '-threads', '0',
- '-y',
- '-i', @original_path,
- '-c:v', 'libvpx',
- '-b:v', '1M',
- '-crf', '10',
- '-speed', '16',
- '-vf', "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease",
- destination_path
+ ffmpeg '-threads', '4',
+ '-y',
+ '-i', @original_path,
+ '-c:v', 'libvpx',
+ '-deadline', 'good',
+ '-cpu-used', '5',
+ '-auto-alt-ref', '0',
+ '-qmin', '15',
+ '-qmax', '35',
+ '-crf', '31',
+ '-vf', "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease",
+ '-max_muxing_queue_size', '4096',
+ '-slices', '8',
+ destination_path
end
def generate_full_version(destination_path)