#!/bin/bash
for i in {31470..31470}; do ffmpeg -loglevel warning -stats -i $i/$i.mp4 -pix_fmt yuv420p -vf 'scale=w=trunc(ih*dar/2)*2:h=trunc(ih/2)*2, setsar=1/1, scale=w=1280:h=720:force_original_aspect_ratio=1, pad=w=1280:h=720:x=(ow-iw)/2:y=(oh-ih)/2:color=#000000' -c:v libx264 -preset:v slow -strict experimental -ac 2 -preset:a slow -c:a aac -sn -map_metadata -1 -map_chapters -1 -threads 0 $i/$i_2.mp4 || true; done
for %%a in (29232..35000) do exec ffmpeg -loglevel warning ........
# Settings for a TLS enabled server.
server {
server_name tut-server-name;
index index.php;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
server_name _;
root /var/www/stream;
ssl_certificate "/etc/nimble/cert.pem";
ssl_certificate_key "/etc/nimble/privkey.pem";
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 10m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
}
location ^~ /var/www/stream/ {
deny all;
}
location ~ "/(?<filename>[^/]+\.mp4)$" {
add_header Content-Disposition 'attachment; filename="$filename"';
root /var/www/stream;
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri$remote_addr secretkeyhere";
if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 410; }
}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
include fastcgi_params;
}
}
nginx: [emerg] location "/stream" is outside location "\.php$" in /etc/nginx/nginx.conf:70
nginx: configuration file /etc/nginx/nginx.conf test failed