4611565df9e133012b8c64e3ce82c560c8159b60
[platform/upstream/gstreamer.git] / tests / examples / rtp / server-VTS-H263p.sh
1 #!/bin/sh
2 #
3 # A simple RTP server 
4 #  sends the output of videotestsrc as h263+ encoded RTP on port 5000, RTCP is sent on
5 #  port 5001. The destination is 127.0.0.1.
6 #  the video receiver RTCP reports are received on port 5005
7 #
8 # .-------.    .-------.    .-------.      .----------.     .-------.
9 # |vts    |    |h263enc|    |h263pay|      | rtpbin   |     |udpsink|  RTP
10 # |      src->sink    src->sink    src->send_rtp send_rtp->sink     | port=5000
11 # '-------'    '-------'    '-------'      |          |     '-------'
12 #                                          |          |      
13 #                                          |          |     .-------.
14 #                                          |          |     |udpsink|  RTCP
15 #                                          |    send_rtcp->sink     | port=5001
16 #                           .-------.      |          |     '-------' sync=false
17 #                RTCP       |udpsrc |      |          |               async=false
18 #              port=5005    |     src->recv_rtcp      |                       
19 #                           '-------'      '----------'              
20 #
21
22 # change this to send the RTP data and RTCP to another host
23 DEST=127.0.0.1
24
25 # tuning parameters to make the sender send the streams out of sync. Can be used
26 # ot test the client RTCP synchronisation. 
27 #VOFFSET=900000000
28 VOFFSET=0
29 AOFFSET=0
30
31 # H263+ encode from the source
32 VELEM="videotestsrc is-live=1"
33 VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
34 VSOURCE="$VELEM ! $VCAPS"
35 VENC="ffenc_h263p ! rtph263ppay"
36
37 VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
38 VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false name=vrtcpsink"
39 VRTCPSRC="udpsrc port=5005 name=vrtpsrc"
40
41 PIPELINE="gstrtpbin name=rtpbin 
42             $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_2
43               rtpbin.send_rtp_src_2 ! $VRTPSINK 
44               rtpbin.send_rtcp_src_2 ! $VRTCPSINK
45             $VRTCPSRC ! rtpbin.recv_rtcp_sink_2"
46
47 echo $PIPELINE
48
49 gst-launch -v $PIPELINE