Reputation: 827
I stream video in a RaspberryPi into /run/shm/hls/index.m3u8
. and i want stream them to http. I use Nginx and configured it accourding to nginx.org
:
location /hls {
hls;
hls_fragment 5s;
hls_buffers 10 10m;
hls_mp4_buffer_size 1m;
hls_mp4_max_buffer_size 5m;
root /run/shm;
}
when I run nginx I get the following error:
nginx: [emerg] "hls" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:62
Where am i wrong?
Upvotes: 2
Views: 2781
Reputation: 31229
The ngx_http_hls_module
, which is available with a commercial subscription, provides HLS
support for MP4
and MOV
files. You already seem to have a HLS
stream available so you don't need to pass trough this module at all. Just output your segments/playlist directly into a web accessible directory.
Concerning the shown error, it's most likely due to an error in the configuration file somewhere before your location
directive. Check the entire config file.
Upvotes: 1