#! /bin/sh

gst-launch-0.10 -v gstrtpbin name=rtpbin \
  v4l2src device=$1 ! queue ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,width=320,height=280 ! dsph264enc ! rtph264pay ! rtpbin.send_rtp_sink_0 \
  rtpbin.send_rtp_src_0 ! udpsink port=5000 host=$2 ts-offset=0 name=vrtpsink \
  rtpbin.send_rtcp_src_0 ! udpsink port=5001 host=$2 sync=false async=false name=vrtcpsink \
  udpsrc port=5005 name=vrtpsrc ! rtpbin.recv_rtcp_sink_0

