UDP vs TCP

Chuck Crisler ccrisler at mutualink.net
Mon Mar 24 13:27:22 PDT 2014


Was it an oversight that you didn't specify the format in the capsfilter
for the udp pipeline? Shouldn't you specify a payload type for the rtp
payloader and depayloader (even through there is a default)? Do you need to
specify an MTU size (< 1400) for the mobile network? Shouldn't you reverse
the videorate and videoscale? I don't really know how these are being used
but you don't want to scale frames that will be discarded in videorate.


On Mon, Mar 24, 2014 at 3:42 PM, it <it at sca-uk.com> wrote:

> 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.
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140324/4e36c511/attachment.html>


More information about the gstreamer-devel mailing list