udpsrc : I can't receive h264 packet and play it

Mathieu Duponchelle mathieu at centricular.com
Wed Aug 21 13:29:47 UTC 2019


Hey,

Try specifying a host on the udpsink and an address on the udpsrc, these pipelines work for me:

Receiver:

gst-launch-1.0 udpsrc caps="application/x-rtp" address=127.0.0.1 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! queue ! xvimagesink

Sender:

gst-launch-1.0 filesrc location=/home/meh/Videos/small_ball.mp4 ! qtdemux ! h264parse ! rtph264pay ! udpsink host=127.0.0.1

On 8/21/19 10:49 AM, Du Dengke wrote:
> Hi experts:
> OS: Ubuntu 16.04.6 LTS
> Gstreamer Version: I update it to 1.16.0
>
> Sender and Receiver both on one machine.
>
> Sender:
>     GST_DEBUG=4 gst-launch-1.0 filesrc location=easy_c.mp4 ! qtdemux ! h264parse ! rtph264pay ! udpsink
> I using wireshark to watch, all thing go well, something like:
>     ......
>     31072 121.161706931 127.0.0.1 127.0.0.1 UDP 1442 51378 → 5004 Len=1400
>     ......
>
> Receiver:
>     GST_DEBUG=4 gst-launch-1.0 udpsrc caps="application/x-rtp" ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink
>
> seems go well, but nothing appear, I take some log here:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Setting pipeline to PLAYING ...
> 0:00:00.020110200  4381      0x202cc00 INFO               GST_EVENT gstevent.c:1450:gst_event_new_latency: creating latency event 0:00:00.000000000
> 0:00:00.020125274  4381      0x202cc00 INFO                     bin gstbin.c:2780:gst_bin_do_latency_func:<pipeline0> configured latency of 0:00:00.000000000
> 0:00:00.020136579  4381      0x202cc00 INFO              GST_STATES gstbin.c:2503:gst_bin_element_set_state:<xvimagesink0> current READY pending PAUSED, desired next PLAYING
> 0:00:00.020142248  4381      0x202cc00 INFO              GST_STATES gstbin.c:2957:gst_bin_change_state_func:<pipeline0> child 'xvimagesink0' is changing state asynchronously to PLAYING
> 0:00:00.020148377  4381      0x202cc00 INFO              GST_STATES gstbin.c:2503:gst_bin_element_set_state:<avdec_h264-0> current PAUSED pending VOID_PENDING, desired next PLAYING
> 0:00:00.020154187  4381      0x202cc00 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<avdec_h264-0> completed state change to PLAYING
> 0:00:00.020159424  4381      0x202cc00 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<avdec_h264-0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
> 0:00:00.020166928  4381      0x202cc00 INFO              GST_STATES gstbin.c:2951:gst_bin_change_state_func:<pipeline0> child 'avdec_h264-0' changed state to 4(PLAYING) successfully
> 0:00:00.020173149  4381      0x202cc00 INFO              GST_STATES gstbin.c:2503:gst_bin_element_set_state:<h264parse0> current PAUSED pending VOID_PENDING, desired next PLAYING
> 0:00:00.020178564  4381      0x202cc00 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<h264parse0> completed state change to PLAYING
> 0:00:00.020183568  4381      0x202cc00 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<h264parse0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
> 0:00:00.020190138  4381      0x202cc00 INFO              GST_STATES gstbin.c:2951:gst_bin_change_state_func:<pipeline0> child 'h264parse0' changed state to 4(PLAYING) successfully
> 0:00:00.020196292  4381      0x202cc00 INFO              GST_STATES gstbin.c:2503:gst_bin_element_set_state:<rtph264depay0> current PAUSED pending VOID_PENDING, desired next PLAYING
> 0:00:00.020201631  4381      0x202cc00 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<rtph264depay0> completed state change to PLAYING
> 0:00:00.020206440  4381      0x202cc00 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<rtph264depay0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
> 0:00:00.020212854  4381      0x202cc00 INFO              GST_STATES gstbin.c:2951:gst_bin_change_state_func:<pipeline0> child 'rtph264depay0' changed state to 4(PLAYING) successfully
> 0:00:00.020222030  4381      0x202cc00 INFO              GST_STATES gstelement.c:2676:gst_element_continue_state:<udpsrc0> completed state change to PLAYING
> 0:00:00.020228362  4381      0x202cc00 INFO              GST_STATES gstelement.c:2579:_priv_gst_element_state_changed:<udpsrc0> notifying about state-changed PAUSED to PLAYING (VOID_PENDING pending)
> 0:00:00.020234673  4381      0x202cc00 INFO              GST_STATES gstbin.c:2951:gst_bin_change_state_func:<pipeline0> child 'udpsrc0' changed state to 4(PLAYING) successfully
> New clock: GstSystemClock
> 0:01:17.678501741  4381      0x21460a0 INFO               GST_EVENT gstevent.c:901:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
> 0:01:17.678521905  4381      0x21460a0 INFO                 basesrc gstbasesrc.c:2962:gst_base_src_loop:<udpsrc0> marking pending DISCONT
> 0:01:17.678543028  4381      0x21460a0 INFO               GST_EVENT gstevent.c:901:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, offset=0:00:00.000000000, stop=99:99:99.999999999, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:01:17.658403007, duration 99:99:99.999999999
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> The receiver stop here.
>
> My question:
>     How to let me know the receiver receive the packets, and why can't i play it?
>
> //dengke
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190821/b6a69592/attachment.html>


More information about the gstreamer-devel mailing list