New User Format Question

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Sep 11 17:08:34 PDT 2012


On Tue, 2012-09-11 at 16:51 -0700, Lawrence Anthony wrote:

Hi,

> I have the following pipeline that I want to output I420 (or any format other than YUY2) :  
> 
> gst-launch -v videotestsrc  ! ffmpegcolorspace  ! videoscale ! videorate ! 'video/x-raw-yuv,FORMAT=I420, width=640, height=480' !  v4l2loopback sync=false max-lateness=50000 device=/dev/video1
> 
> But when I run the stream through mplayer it says it is YU12:
> 
> Opening video decoder: [raw] RAW Uncompressed Video
> Movie-Aspect is undefined - no prescaling applied.
> VO: [xv] 640x480 => 640x480 Packed YUY2 
> Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
> 
> 
> I cant make this value change no matter what colorspace I specify.  Am I missing something simple here? 

In 0.10 (you are using 0.10), you need to specify the yuv format as
format fourcc. The way you wrote it, the field type will be a string,
but the field names are also case sensitive, so your FORMAT= field will
just be ignored basically.

Try (note the ' '):

  .. ! 'video/x-raw-yuv,format=(fourcc)I420,width=640,height=480' ! ...

In 1.0 it would be:

  .. ! 'video/x-raw,format=(string)I420,width=640,height=480' ! ...

Cheers
 -Tim





More information about the gstreamer-devel mailing list