Установлен kaltura nginx-vod-module, который отдает mp4 по hls.
hls доступен по адресу: domain/hls/output.mp4/index.m3u8
для защиты от хотлинка думал использовать nginx secure link:
конфиг nginx
location /tv/ {
rewrite /tv/([a-zA-Z0-9_\-]*)/([0-9]*)/(.*)/(.*)$ /hls/$3/$4?secl=$1§=$2;
}
location ^~ /hls/ {
alias domain/flvideo/;
secure_link $arg_secl,$arg_sect;
secure_link_md5 mysecretword$uri$arg_sect$remote_addr;
rewrite ^/hls/(.*)/(.*)$ /hls/$1/$2 break;
vod hls;
vod_segment_duration 10000;
vod_align_segments_to_key_frames on;
vod_manifest_segment_durations_mode accurate;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
location ~ \.index.m3u8$ {
if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 404; }
}
}
сервер выдает ошибку 500 "alias" cannot be used in location "/hls/" where URI was rewritten