For recording videos in our edge store, we use the open-source project MediaMTX.
MediaMTX is a zero-dependency real-time media server and proxy.
It allows publishing, reading, proxying, recording, and playing back video/audio streams.
It functions as a "media router," routing media streams from one end to another.
Necessary files for video recording can be cloned from this repo:
git@github.com:Niflr/niflr-edge-store-rtsp.git
(Latest branch: new_mediamtx)
Depending on your OS (Linux or macOS), download the latest binary from the MediaMTX releases page.
Configuration:
Before running mediamtx
for video recording, ensure the following changes in mediamtx.yaml
:
recordPath: ./videos/%path_INSTORE_%Y-%m-%d_%H:%M:%S.%f
paths:
# example:
# my_camera:
# source: rtsp://my_camera
cam1:
source: rtsp://st.niflrpassdev.com:8554/live/test-store/cam1
cam2:
source: rtsp://st.niflrpassdev.com:8554/live/test-store/cam2
cam3:
source: rtsp://st.niflrpassdev.com:8554/live/test-store/cam3
Command to run the repo:
./mediamtx
- Connect your local system to the D-Link router.
- Access the admin page (e.g., 192.168.0.1 or 192.168.1.1 depending on subnet).
- Login credentials:
- Username: admin
- Password: N!FlR@2022
- Click on Devices to view the IP addresses assigned to the cameras.
- Use an IP scanner tool (e.g., “Angry IP Scanner”) to scan all devices connected to the same router.
- Identify the camera IP addresses from the scan results.
- Open a browser and enter the camera’s IP (e.g.,
192.168.0.104
). - Camera login credentials:
- Username: admin
- Password: N!FlR@2022
- Frame Rate, Bitrate, Resolution, etc.:
- Click Setup (top navigation bar)
- Click Video (left navigation bar)
- Click Video again (to access video settings)
- Change specifications as required.
- Adding a Streaming URL:
- Click Setup (top navigation bar)
- Click Video (left navigation bar)
- Click Media Stream
- Click on the + icon and add the RTMP streaming URL.
- Syncing Camera Time with Local System:
- Click Setup (top navigation bar)
- Click System (left navigation bar)
- Click Time
- From the Sync Mode dropdown, select Sync with NTP Server.
- Set the NTP server address as the camera’s local IP address.