logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
xlamano  
#1 Posted : Thursday, July 20, 2023 8:01:52 PM(UTC)
xlamano

Rank: Newbie

Groups: Registered
Joined: 7/20/2023(UTC)
Posts: 4
Spain
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.html
Any ideas?
Thank you so much
nikosman88  
#2 Posted : Friday, July 21, 2023 12:36:17 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 362
Greece
Location: athens

Thanks: 113 times
Was thanked: 54 time(s) in 51 post(s)
Originally Posted by: xlamano Go to Quoted Post
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.html
Any ideas?
Thank you so much

Hello. Your vmix is running 24/7?
xlamano  
#3 Posted : Friday, July 21, 2023 1:59:20 AM(UTC)
xlamano

Rank: Newbie

Groups: Registered
Joined: 7/20/2023(UTC)
Posts: 4
Spain
Location: Barcelona

Thanks: 2 times
Originally Posted by: nikosman88 Go to Quoted Post
Originally Posted by: xlamano Go to Quoted Post
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.html
Any 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
nikosman88  
#4 Posted : Friday, July 21, 2023 4:26:14 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 362
Greece
Location: athens

Thanks: 113 times
Was thanked: 54 time(s) in 51 post(s)
Originally Posted by: xlamano Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post
Originally Posted by: xlamano Go to Quoted Post
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.html
Any 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
thanks 1 user thanked nikosman88 for this useful post.
xlamano on 7/31/2023(UTC)
xlamano  
#5 Posted : Friday, July 21, 2023 7:20:17 PM(UTC)
xlamano

Rank: Newbie

Groups: Registered
Joined: 7/20/2023(UTC)
Posts: 4
Spain
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-startup

We 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
mavik  
#6 Posted : Tuesday, July 25, 2023 12:11:02 AM(UTC)
mavik

Rank: Advanced Member

Groups: Registered
Joined: 4/23/2017(UTC)
Posts: 1,155
Man
Location: Germany

Thanks: 3 times
Was thanked: 166 time(s) in 148 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.
thanks 1 user thanked mavik for this useful post.
xlamano on 7/31/2023(UTC)
xlamano  
#7 Posted : Monday, July 31, 2023 11:20:15 PM(UTC)
xlamano

Rank: Newbie

Groups: Registered
Joined: 7/20/2023(UTC)
Posts: 4
Spain
Location: Barcelona

Thanks: 2 times
Originally Posted by: mavik Go to Quoted Post
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
Users browsing this topic
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.