recording uncompressed rgb avi

Frédéric Drolet frederic.drolet at
Wed Apr 17 07:17:15 PDT 2013

 Hello everyone,

Has anybody found a solution to this? I’m pretty new to gstreamer (3
intensive days!) and I’m trying to change the scale and the color space of
an avi video for which I use demux, queues, dynamic addpads, etc.

I was working in C++ to handle windows and other stuff but since I hit a
wall to change the color space I've tried using gst-launch directly to see
what's happening. So far, I can change the scale of the video using this
command line:

gst-launch.exe filesrc name=filesource location=C:/folder/file.avi !
avidemux name=demux demux.audio_00 ! queue ! decodebin2 ! audioconvert !
autoaudiosink demux.video_00 ! queue ! decodebin2 ! videoscale !
video/x-raw-yuv,width=320,height=240 ! autovideosink

However, if I want to change the color space aftewards, it doesn't work to
simply add something like this right after the output of videoscale:

! ffmpegcolorspace ! video/x-raw-grey,width=320,height=240


! ffmpegcolorspace ! video/x-raw-yuv,format=(fourcc)GREY

Note that if I keep "video/x-raw-yuv" alone after the colorspace
conversion, it works again. Using verbose, we can see gst-launch gets stuck

:src: caps = video/x-raw-yuv, width=(int)792, height=(int)566,
on)30/1, format=(fourcc)I420, interlaced=(boolean)false,

Using some other color space such as NV12 seems to work but not all of
them. I don't understand why it doesn't go through the videoscale
and freeze at the ffmpegcolorspace converter instead but in any case I've
never been able to get a gray image so far...

I've played a little bit with caps but I could not make it work either but
from what I understand they act as filters or "parameters" for converters
such as videoscale and ffmepcolorspace. However, I'm not 100% condident
that I'm using them properely. My pipeline is growing big (especialing when
you're using tees!).

Is there another intermediate conversion I need to make to use colorspace
conversion? Is there another way than using an appsrc to convert the image
ourselves? I've seen some links talking about mixing openCV and gstreamer
but that seems like a bigger step for me right now...

Any help or reference would be greatly appreciated!


On Thu, 2012-11-08 at 08:47 +0100, Steffen.Roeber at wrote:


> is there any way to record a 8bit grayscale or uncompressed rgb avie

> file with gstreamer. I only found avimux which seems not to supported

> this.

You could just add support for it, shouldn't be too difficult :)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list