putting a square centre of webcam stream
Olivier Aubert
contact at olivieraubert.net
Thu Feb 27 09:04:36 PST 2014
On Wed, 2014-02-26 at 07:35 -0800, ertasemre wrote:
> On my embedded linux platform I have 320x240 lcd display and usb webcam. I
> can display my webcam view via "gst-launch -e v4l2src !
> video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace !
> fbdevsink device=/dev/fb0". I want put a square for targetting a barcode
> image. is there any way to put any shape like a square or simple line on
> webcam stream via gstreamer?
With rsvgoverlay:
gst-launch uridecodebin uri=file:/tmp/c.avi ! ffmpegcolorspace ! \
rsvgoverlay fit-to-frame=true data='<svg viewBox="0 0 320 200"> \
<rect fill="#ccc" x="150" y="90" width="20" height="20"></rect></svg>' ! \
ffmpegcolorspace ! autovideosink
The fit-to-frame is not necessary per se since you know the video
resolution, but it will allow the plugin to fit the viewBox to the video
resolution when the resolution is different.
Olivier
More information about the gstreamer-devel
mailing list