Replies: 1 comment
-
Hello, my advice is: write a script that rewrites the configuration file every time you need to switch the camera. Something like this (i wrote it in bash but it's practically pseudo-code that can be written in any language): #!/bin/bash
choose_camera() {
# set new_camera by running some algorithm
new_camera=1
}
current_camera=1
write_conf() {
conf=""
conf+="paths:\n"
conf+=" path1:\n"
if [ $current_camera = 1 ]; then
conf+=" source: rtsp://url1\n"
else
conf+=" source: rtsp://url2\n"
fi
printf "$conf" > rtsp-simple-server.yml
}
write_conf
while true; do
choose_camera
if [ $new_camera != $current_camera ]; then
current_camera=new_camera
write_conf
fi
sleep 1
done |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which version are you using?
v0.12
Which operating system are you using?
Linux
Question
I have 2 RTSP streams inputs, streaming the same camera but going from different network path, I would like to relay one or the other on the same output RTSP URL depending on network performance. (camera is moving between network AP).
The switch between input could be done from a parameter / env variable / http request or even when the first input source is lost (sourceOnDisconnect ?)
Is there a way to achieve this ?
Thanks !
Beta Was this translation helpful? Give feedback.
All reactions