[gst-devel] Format ofYUY2 stream

David Schleef ds at schleef.org
Wed Nov 12 00:53:38 CET 2008


On Tue, Nov 11, 2008 at 04:23:04PM -0500, OB Lutz wrote:
> Hey all
> 
> I'm attempting to write an application that will send a YUV (YUY2)
> stream out on udp and have gstreamer take it in and do some
> precessing. For starters, I'm trying to simply view the output with:
> 
> gst-launch -v udpsrc port=1234 buffer-size=0 !
> video/x-raw-yuv,format=\(fourcc\)YUY2,width=640,height=480,framerate=25/1
> ! ffmpegcolorspace ! xvimagesink sync=false
> 
> Only problem is I don't know how the stream should be formated. All I
> get is a green window with a few garbled rows of pixels at the top.
> I'm writing out YUYV, where each part one is a 8bit uint for YUYV
> being a full 32 bits. Are there some sort of header information that
> need to be sent along with this? Is there a site that details the
> format of the stream, better yet as it pertains to a UDP stream?

The obvious problem is that 640x480x2 = 614400, which is much larger
than the largest UDP packet size.  So you'll have to do some sort
of framing to get raw video into UDP packets.  There aren't really
any standards or examples to go by here -- people generally don't
send raw video over the network.

One simple solution would be to use GDP (GStreamer Data Protocol),
but that's GStreamer specific, and would require GStreamer on both
ends.



dave...





More information about the gstreamer-devel mailing list