how to overlay video over an image

aravind rajesh carebearers at yahoo.com
Sun Feb 22 09:02:12 PST 2015


Hi gstreamer devels
I am working on a project where I need to display a video with" alpha keying" a region of interest based on color  and run it over an image so the image under the region of interest is visible over the video. 
   gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink videotestsrc pattern=0 ! video/x-raw-yuv, framerate=1/1, width=350,height=250 ! textoverlay font-desc="Sans 24"text="CAM1" valign=top halign=left shaded-background=true ! videobox border-alpha=0 top=-200 left=-50 ! mix. multifilesrclocation="drawing_total_mask_1.jpg"caps="image/jpeg,framerate=1/1" ! jpegdec ! textoverlay font-desc="Sans 26" text="Live from Pl"halign=left shaded-background=true auto-resize=false ! ffmpegcolorspace ! video/x-raw-yuv,format=\(fourcc\)AYUV ! mix.    searching for it I found something like this which allows me to display the test video(videotestsrc ) over the image but when I give an alternate video source it wont do that . 
The code I used to give my own source and the errors followed by it.
 gst-launch -e videomixer name=mix ! ffmpegcolorspace ! xvimagesink    filesrc location = "asd.mp4" ! video/x-raw-yuv, framerate=1/1, width=350, height=250 !      textoverlay font-desc="Sans 24" text="CAM1" valign=top halign=left shaded-background=true !      videobox border-alpha=0 top=-200 left=-50 ! mix.   multifilesrc location=drawing_total_mask_1.jpg" caps="image/jpeg,framerate=1/1" ! jpegdec !      textoverlay font-desc="Sans 26" text="Live from Pl" halign=left shaded-background=true auto-resize=false !      ffmpegcolorspace ! video/x-raw-yuv,format=\(fourcc\)AYUV ! mix.Setting pipeline to PAUSED ...Pipeline is PREROLLING ...WARNING: from element /GstPipeline:pipeline0/GstTextOverlay:textoverlay0: Could not multiplex stream.Additional debug info:gsttextoverlay.c(1848): gst_text_overlay_video_event (): /GstPipeline:pipeline0/GstTextOverlay:textoverlay0:received non-TIME newsegment event on video inputWARNING: from element /GstPipeline:pipeline0/GstTextOverlay:textoverlay1: Could not multiplex stream.Additional debug info:gsttextoverlay.c(1848): gst_text_overlay_video_event (): /GstPipeline:pipeline0/GstTextOverlay:textoverlay1:received non-TIME newsegment event on video inputERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter1: Filter caps do not completely specify the output formatAdditional debug info:gstcapsfilter.c(393): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter1:Output caps are unfixed: video/x-raw-yuv, framerate=(fraction)1/1, width=(int)350, height=(int)250, format=(fourcc){ AYUV, YUY2, Y444, UYVY, Y42B, YV12, I420, Y41B }ERROR: pipeline doesn't want to preroll.Setting pipeline to NULL ...

I am not able find what's right I am not doing to make it work.
So to summarizeI want a video sourced by me  with an transparent alpha region , which when run on a image will display the image over the region of interest in video.Any helps please.
Thanks in advance
Krats
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150222/011c1d58/attachment-0001.html>


More information about the gstreamer-devel mailing list