2011-03-27 101 views
0

我需要用gstreamer设置一个现场音频流媒体服务器。服务器应该向客户端发送实时音频,在客户端,应使用vlc播放器播放传入流。我使用下面的代码基于gstreamer的现场音频流媒体服务器和用vlc播放输入流的客户端

VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264" 

gst-launch -v udpsrc caps=$VIDEO_CAPS port=4444 \ 
      ! gstrtpbin .recv_rtp_sink_0 \ 
      ! rtph264depay ! ffdec_h264 ! xvimagesink 

然后像GStreamer的报告:

Setting pipeline to PAUSED ... 
Pipeline is live and does not need PREROLL ... 
Setting pipeline to PLAYING ... 
New clock: GstSystemClock 

请帮我的步骤,使用的GStreamer客户进行现场直播

回答

1

尝试阅读手册,设立服务器与VLC here进行流式传输。
或者只是:

cvlc rtp://@:4444 

更新: 由于我的坏的阅读技巧我有点误解了这个问题。
下面是如何建立一个服务器:

gst-launch -v pulsesrc ! audioconvert ! audioresample \ 
    ! speexenc ! rtpspeexpay \ 
    ! udpsink host=224.1.1.1 port=4444 auto-multicast=true 

或使用multiudpsink发送给多个客户端。

+0

试过你的例子,但不起作用。 100%确认。 – YumYumYum 2011-04-11 22:33:39