Difference between revisions of "HowTo/MotionAndRTSP"

From LunaSys
Jump to navigation Jump to search
 
Line 1: Line 1:
 +
Download mediammtx here: https://github.com/bluenviron/mediamtx/releases
 +
 +
Configure it:
 +
 
'''mediamtx.yml'''
 
'''mediamtx.yml'''
  
Line 6: Line 10:
 
     runOnInitRestart: yes
 
     runOnInitRestart: yes
  
 +
Install motion (pacman -S motion / apt install motion)
 +
 +
Configure netcam_url param:
  
 
'''motion.conf'''
 
'''motion.conf'''
  
 
  netcam_url rtsp://192.168.1.25:8554/cam
 
  netcam_url rtsp://192.168.1.25:8554/cam

Latest revision as of 18:03, 10 May 2025

Download mediammtx here: https://github.com/bluenviron/mediamtx/releases

Configure it:

mediamtx.yml

paths:
  cam:
    runOnInit: ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -pix_fmt yuv420p -preset ultrafast -b:v 600k -f rtsp rtsp://localhost:$RTSP_PORT/$MTX_PATH
    runOnInitRestart: yes

Install motion (pacman -S motion / apt install motion)

Configure netcam_url param:

motion.conf

netcam_url rtsp://192.168.1.25:8554/cam