[gst-devel] Overlaying an image on a live stream

sudarshan bisht bisht.sudarshan at gmail.com
Wed Mar 31 06:31:05 CEST 2010


Try following ;

 gst-launch v4l2src device=/dev/video0 !
'video/x-raw-yuv,width=386,height=386,framerate=30/1' ! ffmpegcolorspace  !
videomixer name=mix !  ffmpegcolorspace  ! xvimagesink filesrc
location=crosshair.png ! pngdec !
ffmpegcolorspace !
'video/x-raw-yuv,format=(fourcc)AYUV,width=386,height=386,framerate=30/1'  !
freeze  ! mix

On Wed, Mar 31, 2010 at 9:32 AM, Vogan <vaughan at infact.co.nz> wrote:

>
> Hi
>
> Thanks for the help, I am now trying this
>
> gst-launch v4l2src device=/dev/video0 !
> 'video/x-raw-yuv,width=320,height=240,framerate=30/1' ! ffmpegcolorspace  !
> videomixer name=mix ! xvimagesink filesrc location=crosshair.png ! pngdec !
> ffmpegcolorspace ! freeze ! mix.
>
> and are getting the following error once the pipeline has started
>
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
> data flow error.
> Additional debug info:
> gstbasesrc.c(2234): gst_base_src_loop ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> streaming task paused, reason not-negotiated (-4)
>
> The image I am trying to overlay has a transparent background and is
> 386x386
> pixels.
>
> Any ideas?
>
> Vaughan
>
>
> sudarshan bisht wrote:
> >
> > Hi ,
> >
> >  videomixer works on AYUV ( that means yuv data having alpha values for
> > transparency ) and pngdec  gives RGB data , that's why these two elements
> >  are not linking .
> >
> > Try putting ffmpegcolorspcae after pngdec .
> >
> > On Wed, Mar 31, 2010 at 12:58 AM, Vogan <vaughan at infact.co.nz> wrote:
> >
> >>
> >> Hi
> >>
> >> I am wanting to overlay an image (crosshairs inthis case) on top of a
> >> stream
> >> from a web cam.  The image is a png file with a transparent background.
> >>  The
> >> pipeline I have tried is
> >>
> >> gst-launch v4l2src device=/dev/video0 !
> >> 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! videomixer
> >> name=mix
> >> ! xvimagesink ! filesrc location=crosshair.png ! pngdec ! mix.
> >>
> >> When I try to run this I get WARNING: erroneous pipeline: could not link
> >> pngdec0 to mix
> >>
> >> Any hints on what I am doing wrong? or is it simply not possible to
> >> overlay
> >> a static image on a live stream?
> >>
> >> Vaughan
> >>
> >> --
> >> View this message in context:
> >>
> http://n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p1745726.html
> >> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Download Intel&#174; Parallel Studio Eval
> >> Try the new software tools for yourself. Speed compiling, find bugs
> >> proactively, and fine-tune applications for parallel performance.
> >> See why Intel Parallel Studio got high marks during beta.
> >> http://p.sf.net/sfu/intel-sw-dev
> >> _______________________________________________
> >> gstreamer-devel mailing list
> >> gstreamer-devel at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >>
> >
> >
> >
> > --
> > Regards,
> >
> > Sudarshan Bisht
> >
> >
> ------------------------------------------------------------------------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >
> >
>
> --
> View this message in context:
> http://n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p1746276.html
>  Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Regards,

Sudarshan Bisht
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100331/06d32217/attachment.htm>


More information about the gstreamer-devel mailing list