Table of contents
Streaming
-
Enable the
mp4
module:--with-http_mp4_module
-
Sample URL: https://example.com/example.mp4?start=15
?start=15
is telling the browser to start the video at 15s.
Sample configuration
events { ... }
http {
include mine.type;
server {
listen 80;
server_name example.com;
root /var/www/example.com;
location ~ \.mp4$ {
# match any file ending with .mp4
root /var/www/downloads/;
mp4;
mp4_buffer_size 4M;
mp4_max_buffer_size 10M;
# Max buffer 10MB, when over the threshold,
# It will return: 500 internal server error.
}
}
}