首页 > 解决方案 > roku 发送请求,但 nginx 没有响应或记录

问题描述

我正在尝试在我的 Roku 上显示一系列简短的 mp4。这个想法是从在本地主机上运行的 nginx 为它们提供服务。Roku 挂在“检索”视频上。我使用wireshark 见证了来自roku 的请求,并且它们不断重复。虽然 nginx 没有响应,也没有将请求记录在 access.log 或 error.log 中。我觉得 roku 脚本已充分编码,因为我可以确认播放列表已被视频节点接收,屏幕已聚焦,并且正在通过端口 80 发出对视频的请求。我可以通过浏览器请求 url 和如果用 http: 制作,则 mp4 在浏览器中播放,如果用 rtmp: 制作,则在播放器中播放。

这是conf.d中简单的nginx配置;

server {    
    listen 80 default_server;

    location / {           # the '/' matches all requests
        root /myNginx/sites;   # the request URI would be appended to the root
        index 01_default_test.html; # the index directive provides a default file or list of files to look for
    }

    location /videos/ { # for testing use 'http://10.0.0.13/videos/sample.mp4'
        mp4;    # activates the http_mp4 module for streaming the video
        root /VODs;     # allows adding 'videos' to the uri and the file name 
    }
}

}

我将此附加到 nginx.conf 文件中;

rtmp {
server {
    listen 1935;
    chunk_size 4000;

    # Video on demand
    application VOD {       #  rtmp://10.0.0.13/VOD/sample03.mp4
        play /VOD/videos/;
    }
}

不知道从这里去哪里。有谁知道为什么 nginx 似乎忽略了请求?我正在使用 Ubuntu,防火墙当前处于非活动状态。

标签: nginxroku

解决方案


推荐阅读