Need help using gst-launch to display a PNG image

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help using gst-launch to display a PNG image

Bill West
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.

------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Need help using gst-launch to display a PNG image

Tim-Philipp Müller-2
On Wed, 2010-08-11 at 11:08 -0700, Bill West wrote:

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

>         stream stopped, reason not-negotiated

This is a bug of some sort in autovideosink really.

Try:

  gst-launch-0.10 filesrc location=overlay.png ! pngdec !
ffmpegcolorspace ! videoscale ! imagefreeze ! autovideosink

(or try using ximagesink instead of autovideosink)

Cheers
 -Tim




------------------------------------------------------------------------------
This SF.net email is sponsored by

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel