[gst-devel] Need help using gst-launch to display a PNG image

Bill West william.l.west at gmail.com
Wed Aug 11 20:08:17 CEST 2010


Hi all,

I'm new to gstreamer, and it looks like a wonderful alternative to "raw"
calls to Xlib, OpenGL, SDL, etc.  But, I'm having a heckuva time getting it
to work.

My goal:  eventually, I'd like to composite video and stills, all inside a
PNG image "stencil" with an alpha channel that have a transparent window in
the middle.  For now, my baby-steps goal is just to display the PNG image.

My environment:  Ubuntu Studio, 10.04, writing C++ code.  Initially, I
figured I'd concoct a gst-launch command, and if I can get that to do
everything I need, then I'll "convert" it to C++ code for the final product.
 I want to stay LGPL if at all possible.

Rambling paragraph you can skip:  I know a big part of my problem is my
ignorance of the finer details of decoding, demuxing, etc., etc.  :) but for
now, as I say, I just want to get gst-launch to display at PNG file.  From
looking all over the web, my best bet is to use something called
imagefreeze.  I found that I needed to build gstreamer from source to get
that, 'cause 0.10.21 that Ubuntu has packaged doesn't have it.  Got over
that hurdle.

My problem:  from what I can tell, I need to type something like this:

gst-launch -v filesrc location=overlay.png ! pngdec ! imagefreeze !
autovideosink


But when I do, I get this:


Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:src: caps = video/x-raw-rgb,
width=(int)1024, height=(int)768, bpp=(int)32, framerate=(fraction)0/1,
depth=(int)32, endianness=(int)4321, red_mask=(int)-16777216,
green_mask=(int)16711680, blue_mask=(int)65280, alpha_mask=(int)255
*ERROR: from element /GstPipeline:pipeline0/GstPngDec:pngdec0: Internal data
stream error.*
Additional debug info:
gstpngdec.c(550): gst_pngdec_task ():
/GstPipeline:pipeline0/GstPngDec:pngdec0:
stream stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstPngDec:pngdec0.GstPad:src: caps = NULL
Freeing pipeline ...


My question(s):  What am I doing wrong?  And, any hints on how to get the
movie to play inside the PNG stencil?  How about a still image?  If I am not
pushing my luck with too many questions, how could I make the still image
fade in from black and fade out to black, after displaying for a couple
seconds?  Should I just go back to Xlib, OpenGL, etc??  :)

I've tried swapping out autovideosink with all the other options that, in my
ignorance, are equivalent.  I've tried throwing in elements that seem like
they might be needed, like alphacolor and ffmpegcolorspace, but nothing
works.

Thanks all, in advance, for any ideas,

Bill.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100811/ce3deec3/attachment.htm>


More information about the gstreamer-devel mailing list