raspberry pi nginx 无法播放的直播

raspberry pi live streaming with nginx not playing

我正在做一个项目,我必须从网络中的 raspberry pi 摄像头模块流式传输实时视频。为此,我正在使用 nginx 服务器和 picam software,但我很难使用它。我在 http 部分的 nginx.conf 文件中添加了目录路径,如下所示:

    server {
            location /hls/ {
                root /run/shm;
                index index.m3u8 index.html;
        } }

然后我 运行 我尝试从 http://localhost/index.m3u8 , http://localhost/hls/index.m3u8 等浏览器访问实时流媒体的程序,但它说 404 未找到。

我需要你的帮助。谢谢。

我做错了。我不得不在 /etc/nginx/sites-available/default.

中添加以上代码行