fix duration scale

This commit is contained in:
byte[] 2019-12-31 23:15:49 -05:00
parent b9ad5643dc
commit d406e1ee1c

View file

@ -83,7 +83,7 @@ defmodule Philomena.Processors.Webm do
gif = Briefly.create!(extname: ".gif") gif = Briefly.create!(extname: ".gif")
scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease" scale_filter = "scale=w=#{width}:h=#{height}:force_original_aspect_ratio=decrease"
palette_filter = "paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle" palette_filter = "paletteuse=dither=bayer:bayer_scale=5:diff_mode=rectangle"
rate_filter = "fps=1/#{duration},settb=1/2,setpts=N" rate_filter = "fps=1/#{duration / 10},settb=1/2,setpts=N"
filter_graph = "[0:v] #{scale_filter},#{rate_filter} [x]; [x][1:v] #{palette_filter}" filter_graph = "[0:v] #{scale_filter},#{rate_filter} [x]; [x][1:v] #{palette_filter}"
{_output, 0} = {_output, 0} =