From 563172f2839852b49864c4ff659c1af6dd8cfaa2 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sat, 21 Dec 2019 23:57:59 -0500 Subject: [PATCH] use main profile instead of high444 --- lib/philomena/processors/gif.ex | 4 ++-- lib/philomena/processors/webm.ex | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/philomena/processors/gif.ex b/lib/philomena/processors/gif.ex index 4ddb6bef..d8701027 100644 --- a/lib/philomena/processors/gif.ex +++ b/lib/philomena/processors/gif.ex @@ -89,11 +89,11 @@ defmodule Philomena.Processors.Gif do {_output, 0} = System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-pix_fmt", "yuv420p", "-c:v", "libvpx", "-quality", "good", "-b:v", "5M", webm]) {_output, 0} = - System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-vf", "scale=ceil(iw/2)*2:ceil(ih/2)*2", "-c:v", "libx264", "-preset", "medium", "-crf", "18", "-b:v", "5M", mp4]) + System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-vf", "scale=ceil(iw/2)*2:ceil(ih/2)*2", "-c:v", "libx264", "-preset", "medium", "-profile:v", "main", "-crf", "18", "-b:v", "5M", mp4]) [ {:copy, webm, "full.webm"}, {:copy, mp4, "full.mp4"} ] end -end \ No newline at end of file +end diff --git a/lib/philomena/processors/webm.ex b/lib/philomena/processors/webm.ex index 96d3b412..9b830fd2 100644 --- a/lib/philomena/processors/webm.ex +++ b/lib/philomena/processors/webm.ex @@ -74,7 +74,7 @@ defmodule Philomena.Processors.Webm do {_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]) {_output, 0} = - System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-c:v", "libx264", "-preset", "medium", "-crf", "18", "-b:v", "5M", "-vf", scale_filter, mp4]) + System.cmd("ffmpeg", ["-loglevel", "0", "-y", "-i", file, "-c:v", "libx264", "-profile:v", "main", "-preset", "medium", "-crf", "18", "-b:v", "5M", "-vf", scale_filter, mp4]) {webm, mp4} end @@ -109,4 +109,4 @@ defmodule Philomena.Processors.Webm do {new_width, new_height} end -end \ No newline at end of file +end