[gst-devel] pixbuf from video file
Fredrik Persson
fredrik.p.persson at gmail.com
Thu Aug 2 13:05:39 CEST 2007
As a gstreamer newbie I started writing a small python/gstreamer app about a
year ago. Fetching a snapshot out of a running videostream took me months. I
almost abandoned gstreamer altogether because of this. This feat, currently,
requires an unproportionally huge knowledge of gstreamer inner workings to
accomplish.
I also see this question appear from time to time on the mailing list.
Therefore, in all humbleness, I suggest to the gstream core developers to
incorporate into gstreamer a snapshot element that hides this mess from a
regular programmer.
Best regards,
Fredrik Persson
On 8/2/07, Luis de Bethencourt <bethencourt at gmail.com> wrote:
>
> I'll give it a try this afternoon.
>
> Thanks a lot,
> Luis de Bethencourt
>
> On 8/2/07, Tim Müller <t.i.m at zen.co.uk> wrote:
> > On Tue, 2007-07-31 at 20:32 +0100, Luis de Bethencourt wrote:
> >
> > > ... I would need to get a pixbuf from the frame at the middle
> > > of the video. First frame is not as representative because of
> > > fade ins. How can I do this in gstreamer?
> >
> > You might want to have a look at totem's video-thumbnailer for
> > inspiration. It's a bit clunky, but fairly straight-forward (basically
> > it just uses playbin, sets it to PAUSED state, seeks, gets the last
> > frame via playbin's "frame" property and shoves that into a conversion
> > pipeline to get a GdkPixbuf).
> >
> > You can probably achieve the same thing with a pipeline like:
> >
> > filesrc location=video.file ! decodebin ! ffmpegcolorspace !
> > videoscale !
> > video/x-raw-rgb,width=64,height=64,bpp=24,depth=24,red_mask=... !
> > fakesink
> >
> > and then get a RGB24 buffer via fakesink's preroll-handoff signal (which
> > is emitted in PAUSED state), which in turn is easily convertible into a
> > GdkPixbuf or whatever you need.
> >
> > Cheers
> > -Tim
> >
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
>
>
> --
> Luis de Bethencourt Guimerá
> luisbg
> <bethencourt at gmail.com>
> GPG: B0ED1326
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20070802/5e493faf/attachment.htm>
More information about the gstreamer-devel
mailing list