[gst-devel] gst buffer to image

Gabriel Duarte confusosk8 at gmail.com
Sun Dec 6 13:47:20 CET 2009


How!

On Sun, Dec 6, 2009 at 6:02 AM, Mailing List SVR <lists at svrinformatica.it>wrote:

> 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
> >
>
>
> ------------------------------------------------------------------------------
> 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
>



-- 
Gabriel Duarte
Linux User #471185
Rio de Janeiro - RJ
http://kinuxlinux.org/gabriel_duarte

Phones:
(55) (21) 9463-7760 /*Mobile*/
(55) (21) 2464-9302 /*Home*/
(55) (21) 2529-5080 /*Work*/


-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s: a--- C++ UL+++ P L++++ E- W+ N++ o++ K++ w---
O- M- V- PS++ PE++ Y PGP- t++ 5-- X+++ R tv++ b++ DI+ D++
G++ e+ h* r+ y++++
------END GEEK CODE BLOCK------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091206/db27baed/attachment.htm>


More information about the gstreamer-devel mailing list