Search code examples
gstreamerrtsp

Network Streaming (RTSP) but No Display in Receiving Side


I try to stream, but I don't see any display in receiving side. This is my diagram:

  One Image --> RTSP using UDP (using GStreamer) --> ?

Here is my command line and output in Terminal:

Sending (Server)
  from Github post with modification of "x264enc" --> "avenc_h263"
  IP address of the computer is 192.168.3.30.
gst-launch-1.0 -v multifilesrc location=./IMG_7995.JPG loop=true ! jpegdec ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=30/1 ! avenc_h263 ! rtph263ppay pt=96 ! udpsink host=192.168.3.30 port=6000

** (gst-launch-1.0:11311): CRITICAL **: gst_ffmpeg_cfg_set_property: assertion 'qdata->size == sizeof (gint64)' failed
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstJpegDec:jpegdec0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)4032\,\ height\=\(int\)3024\,\ interlace-mode\=\(string\)progressive\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ chroma-site\=\(string\)mpeg2\,\ colorimetry\=\(string\)1:4:0:0\,\ framerate\=\(fraction\)0/1"

Receiving (Client)
  from GStreamer example with modification of "ffdec_h263" --> "avdec_h263" and remove "queue-delay=0" due to error of no element
gst-launch-1.0 udpsrc port=6000 ! application/x-rtp, clock-rate=90000,payload=96 ! rtph263pdepay ! avdec_h263 ! xvimagesink

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

I don't see any error (or error in output I just not notice?) in output, but there is no display. I actually performed [the Diagnostic] from GStreamer to verify my GStreamer installation and it is good. I also switched computer between sending and receiving sides.

I am expecting a video play the image from sending side at receiving computer.

What I miss in my GStreamer pipelines? Thanks.

Runtime Environment
  OS: Ubuntu 18.04 receiving and 16.04 sending
  GStreamer: 1.14.5 receiving and 1.8.3 sending


Solution

  • You may try rtph263pay instead of rtph263ppay.

    The following works for me:

    Sender:

    gst-launch-1.0 -v multifilesrc location=./IMG_7995.JPG loop=true ! jpegdec ! videoconvert ! videoscale ! videorate ! video/x-raw,framerate=30/1 ! avenc_h263 ! h263parse ! rtph263pay pt=96 ! udpsink host=192.168.3.30 port=6000
    

    Receiver (192.168.3.30):

    gst-launch-1.0 -v udpsrc address=192.168.3.30 port=6000 ! application/x-rtp,encoding-name=H263 ! rtph263depay ! h263parse ! avdec_h263 ! queue ! xvimagesink