【问题标题】:how to HLS(Http Live Strem) with Nginx如何使用 Nginx 进行 HLS(Http Live Stream)
【发布时间】:2015-06-02 08:32:35
【问题描述】:

我将 RaspberryPi 中的视频流式传输到 /run/shm/hls/index.m3u8。我想将它们流式传输到 http。我使用 Nginx 并根据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;
}

运行 nginx 时出现以下错误:

nginx: [emerg] "hls" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:62

我哪里错了?

【问题讨论】:

    标签: nginx video-streaming raspberry-pi http-live-streaming


    【解决方案1】:

    ngx_http_hls_module(可通过商业订阅获得)为MP4MOV 文件提供HLS 支持。您似乎已经有一个可用的HLS 流,因此您根本不需要通过此模块。只需将您的片段/播放列表直接输出到网络可访问的目录中。

    关于显示的错误,很可能是由于您的 location 指令之前的某个配置文件中的错误。检查整个配置文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-16
      • 1970-01-01
      • 1970-01-01
      • 2017-05-23
      • 1970-01-01
      • 2015-11-17
      • 2012-01-02
      • 2023-03-09
      相关资源
      最近更新 更多