gpt4 book ai didi

Nginx RTMP模块生成HLS

转载 作者:行者123 更新时间:2023-12-04 23:21:33 31 4
gpt4 key购买 nike

我正在使用来自 Kurento 的 opus 编解码器流式传输音频流
通过 ffmpeg 到 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;
}
}
}
谢谢你的帮助。

最佳答案

找出为什么它不起作用。正确的命令应该是

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反而。

关于Nginx RTMP模块生成HLS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64980069/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com