gstrtpbin example code run not ok
Xu Peter
xzpeter at gmail.com
Sun Jun 12 23:35:44 PDT 2011
2011/6/13 Kapil Agrawal <kapil.agl at gmail.com>
> I would first test if at all my server is sending data.
> For that just run
> gst-launch udpsrc
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
> port=5000 ! fakesink -v
>
Thanks for your suggestion.
It seems that there is no udp packat recved. And I think I have found the
problem here, which is very strange.
In the server script, I have to add "host=127.0.0.1" to udpsink, then I will
see something with the fakesink -v.
What is strange is that, the default "host" param of udpsink is "localhost",
which should be the same as 127.0.0.1. However, only "127.0.0.1" works, and
"localhost" won't.
By the way, I have found a workable script showing how to do x264 enc/dec
via internet. they are:
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/rtp/client-H264.sh
Here also a audio examples with a-law encoding, which is really what I
needed.
Peter
>
> if it prints data logs at fakesink then you getting data, can you verify
> same ?
>
> Regards
> Kapil
>
> On Sat, Jun 11, 2011 at 9:46 PM, Peter Xu <xzpeter at gmail.com> wrote:
>
>> hi, all,
>>
>> I am trying to encode some raw data with h264, and sent via network in
>> rtp. I found some example pipelines here:
>>
>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-gstrtpbin.html
>>
>> I used this code to establish a server(nearly the same as mentioned in the
>> doc above, just change v4l2src to videotestsrc):
>> gst-launch gstrtpbin name=rtpbin \
>> videotestsrc ! ffmpegcolorspace ! ffenc_h263 ! rtph263ppay !
>> rtpbin.send_rtp_sink_0 \
>> rtpbin.send_rtp_src_0 ! udpsink port=5000 \
>> rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
>> udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
>> audiotestsrc ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1
>> \
>> rtpbin.send_rtp_src_1 ! udpsink port=5002 \
>> rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
>> udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1
>>
>> and use this to run the client:
>> gst-launch -v gstrtpbin name=rtpbin
>> \
>> udpsrc
>> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
>> \
>> port=5000 ! rtpbin.recv_rtp_sink_0
>> \
>> rtpbin. ! rtph263pdepay ! ffdec_h263 ! ximagesink
>> \
>> udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0
>> \
>> rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false
>> \
>> udpsrc
>> caps="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)AMR,encoding-params=(string)1,octet-align=(string)1"
>> \
>> port=5002 ! rtpbin.recv_rtp_sink_1
>> \
>> rtpbin. ! rtpamrdepay ! amrnbdec ! alsasink
>> \
>> udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1
>> \
>> rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false
>>
>> however, by first running the server, then running the client, I can't see
>> a xwindow pop up (I think I should see that, meanwhile some kind of sine
>> wave should be played in my audio) nor the sine wave sound. what I got after
>> running the client are:
>>
>> ....
>> New clock: GstSystemClock
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_1: caps
>> = application/x-rtcp
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession1.GstPad:send_rtcp_src:
>> caps = application/x-rtcp
>> /GstPipeline:pipeline0/GstUDPSink:udpsink1.GstPad:sink: caps =
>> application/x-rtcp
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_1.GstProxyPad:proxypad5:
>> caps = application/x-rtcp
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0: caps
>> = application/x-rtcp
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin/GstRtpSession:rtpsession0.GstPad:send_rtcp_src:
>> caps = application/x-rtcp
>> /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps =
>> application/x-rtcp
>> /GstPipeline:pipeline0/GstRtpBin:rtpbin.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad2:
>> caps = application/x-rtcp
>>
>> Does anyone know what's the problem here?
>>
>> Peter
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
>
>
> --
> www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
> twitter handle: @gst_kaps
> http://www.linkedin.com/in/kapilagrawal
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20110613/c8ee1076/attachment-0001.htm>
More information about the gstreamer-devel
mailing list