Commit ec68d41d authored by Wim Taymans's avatar Wim Taymans
Browse files

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.
parent b4e5796a
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),
......
SUBDIRS = level
SUBDIRS = level rtp
DIST_SUBDIRS = level
DIST_SUBDIRS = level rtp
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
#!/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
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
#!/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
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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment