我在配置Nginx + rtmp-module时遇到了一些问题。
我需要将视频从IP摄像机流传输到网站。我使用MPEG-DASH。我的服务器配置较低。文件.m4a,.m4v正在创建,我也有stream.mpd文件。但是在浏览器中,无限加载无效。 dash.js的一些日志
Time: 0
dash.all.js:2:10794
Array(6) [ {…}, {…}, {…}, {…}, {…}, {…} ]
dash.all.js:2:10818
Index for time 0 is -1
dash.all.js:3:8722
Checking for stream end...
dash.all.js:3:8722
Live never ends! (TODO)
dash.all.js:3:8722
Stream finished? false
dash.all.js:3:8722
Got a request.
dash.all.js:3:8722
null
dash.all.js:3:8722
BufferController video setState to:READY
dash.all.js:3:8722
Working time is video time: 0
dash.all.js:3:8722
BufferController.validate() video | state: READY
dash.all.js:3:8722
video Playback rate: 0
dash.all.js:3:8722
video Working time: 0
dash.all.js:3:8722
video Video time: 0
dash.all.js:3:8722
Current video buffer length: 0
dash.all.js:3:8722
BufferController video setState to:VALIDATING
dash.all.js:3:8722
ABR enabled? (true)
dash.all.js:3:8722
Check ABR rules.
dash.all.js:3:8722
Checking download ratio rule...
dash.all.js:3:8722
Total time: 0.009s
dash.all.js:3:8722
Download time: 0.009s
dash.all.js:3:8722
The ratios are NaN, bailing.
dash.all.js:3:8722
Checking insufficient buffer rule...
dash.all.js:3:8722
Not enough information for rule.
dash.all.js:3:8722
Array [ {…}, {…} ]
dash.all.js:3:8722
New quality of 0
dash.all.js:3:8722
video Playback quality: 0
dash.all.js:3:8722
Populate video buffers.
dash.all.js:3:8722
Quality didn't change.
dash.all.js:3:8722
Loading the video fragment for time: 0
dash.all.js:3:8722
Getting the request for time: 0
dash.all.js:3:8722
Got segments.
dash.all.js:3:8722
Array(6) [ {…}, {…}, {…}, {…}, {…}, {…} ]
dash.all.js:3:8722
Got a list of segments, so dig deeper.
dash.all.js:3:8722
Couldn't figure out a time!
dash.all.js:2:10751
Time: 0
dash.all.js:2:10794
Array(6) [ {…}, {…}, {…}, {…}, {…}, {…} ]
dash.all.js:2:10818
Index for time 0 is -1
dash.all.js:3:8722
Checking for stream end...
dash.all.js:3:8722
Live never ends! (TODO)
dash.all.js:3:8722
Stream finished? false
dash.all.js:3:8722
Got a request.
dash.all.js:3:8722
null
dash.all.js:3:8722
BufferController video setState to:READY
dash.all.js:3:8722
Working time is video time: 0
dash.all.js:3:8722
BufferController.validate() video | state: READY
dash.all.js:3:8722
video Playback rate: 0
dash.all.js:3:8722
video Working time: 0
dash.all.js:3:8722
video Video time: 0
dash.all.js:3:8722
Current video buffer length: 0
dash.all.js:3:8722
BufferController video setState to:VALIDATING
dash.all.js:3:8722
ABR enabled? (true)
dash.all.js:3:8722
Check ABR rules.
dash.all.js:3:8722
Checking download ratio rule...
dash.all.js:3:8722
Total time: 0.009s
dash.all.js:3:8722
Download time: 0.009s
dash.all.js:3:8722
The ratios are NaN, bailing.
user some_user;
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
live on;
dash on;
server {
listen 1935;
application cams {
dash_path /cams;
}
exec_static ffmpeg -i
rtsp://admin:admin@192.168.0.51/1/Streaming/Channels/1/ -c:v libx264 -q:v 31 -an -profile:v baseline -ar 44100
-f flv rtmp://0.0.0.0/cams/stream;
}
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#keepalive_timeout 0;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root /;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
有人可以解释一下为什么流无法正常工作以及如何发出该消息吗?谢谢