GNOME Bugzilla – Bug 573176
video stream from single png image fails
Last modified: 2009-03-02 16:41:24 UTC
Trying to use a single png image as src for a video pipeline, in conjunction with a videomixer element one could build an overlay or watermark this way. This works for one and only one frame before eos is sent: gst-launch-0.10 filesrc location=$1 ! pngdec ! ffmpegcolorspace ! autovideosink The pngdec description says "If there is no framerate set on sink caps, it sends EOS after the first picture". Setting the framerate downstream results in an internal data stream error from pngdec: gst-launch-0.10 filesrc location=$1 ! pngdec ! video/x-raw-rgb, framerate=25/1 ! ffmpegcolorspace ! autovideosink output with GST_DEBUG=2: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... 0:00:00.043916720 5092 0x9d36710 WARN basetransform gstbasetransform.c:1037:gst_base_transform_acceptcaps:<capsfilter0> transform could not transform video/x-raw-rgb, width=(int)64, height=(int)64, 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 in anything we support (othercaps (NULL)) 0:00:00.044063120 5092 0x9d36710 WARN pngdec gstpngdec.c:518:gst_pngdec_task:<pngdec0> error: Internal data stream error. 0:00:00.044075720 5092 0x9d36710 WARN pngdec gstpngdec.c:518:gst_pngdec_task:<pngdec0> error: stream stopped, reason not-negotiated ERROR: from element /GstPipeline:pipeline0/GstPngDec:pngdec0: Internal data stream error. Additional debug info: gstpngdec.c(518): gst_pngdec_task (): /GstPipeline:pipeline0/GstPngDec:pngdec0: stream stopped, reason not-negotiated ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... FREEING pipeline ... System is Debian Testing/Unstable, Package is gstreamer0.10-plugins-good 0.10.13-3
Simon: it says "no framerate set on the *sink* caps", ie. before the pngdec. What's the pipeline that you said on IRC used to work before the upgrade? (Note: overall use case is how to overlay a still image with videomixer, so we should probably add a png and an jpeg example pipeline to the videomixer docs, since this is really an FAQ)
(In reply to comment #1) > Simon: it says "no framerate set on the *sink* caps", ie. before the pngdec. i have tried rearranging the gst-launch pipeline to this (python, no idea how to set sink caps for gst-launch-0.10): pngdec = gst.element_factory_make ("pngdec", "png-decoder") caps = gst.Caps ("""video/x-raw-rgb, framerate=25/1""") pngdec.get_pad ("sink").set_caps (caps) It results in the "gstbasetransform.c:1037..."[snip] error from above, maybe transforming rgb -> yuv is the problem? > What's the pipeline that you said on IRC used to work before the upgrade? gst-launch-0.10 filesrc location=$1 ! pngdec ! alphacolor ! ffmpegcolorspace ! videomixer name=mix ! ffmpegcolorspace ! autovideosink videotestsrc ! video/x-raw-yuv, width=640, height=480 ! ffmpegcolorspace ! mix. pngdec did not send an EOS after frame 1 so the image was kept being displayed. > (Note: overall use case is how to overlay a still image with videomixer, so we > should probably add a png and an jpeg example pipeline to the videomixer docs, > since this is really an FAQ) Hm, what FAQ do you mean?
lots of confusion here. The reason it broke is because pngdec caps are not compatible with the alphacolor caps (anymore). I believe this is because of this commit http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=5e32a710d7e28c063424d9334a74973c7ad19b0c. Putting a colorspace in front of the alphacolor element solves this. but you can also remove the alphacolor if you don't need a custom alpha value.