need help for transferring YUV data via TCP/IP

Tim Müller tim at centricular.com
Wed Jun 11 01:29:09 PDT 2014


On Tue, 2014-06-10 at 19:12 -0700, chewep wrote:

Hi,

> I would want to transfer webcam YUV data via TCP/IP to another PC for post
> processing. If possible I want to strip off U&V values before sending out
> the data. The below commands which I have found from this website are closer
> to my application. However they are not complete commands, any comments and
> amendments are highly appreciated. Thanks in advance. 

If you send raw YUV/RGB video frames over a stream-based (not
packet-based) connection such as TCP, you need to make sure that you can
split the stream into packets of the right size again at the receiver
later.

Two options:

> Server:
> gst-launch-1.0 videotestsrc ! tcpserversink port=5588 host=xx.xx.xx.xx
> 
> Client:
> gst-launch-1.0 tcpclientsrc port=5588 host=xx.xx.xx.xx

Then you need something like:

  tcpclientsrc ! videoparse format=i420 width=x height=x framerate=x/1 !
videoconvert ! autovideosink



If both sender and receiver are using GStreamer (and the same version),
you can also use something like this:

 gst-launch-1.0  ... ! gdppay ! tcpserversink
 gst-launch-1.0 tcpclientsrc ! gdpdepay ! ...

but the timestamps from the sender pipeline will filter through as is
then, which might have other effects.


If you're using git master (1.3.x) you can also use:

 gst-launch-1.0 ... ! rtpvrawpay ! rtpstreampay ! tcpserversink
 gst-launch-1.0 tcpclientsrc ! rtpstreamdepay ! rtpvrawdepay ! ...

Depends a bit on your exact use case what's best.

 Cheers
  -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list