开发者

How to play the port audio in basic raw

How can i do raw send and raw receive ? This is not working, i cant play what i sended:

Send: $ gst-launch -v autoaudiosrc ! udpsink host=127.0.0.1 auto-multicast=true port=4444

Recv/play:
[root@example ~]# gst-launch udpsrc multicast-group=127.0.0.1 port=4444 ! autoaudiosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulse开发者_如何转开发Sink:autoaudiosink0-actual-sink-pulse: The stream is in the wrong format.
Additional debug info:
gstbaseaudiosink.c(866): gst_base_audio_sink_preroll (): /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse:
sink not negotiated.
Execution ended after 16110169 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[root@example ~]# 


You need to specify capabilities for source. This is what actually ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0: not negotiated means. (Use -v flag on gst-launch to see more details on errors).

So, the solution is:

$ gst-launch -v udpsrc multicast-group=127.0.0.1 port=4444 \
    ! audio/x-raw-int, endianness=1234, signed=true, width=16, depth=16, rate=44100, channels=2 \
    ! autoaudiosink

Actually, I just copied capabilities from the verbose output of the sending gst-launch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜