how to modify the following command line?

落爺英雄遲暮 提交于 2020-01-05 04:40:36

问题


I have the following gstreamer Command-line :

gst-launch alsasrc ! mulawenc ! rtppcmupay ! udpsink host= 127.0.0.1 port=5555

It records Mono Voice and i can hear it ,if i listen on 5555 port ( echo IP was used). But i need to transmit Stereo . I have also tried my Microphone for stereo-recording Capability using the following command:

arecord -vv -fdat voiceFile.wav 

and it works. Does anyone know how to specify stereo in the gstreamer command?


回答1:


The problem is that rtppcmupay does not support stereo:

$ gst-inspect rtppcmupay
...
    Capabilities:
      audio/x-mulaw
               channels: 1
                   rate: 8000
....

You can try some other codec (e.g. vorbis):

$ gst-launch alsasrc \
  ! 'audio/x-raw-int,channels=2' \
  ! audioconvert \
  ! vorbisenc \
  ! rtpvorbispay \
  ! udpsink host=127.0.0.1 port=5555


来源:https://stackoverflow.com/questions/20077052/how-to-modify-the-following-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!