improve video encoding speed

This commit is contained in:
byte[] 2020-05-28 20:55:58 -04:00
parent d7f5cbcb77
commit 5baf95f6de
2 changed files with 5 additions and 14 deletions

View file

@ -11,13 +11,13 @@ server {
client_max_body_size 30M;
client_body_buffer_size 128k;
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z]+)$ {
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z0-9]+)$ {
expires max;
add_header Cache-Control public;
alias "$APP_DIR/priv/static/system/images/thumbs/$1/$2/full.$3";
}
location ~ ^/img/download/(.+)/([0-9]+).*\.([A-Za-z]+)$ {
location ~ ^/img/download/(.+)/([0-9]+).*\.([A-Za-z0-9]+)$ {
add_header Content-Disposition "attachment";
expires max;
add_header Cache-Control public;

View file

@ -99,19 +99,10 @@ defmodule Philomena.Processors.Webm do
"-vf",
scale_filter,
"-threads",
"1",
"4",
"-max_muxing_queue_size",
"4096",
webm
])
{_output, 0} =
System.cmd("ffmpeg", [
"-loglevel",
"0",
"-y",
"-i",
file,
webm,
"-c:v",
"libx264",
"-pix_fmt",
@ -127,7 +118,7 @@ defmodule Philomena.Processors.Webm do
"-vf",
scale_filter,
"-threads",
"1",
"4",
"-max_muxing_queue_size",
"4096",
mp4