mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-23 11:59:51 -08:00
422 B
422 B
Extract snapshots
You can periodically extract snapshots from available streams by using FFmpeg inside the runOnReady hook:
pathDefaults:
runOnReady: |
bash -c "
while true; do
mkdir -p $(dirname snapshots/$MTX_PATH)
ffmpeg -i rtsp://localhost:8554/$MTX_PATH -frames:v 1 -update true -y snapshots/$MTX_PATH.jpg
sleep 10
done"
Where 10 is the interval between snapshots.