Replies: 2 comments
-
|
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.
-
|
This discussion is being locked automatically because the last update was more than 2 years ago. Do not use the content of this discussion as reference since it's probably outdated! The official documentation is the only place in which you can find up-to-date answers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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