问题描述
我正在尝试使用Janus Media Server将WebRTC流中继到特定的RTP主机/端口,ffmpeg可以从中将其作为输入,并将其进一步转换为rtmp流,然后可以使用广播到各种社交媒体平台(例如YouTube,Twitch,Facebook等)
为此,我的灵感来自以下博客-https://www.meetecho.com/blog/firefox-webrtc-youtube-kinda/
具体地说,我正在尝试复制以下架构-
根据他们的文档,Janus具有非常简洁的API-
{
"request" : "rtp_forward","room" : <unique numeric ID of the room the publisher is in>,"publisher_id" : <unique numeric ID of the publisher to relay externally>,"host" : "<host address to forward the RTP and data packets to>","host_family" : "<ipv4|ipv6,if we need to resolve the host address to an IP; by default,whatever we get>","audio_port" : <port to forward the audio RTP packets to>,"audio_ssrc" : <audio SSRC to use to use when streaming; optional>,"audio_pt" : <audio payload type to use when streaming; optional>,"audio_rtcp_port" : <port to contact to receive audio RTCP Feedback from the recipient; optional,and currently unused for audio>,"video_port" : <port to forward the video RTP packets to>,"video_ssrc" : <video SSRC to use to use when streaming; optional>,"video_pt" : <video payload type to use when streaming; optional>,"video_rtcp_port" : <port to contact to receive video RTCP Feedback from the recipient; optional>,"simulcast" : <true|false,set to true if the source is simulcast and you want the forwarder to act as a regular viewer (single stream being forwarded) or false otherwise (substreams forwarded separately); optional,default=false>,"video_port_2" : <if simulcasting and forwarding each substream,port to forward the video RTP packets from the second substream/layer to>,"video_ssrc_2" : <if simulcasting and forwarding each substream,video SSRC to use to use the second substream/layer; optional>,"video_pt_2" : <if simulcasting and forwarding each substream,video payload type to use the second substream/layer; optional>,"video_port_3" : <if simulcasting and forwarding each substream,port to forward the video RTP packets from the third substream/layer to>,"video_ssrc_3" : <if simulcasting and forwarding each substream,video SSRC to use to use the third substream/layer; optional>,"video_pt_3" : <if simulcasting and forwarding each substream,video payload type to use the third substream/layer; optional>,"data_port" : <port to forward the datachannel messages to>,"srtp_suite" : <length of authentication tag (32 or 80); optional>,"srtp_crypto" : "<key to use as crypto (base64 encoded key as in SDES); optional>"
}
为此,我安装了Nginx服务器,并在其中安装了Janus,到目前为止一切运行顺利。但是对于如何设置Nginx服务器以使其接受RTP连接(将使用ffmpeg作为RTMP转发),我一无所知。
请引导我使用任何有助于我实现这一目标的相关资源。预先感谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)