Created
October 3, 2011 21:05
-
-
Save anonymous/1260254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client | |
========= | |
Two possibility to connect RTP. | |
1. SDP which can be put inside http server | |
$ cat client.sdp | |
v=0 | |
o=- 1188340656180883 1 IN IP4 127.0.0.1 | |
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 127.0.0.1 | |
a=rtpmap:96 H263-1998/90000 | |
2. or Pipe | |
$ cat client.sh | |
#!/bin/sh | |
# | |
# A simple RTP receiver | |
# | |
VIDEO_CAPS="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" | |
DEST=192.168.1.100 | |
#DEST=localhost | |
VIDEO_DEC="rtph263pdepay ! ffdec_h263" | |
VIDEO_SINK="ffmpegcolorspace ! autovideosink" | |
LATENCY=100 | |
gst-launch -v gstrtpbin name=rtpbin latency=$LATENCY \ | |
udpsrc caps=$VIDEO_CAPS port=5000 ! rtpbin.recv_rtp_sink_0 \ | |
rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \ | |
udpsrc port=5001 ! rtpbin.recv_rtcp_sink_0 \ | |
rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=false async=false | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gst-launch -vvv playbin uri=file:///var/tmp/client.sdp | |
or | |
$ http://webserver/client.sdp | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat server.sh | |
#!/bin/sh | |
DEST=127.0.0.1 | |
VOFFSET=0 | |
AOFFSET=0 | |
VELEM="videotestsrc is-live=1" | |
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=15/1" | |
VSOURCE="$VELEM ! $VCAPS" | |
VENC="ffenc_h263p ! rtph263ppay" | |
VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink" | |
VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false name=vrtcpsink" | |
VRTCPSRC="udpsrc port=5005 name=vrtpsrc" | |
PIPELINE="gstrtpbin name=rtpbin | |
$VSOURCE ! $VENC ! rtpbin.send_rtp_sink_2 | |
rtpbin.send_rtp_src_2 ! $VRTPSINK | |
rtpbin.send_rtcp_src_2 ! $VRTCPSINK | |
$VRTCPSRC ! rtpbin.recv_rtcp_sink_2" | |
echo $PIPELINE | |
gst-launch -v $PIPELINE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment