Никак не получается стримить hls, rtmp работает без проблем.
В начале поставил из сырцов( не знал что плагин портирован в порт nginx) rtmp работает hls нет.
#user nobody;
worker_processes 1;
error_log logs/error.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location /hls {
root /tmp;
}
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
root /usr/build/nginx-rtmp-module;
}
# rtmp control
location /control {
rtmp_control all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
rtmp {
server {
listen 1935;
ping 30s;
notify_method get;
application west {
live on;
exec ffmpeg -i rtmp://localhost/west/$name -c:v libx264 -c:a libfaac -ar 44100 -ac 2 -f flv rtmp://localhost/westhls/$name;
}
application westhls {
live on;
hls on;
hls_path /tmp/hls;
hls_fragment 5s;
hls_nested on;
}
application myapp {
live on;
# sample play/publish handlers
# sample recorder
#recorder rec1 {
# record all;
# record_interval 30s;
# record_path /tmp;
# record_unique on;
#}
# sample HLS
#hls on;
#hls_path /tmp/hls;
#hls_sync 100ms;
}
# Video on demand
#application vod {
# play /var/Videos;
#}
# Video on demand over HTTP
#application vod_http {
#}
}
}
Входящий стрим идет на приложение west для кодирования h264 aac и ретранслируется на westhls. Однако в папке /tmp/hls никаких чанков не появляется и соответственно при попытке посмотреть выдается 404 Ошибка. Ниже пример лога
2013/10/14 01:28:19 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:19 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:19 [notice] 46495#0: unknown process 46506 exited with code 1
2013/10/14 01:28:24 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:24 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:24 [notice] 46495#0: unknown process 46508 exited with code 1
2013/10/14 01:28:24 [info] 46495#0: kevent() failed (4: Interrupted system call)
2013/10/14 01:28:29 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:29 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:29 [notice] 46495#0: unknown process 46512 exited with code 1
2013/10/14 01:28:29 [info] 46495#0: kevent() failed (4: Interrupted system call)
2013/10/14 01:28:30 [error] 46495#0: *2 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:30 [error] 46495#0: *3 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:31 [error] 46495#0: *4 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:31 [error] 46495#0: *5 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:32 [error] 46495#0: *6 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:32 [error] 46495#0: *7 open() "/tmp/hls/tstream1.m3u8" failed (2: No such file or directory), client: 178.165.19.111, server: localhost, request: "GET /hls/tstream1.m3u8 HTTP/1.1", host: "
5.9.79.174:8080"
2013/10/14 01:28:34 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:34 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:34 [notice] 46495#0: unknown process 46516 exited with code 1
2013/10/14 01:28:34 [info] 46495#0: kevent() failed (4: Interrupted system call)
2013/10/14 01:28:39 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:39 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:39 [notice] 46495#0: unknown process 46520 exited with code 1
2013/10/14 01:28:44 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:44 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:44 [notice] 46495#0: unknown process 46523 exited with code 1
2013/10/14 01:28:49 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
2013/10/14 01:28:49 [notice] 46495#0: signal 20 (SIGCHLD) received
2013/10/14 01:28:49 [notice] 46495#0: unknown process 46526 exited with code 1
2013/10/14 01:28:54 [alert] 46495#0: kevent() error on 11 filter:-1 flags:4000 (9: Bad file descriptor)
С Уважением, Виктор...