C Windows上的GStreamer音频流
我正在Windows上试用GStreamer(ossbuild 0.10.7),但我似乎无法使两台计算机之间的音频流正常工作。我在接收器侧听到的只是一声短促的哔哔声,然后是寂静 这是发送方管道:C Windows上的GStreamer音频流,c,windows,gstreamer,C,Windows,Gstreamer,我正在Windows上试用GStreamer(ossbuild 0.10.7),但我似乎无法使两台计算机之间的音频流正常工作。我在接收器侧听到的只是一声短促的哔哔声,然后是寂静 这是发送方管道: gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink host=224.0.0.7 auto-multicast=true port=4444 gst-launch -v udpsrc multicast-group=224.
gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink host=224.0.0.7 auto-multicast=true port=4444
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, media=(string)audio, channels=(int)1, clock-rate=(int)44100, encoding-name=(string)L16" ! gstrtpbin ! rtpL16depay ! audioconvert ! queue ! autoaudiosink
这是接收器管道:
gst-launch -v audiotestsrc ! audioconvert ! rtpL16pay ! udpsink host=224.0.0.7 auto-multicast=true port=4444
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, media=(string)audio, channels=(int)1, clock-rate=(int)44100, encoding-name=(string)L16" ! gstrtpbin ! rtpL16depay ! audioconvert ! queue ! autoaudiosink
我已经尝试了不同的队列设置和编解码器。同样,当我尝试流式传输一个音频文件时,我只听到大约1秒的声音。可能是什么问题?似乎是autoaudiosink和rtpL16的问题。这条管道工程: 发件人:
gst-launch -v directsoundsrc ! audioresample ! audio/x-raw-int, rate=8000 ! audioconvert ! udpsink host=224.0.0.7 port=4444
接收人:
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="audio/x-raw-int, channels=(int)2, rate=(int)8000, width=(int)16, depth=(int)16" ! audioconvert ! directsoundsink
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, channels=(int)2, clock-rate=(int)22000, encoding-name=(string)MP4A-LATM, config=(string)40002410" ! gstrtpbin ! rtpmp4adepay ! faad ! directsoundsink
这条管道还可以:
发件人:
gst-launch -v directsoundsrc ! audioresample ! audio/x-raw-int, rate=22000 ! faac ! audio/mpeg,mpegversion=4 ! rtpmp4apay ! udpsink host=224.0.0.7 port=4444
接收人:
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="audio/x-raw-int, channels=(int)2, rate=(int)8000, width=(int)16, depth=(int)16" ! audioconvert ! directsoundsink
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, channels=(int)2, clock-rate=(int)22000, encoding-name=(string)MP4A-LATM, config=(string)40002410" ! gstrtpbin ! rtpmp4adepay ! faad ! directsoundsink
autoaudiosink和rtpL16似乎存在问题。这条管道工程: 发件人:
gst-launch -v directsoundsrc ! audioresample ! audio/x-raw-int, rate=8000 ! audioconvert ! udpsink host=224.0.0.7 port=4444
接收人:
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="audio/x-raw-int, channels=(int)2, rate=(int)8000, width=(int)16, depth=(int)16" ! audioconvert ! directsoundsink
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, channels=(int)2, clock-rate=(int)22000, encoding-name=(string)MP4A-LATM, config=(string)40002410" ! gstrtpbin ! rtpmp4adepay ! faad ! directsoundsink
这条管道还可以:
发件人:
gst-launch -v directsoundsrc ! audioresample ! audio/x-raw-int, rate=22000 ! faac ! audio/mpeg,mpegversion=4 ! rtpmp4apay ! udpsink host=224.0.0.7 port=4444
接收人:
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="audio/x-raw-int, channels=(int)2, rate=(int)8000, width=(int)16, depth=(int)16" ! audioconvert ! directsoundsink
gst-launch -v udpsrc multicast-group=224.0.0.7 port=4444 caps="application/x-rtp, channels=(int)2, clock-rate=(int)22000, encoding-name=(string)MP4A-LATM, config=(string)40002410" ! gstrtpbin ! rtpmp4adepay ! faad ! directsoundsink