[gst-devel] Rendering mjpeg streaming video in the defined alpha channel of a jpeg

thelenko jtlenko at gmail.com
Thu Aug 26 18:58:06 CEST 2010


What I want to do is render a crosshair image on top of a mjpeg video feed
from a camera.  Since I am very new to gstreamer I proceeded to do this in
baby steps, but run into issues with my mjpeg video stream.  I am going to
outline my steps below so you can see what I tried, what worked, and where I
got stuck:

Sorry, it is a bit of a long read.  You can probably skip to the last
command if you desire.  Thanks in advance for your time and help :)

I am able to get the video feed to properly display using the following
command:

gst-launch gnomevfssrc
location=http://ccd1611-403/axis-cgi/mjpg/video.cgi?resolution=1280x1024 !
decodebin ! ffmpegcolorspace ! xvimagesink

I am able to display the image as a video using the following command:

gst-launch multifilesrc location="crosshair.jpg"
caps="image/jpeg,framerate=1/1" ! decodebin ! xvimagesink

Taking a look at the official documents I found an example for displaying a
video within a defined alpha channel.  The following example displays a snow
test video in the green channel of a pattern test image:

gst-launch videotestsrc pattern=smpte75 ! alpha method=green ! videomixer
name=mix ! ffmpegcolorspace ! xvimagesink videotestsrc pattern=snow ! mix.

I was able to transplant my image into the example like so:

gst-launch multifilesrc location="crosshair.jpg"
caps="image/jpeg,framerate=1/1" ! decodebin ! ffmpegcolorspace ! alphacolor
! alpha method=green ! queue ! videomixer name=mixer ! ffmpegcolorspace !
xvimagesink videotestsrc pattern=snow ! mixer.

I now had my cross-hair appearing on top of the snow test video.  I next
tried to switch the snow test video with my video feed:

gst-launch multifilesrc location="crosshair2.jpg"
caps="image/jpeg,framerate=1/1" ! decodebin ! ffmpegcolorspace ! alphacolor
! alpha method=green ! queue ! videomixer name=mixer ! ffmpegcolorspace !
autovideosink gnomevfssrc
location=http://ccd1611-403/axis-cgi/mjpg/video.cgi ! decodebin !
ffmpegcolorspace ! queue ! mixer.

When I run this I get the following error:

ERROR: from element /GstPipeline:pipeline0/GstGnomeVFSSrc:gnomevfssrc0:
Internal data flow error.
Additional debug info:
gstbasesrc.c(2507): gst_base_src_loop ():
/GstPipeline:pipeline0/GstGnomeVFSSrc:gnomevfssrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.

I assume there is something about the format of my video that it is not
liking, but I am not sure how to remedy it.

Any suggestions would be appreciated.. Thank you for your time and help :)
-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Rendering-mjpeg-streaming-video-in-the-defined-alpha-channel-of-a-jpeg-tp2340065p2340065.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list