# Object detection and encode Source: [https://docs.qualcomm.com/doc/80-70015-50/topic/camera-detection-encode.html](https://docs.qualcomm.com/doc/80-70015-50/topic/camera-detection-encode.html) The **gst-camera-detection-encode.py** uses a YOLOv8 TFLite model to identify the object in a scene from a camera stream and overlay the bounding boxes over the detected object, and then save the output to a file. ## Use cases 1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70015-50/topic/python-sample-applications.html#python-sample-applications__section_gm5_s5j_bdc). 2. Run the object detection and encode script: python3 /usr/bin/gst-camera-detection-encode.pyCopy to clipboard The following are the default file paths in the Python script: MODEL_FILE = "/opt/data/YOLOv8-Detection-Quantized.tflite"Copy to clipboard LABELS_FILE = "/opt/data/yolov8.labels"Copy to clipboard ## Expected output The output is saved to a file at /opt/data/det\_recording\_720p.mp4. ## Pipeline flow Figure : Pipeline for object detection and encode  | Process | Description | | --- | --- | | [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70015-50/topic/qtiqmmfsrc.html) |
The object detection model uses this tensor
stream for inferencing.
In
this use case, qtimlvdetection does the following: