Get parameters in rtspUri

I can see two issues in those logs from Kurento (KMS):

First block has several of these messages:

ERROR         playerendpoint kmsplayerendpoint.c:484:process_sample:<appsink3> PTS and DTS are not valid and a previous buffer was handled.

This tells me that the source encoding is providing bad PTS and DTS in the stream. These are timestamps, which must be correct or decoding won’t work.

Second block has lots of this:

WARN               rtpsource rtpsource.c:1147:update_receiver_stats: duplicate or reordered packet (seqnr 18067, expected 18069)

which means that there is a lot of packet loss, or some other issue that is making packets being lost (thus they get duplicated) or arriving too late (which makes them being reordered).

I’d like you to check a couple things:

  • Can you play the same exact RTSP address with VLC, without issues?

  • Can you play, again, but this time with GStreamer?

To try with GStreamer, you’ll need to first install it, running these commands (in Ubuntu 16.04 or 18.04):

sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
    gnupg

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83

source /etc/upstream-release/lsb-release 2>/dev/null || source /etc/lsb-release

sudo tee "/etc/apt/sources.list.d/kurento.list" >/dev/null <<EOF
# Kurento Media Server - Release packages
deb [arch=amd64] http://ubuntu.openvidu.io/6.13.2 $DISTRIB_CODENAME kms6
EOF

sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
    gstreamer1.5-libav \
    gstreamer1.5-plugins-{good,bad,ugly} \
    gstreamer1.5-tools

and when it is installed, RTSP playback is done with this command (video only, it is enough for the test):

GST_DEBUG=3 gst-launch-1.0 \
    rtspsrc location="rtsp://..." \
    ! "application/x-rtp, media=(string)video" \
    ! decodebin \
    ! autovideosink