我正在使用以下 gstreamer 管道来获取 RTMP src 并使用 opusenc 编码器对其进行转码,并将其作为 rtp 数据包发送到 Mediasoup(一个 webrtc 库)。
gst-launch-1.0 \
-v \
rtpbin name=rtpbin rtp-profile=avpf do-retransmission=true \
rtmpsrc location=rtmp://3.126.121.45:1935/live/qonda-injecttest-orig \
! flvdemux name=demux \
demux.audio \
! queue \
! decodebin \
! "audio/x-raw,channels=2,rate=48000" \
! audioconvert \
! opusenc \
! rtpopuspay pt=101 ssrc=11111111 \
! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink host="3.69.236.199" port="41269" sync=true \
rtpbin.send_rtcp_src_1 ! udpsink host="3.69.236.199" port="48143" sync=false async=false
但这会产生非常不连贯/失真的音频。这里有一个样本。
我在这里做错了什么?