----------------------------SERVER------------------------------- VDEVICE=/dev/video0 DEST=127.0.0.1 WRES=352 HRES=288 FPS=15 BITRATE=256 #VOFFSET=900000000 VOFFSET=0 AOFFSET=0 VELEM="v4l2src device=$VDEVICE" #VELEM="videotestsrc is-live=1" VCAPS="video/x-raw-yuv,width=$WRES,height=$HRES,framerate=$FPS/1" VSOURCE="$VELEM ! queue ! videorate ! ffmpegcolorspace ! $VCAPS" VENC="x264enc tune=zerolatency byte-stream=true bitrate=$BITRATE ! rtph264pay" 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=5001 name=vrtpsrc" AELEM="autoaudiosrc" #AELEM="audiotestsrc is-live=1" ASOURCE="$AELEM ! queue ! audioresample ! audioconvert" AENC="faac ! rtpmp4apay" ARTPSINK="udpsink port=5002 host=$DEST ts-offset=$AOFFSET name=artpsink" ARTCPSINK="udpsink port=5003 host=$DEST sync=false async=false name=artcpsink" ARTCPSRC="udpsrc port=5003 name=artpsrc" gst-launch -v gstrtpbin name=rtpbin \ $VSOURCE ! $VENC ! rtpbin.send_rtp_sink_0 \ rtpbin.send_rtp_src_0 ! $VRTPSINK \ rtpbin.send_rtcp_src_0 ! $VRTCPSINK \ $VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \ $ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \ rtpbin.send_rtp_src_1 ! $ARTPSINK \ rtpbin.send_rtcp_src_1 ! $ARTCPSINK \ $ARTCPSRC ! rtpbin.recv_rtcp_sink_1 --------------------------CLIENT-------------------------------------- DEST=127.0.0.1 LATENCY=200 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)44100,encoding-name=(string)MP4A-LATM,config=(string)40002410" VIDEO_DEC="rtph264depay ! ffdec_h264" AUDIO_DEC="rtpmp4adepay ! faad" VIDEO_SINK="ffmpegcolorspace ! autovideosink" AUDIO_SINK="audioconvert ! audioresample ! autoaudiosink" 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 port=5001 host=$DEST sync=false async=false \ udpsrc caps=$AUDIO_CAPS port=5002 ! rtpbin.recv_rtp_sink_1 \ rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \ udpsrc port=5003 ! rtpbin.recv_rtcp_sink_1 \ rtpbin.send_rtcp_src_1 ! udpsink port=5003 host=$DEST sync=false async=false