Editing .yml file so only cam0 runs during certain hours and cam1 runs during certain hours, both cameras never running at same time #3990
Unanswered
HelpMePlsOkNow
asked this question in
Questions
Replies: 1 comment 1 reply
-
I'm still not very familiar with the config of Mediamtx, but something that I think should work is using the Hot Reloading feature. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hello, I'm trying to have cam0 run only daytime and cam1 only run during nighttime, is this possible through editing .yml file? The Readme doesn't seem to cover this, Thanks in advance for your help. Current edits are below:
paths:
cam1:
runOnInit: bash -c 'rpicam-vid -t 0 --camera 0 --nopreview --codec yuv420 --width 1280 --height 720 --inline --listen -o - | ffmpeg -f rawvideo -pix_fmt yuv420p -s:v 1280x720 -i /dev/stdin -c:v libx264 -pre>
runOnInitRestart: yes
runOnReady: >
gst-launch-1.0
rtspclientsink name=s location=rtsp://localhost:$RTSP_PORT/cam_with_audio
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/$MTX_PATH latency=0 ! rtph264depay ! s.
alsasrc device=hw:CARD=II,DEV=0 ! opusenc bitrate=16000 ! s.
runOnReadyRestart: yes
cam_with_audio:
example:
my_camera:
source: rtsp://my_camera
Settings under path "all_others" are applied to all paths that
do not match another entry.
all_others:
Beta Was this translation helpful? Give feedback.
All reactions