- Deleted unused API test files, RTSP diagnostic scripts, and development utility scripts to reduce clutter. - Removed outdated database schema and modularization proposal documents to maintain focus on current architecture. - Cleaned up configuration files and logging scripts that are no longer in use, enhancing project maintainability.
118 lines
3.3 KiB
HTTP
118 lines
3.3 KiB
HTTP
###############
|
|
# Environment #
|
|
###############
|
|
@host = exp-dash
|
|
@web_port = 8080
|
|
@api_port = 8000
|
|
@media_port = 8090
|
|
@rtsp_port = 8554
|
|
|
|
# Base URLs
|
|
@WEB = http://{{host}}:{{web_port}}
|
|
@API = http://{{host}}:{{api_port}}
|
|
@MEDIA = http://{{host}}:{{media_port}}
|
|
|
|
|
|
###########################
|
|
# Camera Management (API) #
|
|
###########################
|
|
### API health
|
|
GET {{API}}/health
|
|
|
|
### System status
|
|
GET {{API}}/system/status
|
|
|
|
### List cameras
|
|
GET {{API}}/cameras
|
|
|
|
### Get single camera status
|
|
GET {{API}}/cameras/camera1/status
|
|
|
|
### Start live preview streaming (MJPEG) for camera1 (served by camera-management-api)
|
|
POST {{API}}/cameras/camera1/start-stream
|
|
|
|
### Stop live preview streaming for camera1
|
|
POST {{API}}/cameras/camera1/stop-stream
|
|
|
|
### View live MJPEG stream in browser (open URL)
|
|
# {{API}}/cameras/camera1/stream
|
|
|
|
### Start RTSP streaming for camera1 (publishes to MediaMTX)
|
|
POST {{API}}/cameras/camera1/start-rtsp
|
|
|
|
### Stop RTSP streaming for camera1
|
|
POST {{API}}/cameras/camera1/stop-rtsp
|
|
|
|
### RTSP stream URL (use with VLC/ffplay):
|
|
# rtsp://{{host}}:{{rtsp_port}}/camera1
|
|
|
|
|
|
### getting a list of all videos
|
|
GET {{MEDIA}}/videos/?page=10&limit=1
|
|
|
|
########################
|
|
# Media API (media-api) #
|
|
########################
|
|
### Media API health
|
|
GET {{MEDIA}}/health
|
|
|
|
### List videos (page 1, 24 per page)
|
|
GET {{MEDIA}}/videos/?page=1&limit=24
|
|
|
|
### List videos filtered by camera name (example: camera1)
|
|
GET {{MEDIA}}/videos/?page=1&limit=24&camera_name=camera1
|
|
|
|
### Get a thumbnail for a specific file (replace FILE_ID from list)
|
|
# Tip: FILE_ID is URL-encoded relative path, e.g. camera1%2Fmy_video.mp4
|
|
|
|
@FILE_ID = camera2_auto_vibratory_conveyor_20251028_094749.mp4
|
|
GET {{MEDIA}}/videos/{{FILE_ID}}/thumbnail?width=320&height=180
|
|
|
|
### Stream a file (basic GET without Range header)
|
|
GET {{MEDIA}}/videos/{{FILE_ID}}/stream
|
|
|
|
### Stream a file with Range header (resume/seek)
|
|
GET {{MEDIA}}/videos/{{FILE_ID}}/stream
|
|
Range: bytes=0-1048575
|
|
|
|
|
|
#########################################
|
|
# RTSP / WebRTC via MediaMTX (mediamtx) #
|
|
#########################################
|
|
# Notes:
|
|
# - RTSP is not directly playable in browsers; use VLC/ffplay/NVR.
|
|
# - Example RTSP URL (for a path you configure or publish):
|
|
# rtsp://{{host}}:{{rtsp_port}}/vod
|
|
# - For on-demand publishing from a file, configure mediamtx.yml with runOnDemand ffmpeg.
|
|
# - Quick client test examples (Run in your terminal):
|
|
# ffplay -rtsp_transport tcp rtsp://{{host}}:{{rtsp_port}}/vod
|
|
# vlc rtsp://{{host}}:{{rtsp_port}}/vod
|
|
|
|
# MediaMTX HTTP API (for checking streams)
|
|
@MEDIAMTX_API = http://{{host}}:8889
|
|
### Check MediaMTX version/info
|
|
GET {{MEDIAMTX_API}}/v2/config/get
|
|
|
|
### List all available RTSP paths/streams
|
|
GET {{MEDIAMTX_API}}/v2/paths/list
|
|
|
|
### Get info about a specific path (e.g., camera1)
|
|
GET {{MEDIAMTX_API}}/v2/paths/get/camera1
|
|
|
|
# MediaMTX Web Interface (open in browser)
|
|
# http://{{host}}:8889/static/
|
|
|
|
# If you enable WebRTC in MediaMTX, you can open its embedded player page (for testing):
|
|
# See MediaMTX docs; by default we exposed RTSP and WebRTC ports in compose.
|
|
|
|
|
|
###############################################
|
|
# Useful manual test values (copy/paste below) #
|
|
###############################################
|
|
# @name set-variables
|
|
# file_id examples (replace with values from /videos/):
|
|
# camera1%2Fcamera1_auto_blower_separator_20251030_160405.mp4
|
|
# camera2%2Ffoo_20251030_101010.mp4
|
|
|
|
|