diff options
| author | AppleDash <[email protected]> | 2020-08-07 19:47:17 -0400 |
|---|---|---|
| committer | AppleDash <[email protected]> | 2020-08-07 19:47:17 -0400 |
| commit | 37acc89b06313f57796a4aaac6e66a901733ea7f (patch) | |
| tree | d30a010f81677ea306871b62ac3372dce3ed921a /lib/booru/image_processing/webm_processor.rb | |
| parent | 07c9e6fcf2ae7b0e22c2333ebb3ffe6a5e3a1d3c (diff) | |
Minor cleanup
Diffstat (limited to 'lib/booru/image_processing/webm_processor.rb')
| -rw-r--r-- | lib/booru/image_processing/webm_processor.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/booru/image_processing/webm_processor.rb b/lib/booru/image_processing/webm_processor.rb index 8a022cc..91889d4 100644 --- a/lib/booru/image_processing/webm_processor.rb +++ b/lib/booru/image_processing/webm_processor.rb @@ -11,15 +11,15 @@ module Booru @rasterized = File.join(@directory, 'still.png') end + def is_video? + true + end + def pre_process median_time = `ffprobe -i #{@original_path.shellescape} -show_entries format=duration -v quiet -of csv="p=0"`.to_f / 2 `ffmpeg -loglevel quiet -n -i #{@original_path.shellescape} -ss #{median_time} -frames:v 1 #{@rasterized.shellescape}` end - def is_video? - true - end - def generate_version(dimensions, destination_path) width, height = dimensions width &= 4_294_967_294 |
