我正在通过ffmpeg将一个带有opus编解码器的音频流从Kurento传输到nginx-rtmp-module。我使用下面的命令来流式传输到nginx-rtmp:
ffmpeg -protocol_whitelist file,udp,rtp -i test-audio.sdp
-c:a libopus -f opus rtmp://<server_ip>/live/<stream_name>我在ffmpeg方面看不到错误。但是没有生成m3u8文件。但我在nginx日志中注意到了以下内容:
2020/11/23 23:19:31 [info] 95#0: *8 connect: app='live' args='' flashver='FMLE/3.0 (compatible; Lavf57.83' swf_url='' tc_url='rtmp://192.168.4.28:1935/live' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 172.17.0.1, server: 0.0.0.0:1935注意到了acodes=0。这是否意味着它不喜欢opus编解码器?
下面是我的nginx.conf:
rtmp {
server {
listen 1935;
chunk_size 4096;
application hopefm {
live on;
interleave on;
hls on;
hls_path /mnt/hls;
hls_fragment 3;
hls_playlist_length 60;
}
}
}谢谢你的帮助。
发布于 2020-11-29 04:42:54
已找到无法正常工作的原因。正确的命令应该是
ffmpeg -protocol_whitelist file,udp,rtp -i test-audio.sdp
-c:a aac -f flv rtmp://<server_ip>/live/<stream_name>我错过了-f flv,而且flash也不喜欢opus,我需要指定aac。
https://stackoverflow.com/questions/64980069
复制相似问题