我正在使用下面的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但这会产生非常断断续续/失真的音频。示例here。
我到底做错了什么?
发布于 2021-11-22 20:15:10
听起来像是立体声音频隔行扫描的问题,其中每隔一次采样都会被跳过。您提供的输出示例是立体声MP3,但两个通道是相同的。
请尝试使用channels=1或播放或删除demux处理。
https://stackoverflow.com/questions/70065823
复制相似问题