A
A
Alexander2011-08-21 14:01:27
Nginx
Alexander, 2011-08-21 14:01:27

Serving Files After Nginx Connection Dropped

Such a problem: in the DC there are disconnections, while the distribution of the movie (flv module) stops, and the movie starts playing from the beginning, how can you make the movie start playing from the point where playback was stopped?

OS: FreeBSD 8.2 amd64



nginx.conf site.conf:

user www;
worker_processes 32;
worker_rlimit_nofile 10240;
worker_rlimit_sigpending 32768;
worker_priority 5;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 14000;
use kqueue;
multi_accept on;
}
http {
include /usr/local/etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
sendfile_max_chunk 1024k;
tcp_nopush on;
tcp_nodelay on;
send_lowat 12000;
client_max_body_size 64M;
keepalive_timeout 100 30;
server_names_hash_bucket_size 64;
connection_pool_size 2k;
request_pool_size 4k;
gzip on;
include /usr/local/etc/nginx/vhosts/*;

}



server {
listen ip:80;
server_name sitename;
access_log /usr/local/www/nginx/sitename/logs/nginx-access.log;
location /
{
root /usr/local/www/nginx/sitename/htdocs;
}

location ~ \.flv$ {
root /usr/local/www/nginx/sitename/htdocs;
flv;
}

location = /favicon.ico {
log_not_found off;
access_log off;
}

location /nginx_status {
stub_status on;
access_log off;
}

location ~* ^.+\.(jpg|jpg/|jpeg|css|gif|js|png|ico|swf|js|txt|mp3)$
{
root /usr/local/www/nginx/sitename/htdocs;
}
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VBart, 2011-08-21
@VBart

How can I make it so that the movie would start playing from the point at which playback was stopped?
Send a request with a GET offset parameter: start=XXX , where XXX, apparently, is the number of bytes to skip.
!!! The same is written in the documentation : sysoev.ru/nginx/docs/http/ngx_http_flv_module.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question