mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +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_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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue