fix for excessively slow vp8 encoding and tag bug

This commit is contained in:
byte[] 2019-12-28 10:47:04 -05:00
parent 8ce960a796
commit 5c7d21e397
2 changed files with 2 additions and 2 deletions

View file

@ -278,7 +278,7 @@ defmodule Philomena.Images.Image do
file_name_slug_fragment =
tags
|> Enum.map_join("_", & &1.slug)
|> String.replace("%2F", "")
|> String.replace("%", "")
|> String.replace("/", "")
|> String.slice(0..150)

View file

@ -72,7 +72,7 @@ defmodule Philomena.Processors.Webm do
scale_filter = "scale=w=#{width}:h=#{height}"
{_output, 0} =
System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-c:v", "libvpx", "-auto-alt-ref", "0", "-crf", "10", "-b:v", "5M", "-vf", scale_filter, webm])
System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-c:v", "libvpx", "-quality", "good", "-cpu-used", "3", "-auto-alt-ref", "0", "-crf", "10", "-b:v", "5M", "-vf", scale_filter, webm])
{_output, 0} =
System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-c:v", "libx264", "-pix_fmt", "yuv420p", "-profile:v", "main", "-preset", "medium", "-crf", "18", "-b:v", "5M", "-vf", scale_filter, mp4])