This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:edge-2l:applications:object-detection-demo-with-rtsp [2026/02/04 04:59] gray To be confirm |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Edge-2L Object Detection with RTSP Streaming ====== | ||
| - | To be confirm! | ||
| - | /* | ||
| - | === Overview === | ||
| - | This document describes how to compile and run the object detection demo with RTSP streaming on the '' | ||
| - | === Prerequisites === | ||
| - | Before building the project, ensure your system is up to date and the required dependencies are installed: | ||
| - | |||
| - | < | ||
| - | sudo apt update | ||
| - | sudo apt install cmake libopencv-dev | ||
| - | </ | ||
| - | |||
| - | === Clone the Project === | ||
| - | Clone the official Khadas Edge-2L NPU repository: | ||
| - | |||
| - | < | ||
| - | git clone https:// | ||
| - | cd edge-2l-npu | ||
| - | </ | ||
| - | |||
| - | === Compile === | ||
| - | Compile the project using the provided build script: | ||
| - | |||
| - | < | ||
| - | bash build.sh | ||
| - | </ | ||
| - | |||
| - | === Start RTSP Server with MediaMTX === | ||
| - | Before running the demo, ensure an RTSP server is running in your local network. You can use [https:// | ||
| - | |||
| - | ==== Install and Start MediaMTX ==== | ||
| - | < | ||
| - | wget https:// | ||
| - | tar -xzf mediamtx_v1.11.3_linux_amd64.tar.gz | ||
| - | cd mediamtx | ||
| - | ./mediamtx | ||
| - | </ | ||
| - | |||
| - | By default, MediaMTX listens on port 8554. Once started, it's ready to receive RTSP streams. | ||
| - | |||
| - | ==== Stream a test video using FFmpeg ==== | ||
| - | < | ||
| - | ffmpeg -re -stream_loop -1 -i input.mp4 -c:v copy -an -f rtsp rtsp://< | ||
| - | </ | ||
| - | |||
| - | Replace ''< | ||
| - | |||
| - | === Run the Demo === | ||
| - | Navigate to the output directory and run the demo: | ||
| - | |||
| - | < | ||
| - | cd install/ | ||
| - | ./ | ||
| - | </ | ||
| - | |||
| - | === Parameters === | ||
| - | < | ||
| - | data/ | ||
| - | 33 # Camera device index (e.g., / | ||
| - | rtsp://< | ||
| - | </ | ||
| - | |||
| - | === RTSP Server Options === | ||
| - | You may use one of the following RTSP servers: | ||
| - | * MediaMTX (recommended) | ||
| - | * FFmpeg (as RTSP server) | ||
| - | * VLC Streaming | ||
| - | * RTSP Simple Server | ||
| - | |||
| - | === Play the RTSP Stream === | ||
| - | You can verify the RTSP stream using a player such as '' | ||
| - | |||
| - | ==== Option 1: ffplay (from FFmpeg) ==== | ||
| - | < | ||
| - | ffplay rtsp://< | ||
| - | </ | ||
| - | {{: | ||
| - | ==== Option 2: VLC ==== | ||
| - | Open VLC and go to: | ||
| - | * Media → Open Network Stream | ||
| - | * Enter the URL | ||
| - | * Click '' | ||
| - | |||
| - | Replace ''< | ||
| - | |||
| - | |||
| - | === Notes === | ||
| - | * Ensure the specified video device (e.g., ''/ | ||
| - | * The RTSP server must be reachable from the Edge-2L device (same LAN). | ||
| - | * Encoder settings (e.g., resolution, bitrate, format) can be modified in the source code. | ||
| - | * You can check your IP with: '' | ||
| - | |||
| - | */ | ||