how to modify the following command line?

2019-08-04 10:30发布

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条回答
我欲成王,谁敢阻挡
2楼-- · 2019-08-04 11:13

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
查看更多
登录 后发表回答