overlay an image on a live webcam captured video stream

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

overlay an image on a live webcam captured video stream

swami
Hello,
I want to compose a video with raw video input from webcam and an logo stored in my PC and encode the composed video with h264 encoder and stream it over the network.
I tried with video mixer,but couldn't make it work with real video source (v4l2 device).It works only with "videotestsrc"

gst-launch-1.0 -v videomixer name=mix ! videoconvert ! xvimagesink multifilesrc location="logo.png" caps="image/png,framerate=0/1" ! pngdec ! imagefreeze ! alpha method=0 alpha=0.5 ! mix. videotestsrc ! "video/x-raw,format=AYUV,framerate=25/1,width=640,height=480" ! mix.

If I replace videotestsrc with v4l2src,I am getting error: couldn't link v4l2src to mix.

Any help would be appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: overlay an image on a live webcam captured video stream

Tim Müller
On Mon, 2016-04-18 at 23:03 -0700, swamip82 wrote:

Hi,

> I want to compose a video with raw video input from webcam and an
> logo stored in my PC and encode the composed video with h264 encoder
> and stream it over the network.
> I tried with video mixer,but couldn't make it work with real video
> source  (v4l2 device).It works only with "videotestsrc"
>
> gst-launch-1.0 -v videomixer name=mix ! videoconvert ! xvimagesink
> multifilesrc location="logo.png" caps="image/png,framerate=0/1" !
> pngdec !
> imagefreeze ! alpha method=0 alpha=0.5 ! mix. videotestsrc !
> "video/x-raw,format=AYUV,framerate=25/1,width=640,height=480" ! mix.
>
> If I replace videotestsrc with v4l2src,I am getting error: couldn't
> link v4l2src to mix.

The gdkpixbufoverlay element should be able to do that and is probably
easier to use too.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel