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 |
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 <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ Download Intel® 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
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
|
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 ! mixOn Wed, Mar 31, 2010 at 9:32 AM, Vogan <[hidden email]> wrote:
-- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ Download Intel® 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Vogan
On 03/30/2010 10:28 PM, Vogan wrote:
> > 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. > gst-launch v4l2src device=/dev/video0 ! 'video/x-raw-yuv,width=640,height=480' ! videomixer name=mix ! xvimagesink filesrc location=crosshair.png ! pngdec ! ffmpegcolorspace ! mix. there extra "!" and you need to convert colorspace ------------------------------------------------------------------------------ Download Intel® 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 [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
I modified the presented pipeline to overlay an image onto a video:
gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. but it stops always in the "prerolling moment" and if I press CTRL-C, it returns: (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) before adding it. Suggestions?? |
check imagefreeze or multifilesrc features
2012/3/6 kususe <[hidden email]> I modified the presented pipeline to overlay an image onto a video: _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by kususe
Hi,
there are two options: A) use "freezeimage" element after pngdec, B) instead of filesrc location=graph.png use multifilesrc with caps multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1 (of course change to your framerate) sincerely, Jan Spurny > ------------ Původní zpráva ------------ > Od: kususe <[hidden email]> > Předmět: Re: Overlaying an image on a live stream > Datum: 06.3.2012 20:15:23 > ---------------------------------------- > I modified the presented pipeline to overlay an image onto a video: > > gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! > xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. > > but it stops always in the "prerolling moment" and if I press CTRL-C, it > returns: > > (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' > to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) > before adding it. > > > Suggestions?? > > -- > View this message in context: > http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4450966.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Vogan
First solution returns me there's no "freezeimage" element;
Second one returns me a ">", like an interactive terminal, nothing more. regards, K. -----Messaggio originale----- Da: Jan Spurný <[hidden email]> Inviato il: 07 Mar 2012 - 09:39 A: Discussion of the development of and with GStreamer <[hidden email]> Hi, there are two options: A) use "freezeimage" element after pngdec, B) instead of filesrc location=graph.png use multifilesrc with caps multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1 (of course change to your framerate) sincerely, Jan Spurny > ------------ P?vodní zpráva ------------ > Od: kususe > P?edm?t: Re: Overlaying an image on a live stream > Datum: 06.3.2012 20:15:23 > ---------------------------------------- > I modified the presented pipeline to overlay an image onto a video: > > gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! > xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. > > but it stops always in the "prerolling moment" and if I press CTRL-C, it > returns: > > (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' > to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) > before adding it. > > > Suggestions?? > > -- > View this message in context: > <a href="http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an- image-on-a-live-stream-tp1745726p4450966.html" target="new">http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4450966.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel ------------------------------------------------------------------------------- Valore legale alle tue mail InterfreePEC - la tua Posta Elettronica Certificata http://pec.interfree.it ------------------------------------------------------------------------------- _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
freezeimage is quite new element, so it's normal it's not present. The problem with ">" is probably my fault - i forgot to end caps string with quotation marks, so just add " at the end, like this: multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1" - you may also need to escape parentheses, so if the above line produces some error, try this: multifilesrc location=graph.png caps="image/png,framerate=\(fraction\)25/1" ------------ Původní zpráva ------------ Od: <[hidden email]> Předmět: Re: Re: Re: Overlaying an image on a live stream Datum: 07.3.2012 10:38:35 --------------------------------------------- First solution returns me there's no "freezeimage" element; Second one returns me a ">", like an interactive terminal, nothing more. regards, K. -----Messaggio originale----- Da: Jan Spurný <[hidden email]> Inviato il: 07 Mar 2012 - 09:39 A: Discussion of the development of and with GStreamer <[hidden email]> Hi, there are two options: A) use "freezeimage" element after pngdec, B) instead of filesrc location=graph.png use multifilesrc with caps multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1 (of course change to your framerate) sincerely, Jan Spurny > ------------ P?vodní zpráva ------------ > Od: kususe > P?edm?t: Re: Overlaying an image on a live stream > Datum: 06.3.2012 20:15:23 > ---------------------------------------- > I modified the presented pipeline to overlay an image onto a video: > > gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! > xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. > > but it stops always in the "prerolling moment" and if I press CTRL-C, it > returns: > > (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' > to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) > before adding it. > > > Suggestions?? > > -- > View this message in context: > http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4450966.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel ------------------------------------------------------------------------------- Valore legale alle tue mail InterfreePEC - la tua Posta Elettronica Certificata http://pec.interfree.it ------------------------------------------------------------------------------- _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by kususe
Am 07.03.2012 10:14, schrieb [hidden email]:
> First solution returns me there's no "freezeimage" element; > Second one returns me a ">", like an interactive terminal, nothing more. it is called imagefreeze. In the future, gst-inspect | grep freeze, voila Stefan > > regards, > K. > > > -----Messaggio originale----- > Da: Jan Spurný <[hidden email]> > Inviato il: 07 Mar 2012 - 09:39 > A: Discussion of the development of and with GStreamer > <[hidden email]> > > > Hi, > > there are two options: > > A) use "freezeimage" element after pngdec, > > B) instead of > > filesrc location=graph.png > > use multifilesrc with caps > > multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1 > > (of course change to your framerate) > > sincerely, > Jan Spurny > >> ------------ P?vodní zpráva ------------ >> Od: kususe >> P?edm?t: Re: Overlaying an image on a live stream >> Datum: 06.3.2012 20:15:23 >> ---------------------------------------- >> I modified the presented pipeline to overlay an image onto a video: >> >> gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! >> xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. >> >> but it stops always in the "prerolling moment" and if I press CTRL-C, it >> returns: >> >> (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' >> to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) >> before adding it. >> >> >> Suggestions?? >> >> -- >> View this message in context: >> http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4450966.html <http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an- image-on-a-live-stream-tp1745726p4450966.html> >> Sent from the GStreamer-devel mailing list archive at Nabble.com. >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel >> >> >> > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > ------------------------------------------------------------------------------- > Valore legale alle tue mail > InterfreePEC - la tua Posta Elettronica Certificata > http://pec.interfree.it > ------------------------------------------------------------------------------- > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Ok, thanks.
But it still doesn't work. I tried to change the video format too. I made: gst-launch filesrc location=video.webm ! \ matroskademux ! queue name=queuev ! vp8dec ! video/x-matroska, \ framerate=\(fraction\)10/1, width=200, height=100 ! videomixer \ name=mix ! ffmpegcolorspace ! autovideosink filesrc \ location=geo.png ! pngdec ! image/png, width=50, \ height=50 ! imagefreeze ! mix. ATTENZIONE: pipeline errata: impossibile collegare vp8dec0 a mix. (impossible to link vp8dec0 to mix.) Suggestions? |
On 03/16/2012 01:00 PM, kususe wrote:
> Ok, thanks. > But it still doesn't work. I tried to change the video format too. > I made: > > gst-launch filesrc location=video.webm ! \ matroskademux ! queue > name=queuev ! vp8dec ! video/x-matroska, \ framerate=\(fraction\)10/1, > width=200, height=100 ! videomixer \ name=mix ! ffmpegcolorspace ! > autovideosink filesrc \ location=geo.png ! pngdec ! image/png, width=50, > \ height=50 ! imagefreeze ! mix. > ATTENZIONE: pipeline errata: impossibile collegare vp8dec0 a mix. > (impossible to link vp8dec0 to mix.) This pipleine makes not much sense. How should vp8dec decode to "video/x-matroska", same for pngdec. Try something like below (untested). You want to ensure that videomixer receives the same format. gst-launch filesrc location=video.webm ! \ matroskademux ! queue name=queuev ! \ vp8dec ! ffmpegcolorspace ! "video/x-raw-yuv, format=I420" ! videomixer name=mix ! ffmpegcolorspace ! autovideosink \ filesrc location=geo.png ! pngdec ! imagefreeze ! ffmpegcolorspace ! "video/x-raw-yuv, format=I420" ! mix. Stefan > Suggestions? > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4477999.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Stefan Sauer
Sent from my BlackBerry® wireless device -----Original Message----- From: Stefan Kost <[hidden email]> Sender: gstreamer-devel-bounces+harrison.declan=[hidden email] Date: Thu, 15 Mar 2012 12:26:08 To: <[hidden email]> Reply-To: Discussion of the development of and with GStreamer <[hidden email]> Subject: Re: Overlaying an image on a live stream Am 07.03.2012 10:14, schrieb [hidden email]: > First solution returns me there's no "freezeimage" element; > Second one returns me a ">", like an interactive terminal, nothing more. it is called imagefreeze. In the future, gst-inspect | grep freeze, voila Stefan > > regards, > K. > > > -----Messaggio originale----- > Da: Jan Spurný <[hidden email]> > Inviato il: 07 Mar 2012 - 09:39 > A: Discussion of the development of and with GStreamer > <[hidden email]> > > > Hi, > > there are two options: > > A) use "freezeimage" element after pngdec, > > B) instead of > > filesrc location=graph.png > > use multifilesrc with caps > > multifilesrc location=graph.png caps="image/png,framerate=(fraction)25/1 > > (of course change to your framerate) > > sincerely, > Jan Spurny > >> ------------ P?vodní zpráva ------------ >> Od: kususe >> P?edm?t: Re: Overlaying an image on a live stream >> Datum: 06.3.2012 20:15:23 >> ---------------------------------------- >> I modified the presented pipeline to overlay an image onto a video: >> >> gst-launch filesrc location=video.mpg ! decodebin2 ! videomixer name=mix ! >> xvimagesink filesrc location=graph.png ! pngdec ! ffmpegcolorspace ! mix. >> >> but it stops always in the "prerolling moment" and if I press CTRL-C, it >> returns: >> >> (gst-launch-0.10:3775): GStreamer-WARNING **: adding flushing pad 'sink_1' >> to running element 'mix', you need to use gst_pad_set_active(pad,TRUE) >> before adding it. >> >> >> Suggestions?? >> >> -- >> View this message in context: >> http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an-image-on-a-live-stream-tp1745726p4450966.html <http://gstreamer-devel.966125.n4.nabble.com/Overlaying-an- image-on-a-live-stream-tp1745726p4450966.html> >> Sent from the GStreamer-devel mailing list archive at Nabble.com. >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel >> >> >> > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > ------------------------------------------------------------------------------- > Valore legale alle tue mail > InterfreePEC - la tua Posta Elettronica Certificata > http://pec.interfree.it > ------------------------------------------------------------------------------- > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |