cant make gstreamer raw video rtp script work

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cant make gstreamer raw video rtp script work

Markus
Hi all,

I am trying to stream videos from a machine to another using rtp, i found some examples and tried to adapt them to my own situation, but could not make it work, i get the error on server side:
ERROR: pipeline doesnt want to pause
ERROR: from element ....videotestsrc: could not negotiate format
...check your filtered caps, if any

Do someone have any idea what is wrong?

Thank you in advance

Markus

the scripts :

Server.sh:


IPCLIENT=${1-"127.0.0.1"}
PORTCLIENT=${2-"5000"}
LATENCY=${3-"200"}

ENCODER="x264enc"
PAYLOADER="rtph264pay config-interval=3"

VIDEOCAPS="video/x-raw-yuv,width=352,height=288,framerate=10/1"
BITRATE=160
ENCODER_OPT="bitrate=$BITRATE byte-stream=true bframes=4 ref=4 me=hex subme=4 weightb=true threads=0"

gst-launch -tv \
        gstrtpbin name=rtpbin latency=$LATENCY buffer-mode=0 \
                videotestsrc \
                ! queue ! videoscale method=1 ! videorate ! $VIDEOCAPS \
                ! tee name="display" \
                        ! queue ! cairotextoverlay text="$ENCODER $BITRATE" shaded-background=true \
                        ! queue ! $ENCODER $ENCODER_OPT \
                        ! $PAYLOADER \
                        ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
                        ! udpsink port=$PORTCLIENT host=$IPCLIENT sync=false async=false \
                display. \
                        ! queue ! cairotextoverlay text="Source" shaded-background=true \
                        ! autovideosink

client.sh

PORTCLIENT=${1-"5000"}
LATENCY=${2-"500"}

DECODER="ffdec_h264"
DEPAYLOADER="rtph264depay"

RTPCAPS="application/x-rtp,media=\(string\)video,clock-rate=\(int\)90000,encoding-name=\(string\)H264,ssrc=\(guint\)2834894965,payload=\(int\)96,clock-base=\(guint\)751940475,seqnum-base=\(guint\)56645"

gst-launch -tvm \
        gstrtpbin name=rtpbin latency=$LATENCY buffer-mode=0 \
                udpsrc caps=$RTPCAPS port=$PORTCLIENT \
                ! rtpbin.recv_rtp_sink_0 \
                        rtpbin. ! queue ! $DEPAYLOADER ! $DECODER ! autovideosink