tests/examples/: Added some RTP example scripts for sending and receiving RTP streams.

Original commit message from CVS:
* tests/examples/Makefile.am:
* tests/examples/rtp/Makefile.am:
* tests/examples/rtp/client-H263p-AMR.sh:
* tests/examples/rtp/client-H263p-PCMA.sdp:
* tests/examples/rtp/client-H263p-PCMA.sh:
* tests/examples/rtp/client-H264-PCMA.sdp:
* tests/examples/rtp/client-H264-PCMA.sh:
* tests/examples/rtp/client-PCMA.sh:
* tests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh:
* tests/examples/rtp/server-alsasrc-PCMA.sh:
* tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh:
* tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh:
Added some RTP example scripts for sending and receiving RTP streams.
This commit is contained in:
Wim Taymans 2007-09-04 18:30:22 +00:00
parent b4e5796a04
commit ec68d41d69
13 changed files with 191 additions and 2 deletions

View file

@ -1,3 +1,19 @@
2007-09-04 Wim Taymans <wim.taymans@gmail.com>
* tests/examples/Makefile.am:
* tests/examples/rtp/Makefile.am:
* tests/examples/rtp/client-H263p-AMR.sh:
* tests/examples/rtp/client-H263p-PCMA.sdp:
* tests/examples/rtp/client-H263p-PCMA.sh:
* tests/examples/rtp/client-H264-PCMA.sdp:
* tests/examples/rtp/client-H264-PCMA.sh:
* tests/examples/rtp/client-PCMA.sh:
* tests/examples/rtp/server-VTS-H263p-ATS-PCMA.sh:
* tests/examples/rtp/server-alsasrc-PCMA.sh:
* tests/examples/rtp/server-v4l2-H263p-alsasrc-AMR.sh:
* tests/examples/rtp/server-v4l2-H264-alsasrc-PCMA.sh:
Added some RTP example scripts for sending and receiving RTP streams.
2007-09-04 Wim Taymans <wim.taymans@gmail.com>
* sys/v4l2/gstv4l2src.c: (gst_v4l2_get_caps_info),

View file

@ -1,3 +1,3 @@
SUBDIRS = level
SUBDIRS = level rtp
DIST_SUBDIRS = level
DIST_SUBDIRS = level rtp

View file

@ -0,0 +1,12 @@
noinst_SCRIPTS=client-H263p-AMR.sh \
client-H263p-PCMA.sh \
client-H264-PCMA.sh \
client-PCMA.sh \
server-alsasrc-PCMA.sh \
server-v4l2-H263p-alsasrc-AMR.sh \
server-v4l2-H264-alsasrc-PCMA.sh \
server-VTS-H263p-ATS-PCMA.sh
EXTRA_DIST= $(noinst_SCRIPTS) \
client-H263p-PCMA.sdp \
client-H264-PCMA.sdp

View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# A simple RTP receiver
#
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)AMR,encoding-params=(string)1,octet-align=(string)1"
gst-launch -v gstrtpbin name=rtpbin latency=100 \
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
rtpbin. ! rtpamrdepay ! amrnbdec ! alsasink slave-method=1 \
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false

View file

@ -0,0 +1,12 @@
v=0
o=- 1188340656180883 1 IN IP4 192.168.1.110
s=Session streamed by GStreamer
i=server.sh
t=0 0
a=tool:GStreamer
a=type:broadcast
m=video 5000 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H263-1998/90000
m=audio 5002 RTP/AVP 8
c=IN IP4 0.0.0.0

View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# A simple RTP receiver
#
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998"
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
gst-launch -v gstrtpbin name=rtpbin \
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtph263pdepay ! ffdec_h263 ! xvimagesink \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
rtpbin. ! rtppcmadepay ! alawdec ! alsasink \
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false

View file

@ -0,0 +1,12 @@
v=0
o=- 1188340656180883 1 IN IP4 192.168.1.110
s=Session streamed by GStreamer
i=server.sh
t=0 0
a=tool:GStreamer
a=type:broadcast
m=video 5000 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
m=audio 5002 RTP/AVP 8
c=IN IP4 0.0.0.0

View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# A simple RTP receiver
#
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
gst-launch -v gstrtpbin name=rtpbin latency=100 \
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtph264depay ! ffdec_h264 ! xvimagesink \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink port=5005 sync=false async=false \
udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \
rtpbin. ! rtppcmadepay ! alawdec ! alsasink slave-method=1 \
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! udpsink port=5007 sync=false async=false

View file

@ -0,0 +1,12 @@
#!/bin/sh
#
# A simple RTP receiver
#
AUDIO_CAPS="application/x-rtp,media=(string)audio,clock-rate=(int)8000,encoding-name=(string)PCMA"
gst-launch -v gstrtpbin name=rtpbin \
udpsrc caps=$AUDIO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtppcmadepay ! alawdec ! alsasink \
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink port=5003 sync=false async=false

View file

@ -0,0 +1,16 @@
#!/bin/sh
#
# A simple RTP server
#
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
gst-launch -v gstrtpbin name=rtpbin \
videotestsrc ! $VCAPS ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink port=5000 \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
audiotestsrc samplesperbuffer=1000 ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink port=5002 \
rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1

View file

@ -0,0 +1,10 @@
#!/bin/sh
#
# A simple RTP server
#
gst-launch -v gstrtpbin name=rtpbin \
alsasrc ! alawenc ! rtppcmapay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink port=5000 \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
udpsrc port=5003 ! rtpbin.recv_rtcp_sink_0

View file

@ -0,0 +1,22 @@
#!/bin/sh
#
# A simple RTP server
#
# change these to change the server sync. This causes the server to send the
# packets largly out-of-sync, the client should use the RTCP SR packets to
# restore proper lip-sync between the streams.
AOFFSET=0
VOFFSET=0
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
gst-launch -v gstrtpbin name=rtpbin \
v4l2src ! $VCAPS ! videorate ! ffmpegcolorspace ! ffenc_h263p ! rtph263ppay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! queue ! udpsink port=5000 ts-offset=$AOFFSET \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
alsasrc ! audioconvert ! amrnbenc ! rtpamrpay ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \
rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1

View file

@ -0,0 +1,26 @@
#!/bin/sh
#
# A simple RTP server
#
AOFFSET=0
VOFFSET=0
# H264 encode from a v4l2src
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1"
VSOURCE="v4l2src ! $VCAPS ! videorate ! ffmpegcolorspace"
VENC="x264enc byte-stream=true bitrate=300 ! rtph264pay"
# PCMA encode from an alsasrc
ASOURCE="alsasrc ! audioconvert"
AENC="alawenc ! rtppcmapay"
gst-launch -v gstrtpbin name=rtpbin \
$VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! queue ! udpsink port=5000 ts-offset=$AOFFSET \
rtpbin.send_rtcp_src_0 ! udpsink port=5001 sync=false async=false \
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0 \
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! queue ! udpsink port=5002 ts-offset=$VOFFSET \
rtpbin.send_rtcp_src_1 ! udpsink port=5003 sync=false async=false \
udpsrc port=5007 ! rtpbin.recv_rtcp_sink_1