# Camera encode, object detection, and display Source: [https://docs.qualcomm.com/doc/80-70015-50/topic/camera-encode-file-detection-yolov8-overlay-display.html](https://docs.qualcomm.com/doc/80-70015-50/topic/camera-encode-file-detection-yolov8-overlay-display.html) The **gst-camera-two-stream-encode-file-detection-display.py** script encodes the camera stream and saves it to a file. The application uses a YOLOv8 TFLite model to identify the objects in a scene from a camera stream. The application overlays the bounding boxes over the detected objects and displays the results. ## 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 camera encode and object detection script: python3 /usr/bin/gst-camera-two-stream-encode-file-detection-display.pyCopy to clipboard The following are the default file in the Python script: | Files | Directory | | :--- | :--- | | Detection model (YOLOv8) | /opt/data/YoloV8N\_Detection\_Quantized.tflite | | Detection labels (same for both models) | /opt/data/yolov8n.labels | ## Expected output The output is saved at /opt/data/test.mp4. ## Pipeline flow Figure : Pipeline for camera encode and object detection  | Process | Description | | --- | --- | | [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70015-50/topic/qtiqmmfsrc.html) | Collects two video streams from the camera:
The object detection model uses this tensor
stream for inferencing.
In
this use case, qtimlvdetection does the following: