[gst-devel] gst buffer to image
Mailing List SVR
lists at svrinformatica.it
Sun Dec 6 09:02:42 CET 2009
I solved myself pushing the frame to a second pipeline,
thanks
Nicola
In data sabato 5 dicembre 2009 23:27:59, Mailing List SVR ha scritto:
: > In data sabato 5 dicembre 2009 19:39:31, Mailing List SVR ha scritto:
> : > Hi all,
> >
> > I'm using a simple playbin pipeline, I can get the last frame with
> > something like this:
> >
> > In [124]: frame=player.get_property("frame")
> >
> > In [125]: frame
> > Out[125]: <gst.Buffer 0x1fed6f0 of size 115200 and data 0x49484445>
>
> additionally:
>
> In [34]: frame.get_caps().to_string()
> Out[34]: 'video/x-raw-yuv, width=(int)320, height=(int)240,
> framerate=(fraction)10/1, format=(fourcc)I420, interlaced=(boolean)false,
> pixel-aspect-ratio=(fraction)1/1'
>
> I tried this pipeline:
>
> gst-launch-0.10 -v filesrc location=/tmp/frame ! "video/x-raw-yuv,
> width=(int)320, height=(int)240, framerate=(fraction)10/1,
> format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-
> ratio=(fraction)1/1" ! jpegenc ! filesink location=test.jpg
>
> but the jpg generated is bad (attacched). I attacch also the saved
> frame.data
>
> > now I can access frame.data that would be the raw frame data, but how to
> > convert this frame to a jpg or png image? I tried to save the frame to a
> > file and to convert with jpegenc and pngenc with no success, any
> > suggestions?
> >
> > thanks
> > Nicola
> >
> > -------------------------------------------------------------------------
> >-- --- Join us December 9, 2009 for the Red Hat Virtual Experience, a free
> > event focused on virtualization and cloud computing.
> > Attend in-depth sessions from your desk. Your couch. Anywhere.
> > http://p.sf.net/sfu/redhat-sfdev2dev
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list