mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 13:47:58 +01:00
improve video encoding speed
This commit is contained in:
parent
d7f5cbcb77
commit
5baf95f6de
2 changed files with 5 additions and 14 deletions
|
@ -11,13 +11,13 @@ server {
|
||||||
client_max_body_size 30M;
|
client_max_body_size 30M;
|
||||||
client_body_buffer_size 128k;
|
client_body_buffer_size 128k;
|
||||||
|
|
||||||
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z]+)$ {
|
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z0-9]+)$ {
|
||||||
expires max;
|
expires max;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
alias "$APP_DIR/priv/static/system/images/thumbs/$1/$2/full.$3";
|
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";
|
add_header Content-Disposition "attachment";
|
||||||
expires max;
|
expires max;
|
||||||
add_header Cache-Control public;
|
add_header Cache-Control public;
|
||||||
|
|
|
@ -99,19 +99,10 @@ defmodule Philomena.Processors.Webm do
|
||||||
"-vf",
|
"-vf",
|
||||||
scale_filter,
|
scale_filter,
|
||||||
"-threads",
|
"-threads",
|
||||||
"1",
|
"4",
|
||||||
"-max_muxing_queue_size",
|
"-max_muxing_queue_size",
|
||||||
"4096",
|
"4096",
|
||||||
webm
|
webm,
|
||||||
])
|
|
||||||
|
|
||||||
{_output, 0} =
|
|
||||||
System.cmd("ffmpeg", [
|
|
||||||
"-loglevel",
|
|
||||||
"0",
|
|
||||||
"-y",
|
|
||||||
"-i",
|
|
||||||
file,
|
|
||||||
"-c:v",
|
"-c:v",
|
||||||
"libx264",
|
"libx264",
|
||||||
"-pix_fmt",
|
"-pix_fmt",
|
||||||
|
@ -127,7 +118,7 @@ defmodule Philomena.Processors.Webm do
|
||||||
"-vf",
|
"-vf",
|
||||||
scale_filter,
|
scale_filter,
|
||||||
"-threads",
|
"-threads",
|
||||||
"1",
|
"4",
|
||||||
"-max_muxing_queue_size",
|
"-max_muxing_queue_size",
|
||||||
"4096",
|
"4096",
|
||||||
mp4
|
mp4
|
||||||
|
|
Loading…
Reference in a new issue