[gst-devel] how to use gst-launch for playing yuv video files without any header?

Edgard Lima edgard.lima at indt.org.br
Wed Jan 16 10:08:44 CET 2008

gst-launch-0.10 -v videotestsrc num-buffers=120 ! video/x-raw-yuv,
width=64, height=32 ! filesink location=test.yuv

# 64 and 32 to make the buffer size 4094

gst-launch-0.10 filesrc location=test.yuv ! video/x-raw-yuv,
format=\(fourcc\)YUY2, width=64, height=32, framerate=\(fraction\)30/1 !

# if the size is not 4094

gst-launch-0.10 -v videotestsrc num-buffers=120 ! video/x-raw-yuv,
width=240, height=120 ! fakesink -v

# then look at the size on bytes of each buffer and try like this

gst-launch-0.10 filesrc location=test.yuv blocksize=57600  !
video/x-raw-yuv, format=\(fourcc\)YUY2, width=240, height=120,
framerate=\(fraction\)30/1 ! xvimagesink

# after all you also need an element (I think there is no such element
in GStreamer) to look at framerate in caps and set correct timestamps to
the buffers (or do it in your app pad-has-data)


ext Nikhil Raveendranathan wrote:
> Hi,
> This is what I had used:
> gst-launch filesrc location=test.yuv ! xvimagesink
> And in the program that I wrote, I linked filesrc, capsfilter and
> xvimagesink. Setting caps of capsfilter according to the properties of the
> yuv video file.
> Can you mention the gst-launch command that you had used for the same?
> Regards,
> Nikhil
> -----Original Message-----
> From: Felipe Contreras [mailto:felipe.contreras at gmail.com] 
> Sent: Monday, January 14, 2008 8:18 PM
> To: Nikhil Raveendranathan
> Cc: gstreamer-devel at lists.sourceforge.net
> Subject: Re: [gst-devel] how to use gst-launch for playing yuv video files
> without any header?
> On Jan 14, 2008 4:32 PM, Nikhil Raveendranathan
> <Nikhil_Raveendranathan at mindtree.com> wrote:
>> Hi,
>> I tried using gst-launch for playing yuv (I420) files in the following way:
>>  gst-launch filesrc location=test.yuv ! xvimagesink
>> Since I couldn't play the file, I also tried out a program with elements
>> filesrc, capsfilter and xvimagesink, setting caps with values for format,
>> framerate, width, height and aspect-ratio. I could see that the caps was
>> getting set for capsfilter element, and also upon checking out the
>> negotiated caps for xvimagesink, I could find that the same caps (as for
>> capsfilter) are getting set after caps negotiation. Now the file was
> getting
>> played, but I was only seeing some greenish images instead of the original
>> video.
>> Has anyone tried this out before? Does anyone know why this is so?
> Yes, I've done that.
> What is the actual gst-launch command you tried to run?
>> Regards,
>> Nikhil Raveendranathan| Engineer, R & D Services| MindTree Consulting Ltd.
>> |West Campus, Phase-2, Global Village, RVCE Post, Mysore Road,
> Bangalore-560
>> 059, INDIA |Voice +91 80 26264000 Extn: 66760 / Fax +91 80 26264100 | Mob :
>> 9886044872 | email: nikhil_raveendranathan at mindtree.com|www.mindtree.com |
>> This message (including attachment if any) is confidential and may be
>> privileged. If you have received this message by mistake please notify the
>> sender by return e-mail and delete this message from your system. Any
>> unauthorized use or dissemination of this message in whole or in part is
>> strictly prohibited.
>> E-mail may contain viruses. Before opening attachments please check them
> for
>> viruses and defects. While MindTree Consulting Limited (MindTree) has put
> in
>> place checks to minimize the risks, MindTree will not be responsible for
> any
>> viruses or defects or any forwarded attachments emanating either from
> within
>> MindTree or outside.
>> Please note that e-mails are susceptible to change and MindTree shall not
> be
>> liable for any improper, untimely or incomplete transmission.
>> MindTree reserves the right to monitor and review the content of all
>> messages sent to or from MindTree e-mail address. Messages sent to or from
>> this e-mail address may be stored on the MindTree e-mail system or else
>> where.
> What an annoying signature.

More information about the gstreamer-devel mailing list