如何将g.711 (PCMA)的音速从16000降低到8000?我使用这个管道:
gst-launch autoaudiosrc ! queue ! alawenc ! rtppcmapay ! udpsink host=192.168.1.16 port=3001就像我说的,频率是16千赫,但我需要8千赫。在我尝试过这样的管道之后:
gst-launch alsasrc ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=8000 ! alawenc ! rtppcmapay ! udpsink host=192.168.1.16 port=3001但仍然是16千赫。然后我被试过了:
gst-launch alsasrc ! audioconvert ! audio/x-raw-int,channels=1,depth=8,width=8,rate=8000 ! alawenc ! rtppcmapay ! udpsink host=192.168.1.16 port=3001但是得到了一个错误:
WARNING: erroneous pipeline: could not link audioconvert0 to alawenc0发布于 2014-12-29 19:10:17
alawenc元素不接受8位采样,它只能处理16位,就像你的第二个流水线一样。为什么还是16kHZ?它应该是8 8kHZ。
gst-launch-1.0 alsasrc num-buffers=100 ! audioconvert ! audio/x-raw,rate=8000 ! alawenc ! qtmux ! filesink location=/tmp/alawtest.mov这条管道(来自GStreamer1.0)创建了一个8 kHz的alaw样本
请注意,您使用的是gstreamer 0.10,它未经维护且已过时多年。
https://stackoverflow.com/questions/27542521
复制相似问题