# Video overlay use cases The pipelines show the use cases for video overlay. These use cases use the `position` property coordinates from the respective properties of the [qtivoverlay](https://docs.qualcomm.com/doc/80-80021-50/topic/qtioverlay.html) plugin. Before you run the use cases, ensure that you complete the preconditions mentioned in [GStreamer command-line use cases](https://docs.qualcomm.com/doc/80-80021-50/topic/gstreamer-application-use-cases.html). Note The commands in the following use cases use the 720p resolution. To change the resolution, update the respective `position` property coordinates in the command for that resolution. For more information, see [qtivoverlay](https://docs.qualcomm.com/doc/80-80021-50/topic/qtioverlay.html). ## User text overlay This use case overlays text on a video stream. Run the following use cases on the target device: - Overlay on a video: gst-launch-1.0 filesrc location=/opt/Animals_000_720p_180s_30FPS.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay strings="{(structure)\"Text1,contents=\\\"Qualcomm\ Intelligence\\\",fontsize=48,position=<50,50>,color=0xFFFF00FF;\" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on a live stream from a camera: gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay strings="{(structure)\"Text1,contents=\\\"Qualcomm\ Intelligence\\\",fontsize=48,position=<50,50>,color=0xFFFF00FF;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Date and time overlay This use case shows the date (in DDMMYYYY) and time (in HHMMSS) to be overlaid on the video stream. Run the following use cases on the target device: - Overlay on a video: gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay strings="{(structure)\"Text1,contents=\\\"Qualcomm\ Intelligence\\\",fontsize=48,position=<50,50>,color=0xFFFF00FF;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on a live stream from a camera: gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay timestamps="{(structure)\"Date/Time,format=\\\"%d/%m/%Y\%H:%M:%S\\\",fontsize=48,position=<50,50>,color=0xFFFFFFFF;\"}"! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Static image overlay This use case shows how to overlay a static image on a video stream. 1. In the terminal of the Linux host computer, run the following command to push the static image to the target device: scp -r .rgba root@[DEVICE IP-ADDR]:/opt Copy to clipboard 2. Run the use cases on the target device: - Overlay on a video: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay images="{(structure)\"Image1,path=/opt/overlay_test_464_109.rgba,resolution=<480,360>,destination=<0,0,640,480>;\"! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on alive stream from a camera: gst-launch-1.0 -e qtiqmmfsrc name=camsrc video_0::type=video video_1::type=preview ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay images="{(structure)\"Image1,path=/opt/overlay_test_464_109.rgba,resolution=<480,360>,destination=<0,0,640,480>;\"! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Bounding box overlay This use case shows how to overlay a bounding box with a label on the video stream. Run the following use cases on the target device: - Overlay on a video: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay bboxes="{(structure)\"Box1,position=<100,100>,dimensions=<640,480>;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on a live stream from a camera: gst-launch-1.0 -e qtiqmmfsrc! video/x- raw,format=NV12,width=1920,height=1080,framerate=30/1,compression=ubwc ! qtivoverlay bboxes="{(structure)\"Box1,position=<100,100>,dimensions=<640,480>;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Inverse privacy mask This use case shows how to overlay the inverse privacy mask on the video stream. The inverse privacy mask is applied on all other regions except the *circle* in the *masks* property. Run the following use cases on the target device: - Overlay on a video: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,circle=<1520,730,50>,inverse=true;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on a live stream from a camera: gst-launch-1.0 -e qtiqmmfsrc ! video/x- raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,circle=<1520,730,50>,inverse=true;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Non-inverse privacy mask This use case shows how to overlay the non-inverse privacy mask on the video stream. Run the following use cases on the target device: - Overlay on a video: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,circle=<1520,730,50>;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–file source** - Overlay on a live stream from a camera: gst-launch-1.0 -e qtiqmmfsrc ! video/x- raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,circle=<1520,730,50>;\"}" ! waylandsink fullscreen=true Copy to clipboard **Figure : Pipeline for text overlay on video–camera source** ## Polygon privacy mask A polygon privacy mask allows you to create privacy zones on an image using a polygonal shape. Using a polygon allows you to make the masking smoother and more exact. - The polygon privacy mask is applied to the region enclosed within the polygon. - The inverse polygon privacy mask is applied to all regions except the one enclosed within the polygon. Run the following use cases on the target device. ### Enable polygon privacy mask - File source: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>;\"}" ! waylandsink fullscreen=true Copy to clipboard - Camera: gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>;\"}" ! waylandsink fullscreen=true Copy to clipboard ### Enable inverse polygon privacy mask - File source: gst-launch-1.0 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>,inverse=true;\"}" ! waylandsink fullscreen=true Copy to clipboard - Camera: gst-launch-1.0 -e qtiqmmfsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>,inverse=true;\"}" ! waylandsink fullscreen=true Copy to clipboard ### Update polygon privacy mask property at runtime Note The gst-pipeline-app isn't supported in the QLI 2.0 RC2 release. 1. Set the privacy mask: gst-pipeline-app -e filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay masks="{(structure)\"Mask0,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>;\"}" ! waylandsink fullscreen=true Copy to clipboard 2. In the pipeline controls, select `Playing mode - 3`. 3. To change the property in the pipeline controls, select `Plugin mode - p`. 4. From the plugins, select `voverlay0 - 2`. 5. In the plugin properties, select `masks - 3`. 6. Add the following value: "{(structure)\"Mask1,color=0xFF0000FF,polygon=<<910,510>,<860,740>,<1140,760>,<1160,520>>,inverse=true;\"}" Copy to clipboard Last Published: Mar 26, 2026 [Previous Topic Video composition use cases](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/video-composition.md) [Next Topic Video split use cases](https://docs.qualcomm.com/bundle/publicresource/80-80021-50/topics/video-split-use-cases.md)