use main profile instead of high444

This commit is contained in:
byte[] 2019-12-21 23:57:59 -05:00
parent 15c268817c
commit 563172f283
2 changed files with 4 additions and 4 deletions

View file

@ -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
end

View file

@ -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
end