vMix Forums
»
General
»
General Discussion
»
Trying to disconnect a VLC RTSP source according to the hour of day
Rank: Newbie
Groups: Registered
Joined: 7/20/2023(UTC) Posts: 4 Location: Barcelona Thanks: 2 times
|
I want to disconnect a STREAM/SRT type source, in its VLC mode (RTMP, UDT, RTP, RTSP, TS) connected to an RTSP source according to the time of day The conflict is that I have an IP camera connected by 4g, and a limitation of monthly output data So I would like to script the behavior of the vMix to disconnect from the camera's RTSP stream overnight The source cannot be stopped or paused, I thought about closing the input, but using a script I don't see the way to add an input of these characteristics (I only see an option to add inputs of the type, video, image, title... in short , sources associated with a file, but not more complex sources with more arguments like an RTSP) https://www.vmix.com/hel...utFunctionReference.htmlAny ideas? Thank you so much
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 508 Location: athens Thanks: 123 times Was thanked: 71 time(s) in 67 post(s)
|
Originally Posted by: xlamano I want to disconnect a STREAM/SRT type source, in its VLC mode (RTMP, UDT, RTP, RTSP, TS) connected to an RTSP source according to the time of day The conflict is that I have an IP camera connected by 4g, and a limitation of monthly output data So I would like to script the behavior of the vMix to disconnect from the camera's RTSP stream overnight The source cannot be stopped or paused, I thought about closing the input, but using a script I don't see the way to add an input of these characteristics (I only see an option to add inputs of the type, video, image, title... in short , sources associated with a file, but not more complex sources with more arguments like an RTSP) https://www.vmix.com/hel...utFunctionReference.htmlAny ideas? Thank you so much Hello. Your vmix is running 24/7?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/20/2023(UTC) Posts: 4 Location: Barcelona Thanks: 2 times
|
Originally Posted by: nikosman88 Originally Posted by: xlamano I want to disconnect a STREAM/SRT type source, in its VLC mode (RTMP, UDT, RTP, RTSP, TS) connected to an RTSP source according to the time of day The conflict is that I have an IP camera connected by 4g, and a limitation of monthly output data So I would like to script the behavior of the vMix to disconnect from the camera's RTSP stream overnight The source cannot be stopped or paused, I thought about closing the input, but using a script I don't see the way to add an input of these characteristics (I only see an option to add inputs of the type, video, image, title... in short , sources associated with a file, but not more complex sources with more arguments like an RTSP) https://www.vmix.com/hel...utFunctionReference.htmlAny ideas? Thank you so much Hello. Your vmix is running 24/7? Yes, it is a totally unattended 24-hour broadcast that would show an animation at times when the cameras would not work. The rest of the time I have programmed a loop of cameras (3 in total) so that they change from one to the other
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 508 Location: athens Thanks: 123 times Was thanked: 71 time(s) in 67 post(s)
|
Originally Posted by: xlamano Originally Posted by: nikosman88 Originally Posted by: xlamano I want to disconnect a STREAM/SRT type source, in its VLC mode (RTMP, UDT, RTP, RTSP, TS) connected to an RTSP source according to the time of day The conflict is that I have an IP camera connected by 4g, and a limitation of monthly output data So I would like to script the behavior of the vMix to disconnect from the camera's RTSP stream overnight The source cannot be stopped or paused, I thought about closing the input, but using a script I don't see the way to add an input of these characteristics (I only see an option to add inputs of the type, video, image, title... in short , sources associated with a file, but not more complex sources with more arguments like an RTSP) https://www.vmix.com/hel...utFunctionReference.htmlAny ideas? Thank you so much Hello. Your vmix is running 24/7? Yes, it is a totally unattended 24-hour broadcast that would show an animation at times when the cameras would not work. The rest of the time I have programmed a loop of cameras (3 in total) so that they change from one to the other Yes i dont see also a way to auto-addinput a source like this you want. The only way to do this is to load a preset that will have inside allready this source, so it will load this input. There exist in vmixapi a command that can open a vmix preset but unfortunatelly not a command that will append a vmix preset. So if you send this command will interrupt your 24/7 stream and then you`ll need and other commands to send to pgm the correct input,make again streaming etc.... An idea i have for this problem.. If you have a spare pc you can load there vmix hd version (60$) and then send to main pc ndi output and in main pc make scripts that will send to 2nd pc the http command to change the preset with and without the ip camera in the time you need. This thing can also be done in same pc if you enable the multiple vmix instances and it needs some more complicated way to achieve your goal, but i think possible to be done
|
1 user thanked nikosman88 for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/20/2023(UTC) Posts: 4 Location: Barcelona Thanks: 2 times
|
Thank you very much for answering so quickly @nikosman88, I love the vMix community! It would be ideal to make APPEND of a preset that only has the RTSP cameras, in this way they could be closed by script, and later add them again at the time we want to reconnect them Finally we will do the following solution inspired by your feedback: We will program a windows task so that at a specific time it execute an API call (throught PowerShell) to execute an script that 1: stops the streaming and 2: loads a new preset that does NOT contain the IP cameras We will add a browser type source to the new preset so that it executes a script called STARTUP that restarts the streaming once the preset is opened https://forums.vmix.com/...-Run-a-script-at-startupWe can't avoid cutting streaming for a few seconds, but I think it's a good solution And we will repeat the same process to resume the cameras again: at a specific time a windows task execute an API call that stops streaming and loads the original preset with the cameras
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 4/23/2017(UTC) Posts: 1,212 Location: Germany Thanks: 3 times Was thanked: 168 time(s) in 150 post(s)
|
Just a stupid idea. You can approach this from the network side as well, I think. Block the remote rtsp stream on the firewall/router side at a given time. Everything could stay as is, just no traffic. Then at whatever time you open the connection again. Mikrotik routers can do this very easily.
|
1 user thanked mavik for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/20/2023(UTC) Posts: 4 Location: Barcelona Thanks: 2 times
|
Originally Posted by: mavik Just a stupid idea. You can approach this from the network side as well, I think. Block the remote rtsp stream on the firewall/router side at a given time. Everything could stay as is, just no traffic. Then at whatever time you open the connection again. Mikrotik routers can do this very easily. Thank you too mavik! The idea is not that stupid. I think it would be possible to do it with the windows task scheduler. The only thing that I think would be a reset in the RTSP INPUT to reconnect the source when the firewall allowed it again
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Trying to disconnect a VLC RTSP source according to the hour of day
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close