# Video overlay use cases Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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-80020-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-80020-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-80020-50/topic/qtioverlay.html). ## User text overlay Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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=trueCopy to clipboard Figure : Pipeline for text overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on a live stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard Figure : Pipeline for text overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Date and time overlay Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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 filesrc location=/opt/.mp4 ! qtdemux ! queue ! h264parse ! v4l2h264dec capture-io-mode=4 output-io-mode=4 ! qtivoverlay timestamps="{(structure)\"Date/Time,format=\\\"%d/%m/%Y\%H:%M:%S\\\",fontsize=48,position=<50,50>,color=0xFFFFFFFF;\"}" ! waylandsink fullscreen=trueCopy to clipboard Figure : Pipeline for text date and time overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on a live stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard Figure : Pipeline for text date and time overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Static image overlay Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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]:/optCopy 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=trueCopy to clipboard Figure : Pipeline for static image overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on alive stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard Figure : Pipeline for static image overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Bounding box overlay Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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=trueCopy to clipboard Figure : Pipeline for bounding box overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on a live stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard Figure : Pipeline for bounding box overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Inverse privacy mask Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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;\"}"qtioverlay overlay-mask="mask0, circle=<960, 540, 400>, inverse=true, dest-rect=<0,0, 1920, 1080>, color=0x202020FF" ! waylandsink fullscreen=trueCopy to clipboard Figure : Pipeline for inverse privacy mask overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on a live stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard Figure : Pipeline for inverse privacy mask overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Non-inverse privacy mask Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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=trueCopy to clipboard Figure : Pipeline for non-inverse privacy mask overlay on video–file source Qualcomm Open source h264parse v4l2h264dec qtioverlay waylandsink filesrc qtdemux GST BIN - Overlay on a live stream from a camera: Note: This use case isn't available in the QLI 2.0 RC1 release. setprop persist.overlay.use_c2d_blit 2Copy to clipboard 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=trueCopy to clipboard Figure : Pipeline for non-inverse privacy mask overlay on video–camera source GST BIN Qualcomm Open source qtioverlay waylandsink camsrc ## Polygon privacy mask Source: [https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html](https://docs.qualcomm.com/doc/80-80020-50/topic/overlay-use-cases.html) 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. Before you begin, run the following commands on the target device to configure the display: export XDG_RUNTIME_DIR=/dev/socket/weston && export WAYLAND_DISPLAY=wayland-1Copy to clipboard 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=trueCopy to clipboard - Camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy 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=trueCopy to clipboard - Camera: Note: This use case isn't available in the QLI 2.0 RC1 release. 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=trueCopy to clipboard ### Update polygon privacy mask property at runtime 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=trueCopy 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 02, 2026 [Previous Topic Video composition use cases](https://docs.qualcomm.com/bundle/publicresource/80-80020-50/topics/video-composition.md) [Next Topic Video split use cases](https://docs.qualcomm.com/bundle/publicresource/80-80020-50/topics/video-split-use-cases.md)