nginx 및 rtmp 모듈을 사용하여 실시간 hls 및 mpeg-dash를 스트리밍합니다. 여기ffmpeg exec 명령이 nginx rtmp에서 실행되지 않음
rtmp {
server {
listen 1936;
application mypull {
live on ;
meta copy;
allow play all;
pull rtmp://184.72.239.149/vod/BigBuckBunny_115k.mov name=test live=1;
exec_push /usr/bin/ffmpeg -re -i rtmp://localhost:1936/mypull/$name -vcodec libx264 -acodec libmp3lame -f flv rtmp://localhost:1936/hls/$name;
}
application dash {
live on;
dash on;
dash_path /tmp/dash;
dash_nested on;
dash_fragment 5s;
dash_playlist_length 30s;
}
application hls {
live on;
hls on;
hls_playlist_length 30s;
hls_fragment 5s;
hls_path /tmp/hls;
}
}
}
의 .conf의 nginx 내 RTMP 명령이지만 재생되지 않습니다. 그것은 ffmpeg 명령이 심지어 실행되지 않는 것 같습니다. hls와 dash 폴더는 비어 있습니다. 아무도 그것으로 나를 도울 수 있습니까?
로 명령을 실행, 명령 줄에서 사용자는 FFmpeg 명령 작업을 수행 ? –
이것은 실제 ID입니다. 나의 nginx.conf는 정확히 이것과 같습니다. 출력을 생성하지 않습니다. @GergelyLukacsy – evan
아니요. 스트림 ID가 '$ name' 변수로 대체됩니다. 스트림을 열면 URL은 다음과 같이 보입니다 :'rtmp : //server.com : 1935/mypull/12345''12345'는 스트림 ID입니다. 이 경우에는 무엇이든 대체 할 수 있으니 콘솔이라고 해보십시오 : 'ffmpeg -re -i rtmp : // localhost : 1936/mypull/123 -vcodec libx264 -acodec libmp3lame -f flv rtmp : // localhost : 1936/hls/123' 또한 방화벽 설정에서 포트가 열려 있는지 확인하십시오. 왜 1936을 RTMP로 사용하고 있습니까? 기본값은 1935입니다. –