UDP vs TCP
it
it at sca-uk.com
Mon Mar 24 12:42:56 PDT 2014
Hi Guys,
I'm trying to live stream a v4l2src over a tethered mobile phone local
area network between two IP addresses 192.168.43.134 and 192.168.43.247.
The video capture card is plugged into 192.168.43.134.
I have live streaming with very little lag initially in TCP, apart from
network buffering which gets worse by the minute, using these commands:
# TCP host command
gst-launch v4l2src device=/dev/video0 queue-size=1 always-copy=0 !
videoscale ! videorate ! ffmpegcolorspace ! videobalance brightness=.3
contrast=.8 ! gamma gamma = .5 ! tee name=t1 \
t1. ! queue ! xvimagesink sync=false \
t1. ! queue ! videorate !
video/x-raw-yuv,format=I420,width=640,height=480,framerate=30000/1001 !
theoraenc quality=63 keyframe-force=1 ! oggmux ! filesink
location=video.ogg \
t1. ! queue ! jpegenc ! tcpserversink port=5000
# TCP client command
gst-launch tcpclientsrc host=192.168.43.134 port=5000 ! jpegdec ! tee
name=t1 \
t1. ! queue ! xvimagesink sync=false \
t1. ! queue ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=30000/1001 ! theoraenc
quality=63 keyframe-force=1 ! oggmux ! filesink location=video.ogg
So I'm trying to switch to UDP, and I can't get it to work. Here is
what I'm using:
# UDP
gst-launch -v v4l2src device=/dev/video0 queue-size=1 always-copy=0 !
videoscale ! videorate ! ffmpegcolorspace ! videobalance brightness=.3
contrast=.8 ! gamma gamma = .5 ! video/x-raw-yuv, framerate=30000/1001,
width=640, height=480, pixel-aspect-ratio=1/1 ! tee name=t1 \
t1. ! queue ! xvimagesink sync=false \
t1. ! queue ! theoraenc quality=63 keyframe-force=1 ! filesink
location=video.ogg \
t1. ! queue ! rtpvrawpay ! udpsink host=192.168.43.134 port=5000
gst-launch udpsrc caps="application/x-rtp, format=I420,
framerate=30000/1001, width=640, height=480, interlaced=false,
pixel-aspect-ratio=1/1" port=5000 ! rtpvrawdepay ! xvimagesink
I'd be very grateful for any help.
Regards
Steve.
More information about the gstreamer-devel
mailing list