recording uncompressed rgb avi
Frédéric Drolet
frederic.drolet at gmail.com
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
or
! 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
on
/GstPipeline:pipeline0/GstDecodeBin2:decodebin21/ffdec_mpeg4:ffdec_mpeg40.GstPad
:src: caps = video/x-raw-yuv, width=(int)792, height=(int)566,
framerate=(fracti
on)30/1, format=(fourcc)I420, interlaced=(boolean)false,
pixel-aspect-ratio=(fra
ction)1/1
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!
Cheers!
On Thu, 2012-11-08 at 08:47 +0100, Steffen.Roeber at hella.com wrote:
Hi,
> 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 :)
Cheers
-Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130417/71d1fe1a/attachment.html>
More information about the gstreamer-devel
mailing list