sarah john
sarah john

Reputation: 101

Setting resolution of video in gstreamer pipeline

Myself trying to play a yuv file(IP_Traffic_12820x720_32QP.yuv) wth gstreamer.I am only possible to see the file in yuv file player by setting the width and height as 1280 and 720 respectively.How can I set this resolution in gstreamer pipeline to view the image. Please help

Upvotes: 0

Views: 15036

Answers (1)

Mark Tolley
Mark Tolley

Reputation: 1408

You can set the resolution of your raw video using a capsfilter. Try something like this from the command line:

gst-launch-0.10 filesrc location=input.yuv ! video/x-raw-yuv,width=1280,height=720,framerate=30/1 ! ffmpegcolorspace ! autovideosink

From code, you need to create a capsfilter element and then set it's caps property. (see: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-capsfilter.html)

Note: for gstreamer-1.0 you would use video/x-raw instead of video/x-raw-yuv, and videoconvert instead of ffmpegcolorspace.

Upvotes: 3

Related Questions