У меня чет даже через vlc грузилось минуту или две. Наверное там не самый шустрый комп это дело обрабатывает , да и задержка в минуту (видно по времени которое там в углу) можно предположить , что сервер все это время создает и буферизирует поток. В теории. Так что плеер тут не причем. Это кстате с какой икеи камера ?
Там кстате битрейт 3000. Хоть на твич стримь. И судя по всему видео отдается кусками, а не прямым потоком. Так как соединение кушается не постоянно и не равномерно. Вообщем оно так работает потому что там сервер так настроен.
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range,Date'; add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range,Date'; add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
listen 80 default_server;
error_page 404 /index.html;
error_page 500 502 503 504 /index.html;
location / {
root /var/www;
access_log off;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range,Date';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
}
Я бы опустил битрейт видео для 720p около 2000кб/с
user www-data;
worker_processes 1;
worker_rlimit_nofile 65536;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
events {
worker_connections 16384;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
notify_method get;
hls on;
hls_path /tmp/hls;
hls_fragment 10s;
hls_nested on;
drop_idle_publisher 10s;
exec_options on;
exec_static /usr/bin/ffmpeg -i rtsp://178.218.112.61:554 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam01;
exec_static /usr/bin/ffmpeg -i rtsp://video:112233@178.218.112.61:555 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam02;
allow publish 0.0.0.0;
allow play all;
}
}
}
http {
include /etc/nginx/mime.types;
notify_method get;
hls on;
hls_path /tmp/hls;
hls_fragment 10s;
hls_nested on;
drop_idle_publisher 10s;
exec_options on;
exec_static /usr/bin/ffmpeg -i rtsp://178.218.112.61:554 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam01;
exec_static /usr/bin/ffmpeg -i rtsp://video:112233@178.218.112.61:555 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam02;
allow publish 0.0.0.0;
allow play all;
}
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $host $request "$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$server_port"';
access_log /var/log/nginx/access.log;
keepalive_timeout 65;
tcp_nodelay on;
reset_timedout_connection on;
server {
listen 80 default_server;
error_page 404 /index.html;
error_page 500 502 503 504 /index.html;
location / {
root /var/www;
access_log off;
log_format main '$remote_addr - $remote_user [$time_local] $host $request "$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$server_port"';
access_log /var/log/nginx/access.log;
keepalive_timeout 65;
tcp_nodelay on;
reset_timedout_connection on;
server {
listen 80 default_server;
error_page 404 /index.html;
error_page 500 502 503 504 /index.html;
location / {
root /var/www;
access_log off;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range,Date';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
}
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /var/www;
}
location /hls {
root /tmp;
}
location ~ /\.ht { deny all; }
}
}
user www-data;
worker_processes auto;
worker_rlimit_nofile 65536;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
events {
worker_connections 16384;
multi_accept on;
accept_mutex off;
use epoll;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
notify_method get;
hls on;
hls_path /tmp/hls;
hls_fragment 10s;
hls_nested on;
drop_idle_publisher 10s;
exec_options on;
exec_static /usr/bin/ffmpeg -i rtsp://178.218.112.61:554 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam01;
exec_static /usr/bin/ffmpeg -i rtsp://video:112233@178.218.112.61:555 -vcodec copy -an -f flv rtmp://localhost:1935/live/cam02;
allow publish 0.0.0.0;
allow play all;
}
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $host $request "$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$server_port"';
access_log /var/log/nginx/access.log;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
access_log off;
log_not_found off;
reset_timedout_connection on;
keepalive_timeout 60;
keepalive_requests 1000;
server {
listen 80 backlog=10000 default_server;
error_page 404 /index.html;
error_page 500 502 503 504 /index.html;
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /var/www;
}
location /hls {
root /tmp;
add_header Access-Control-Allow-Headers '*';
add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range,Date';
add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
add_header Access-Control-Allow-Origin '*';
}
location / {
root /var/www;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
}