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
grantcoll  
#1 Posted : Monday, April 10, 2023 1:53:31 PM(UTC)
grantcoll

Rank: Advanced Member

Groups: Registered
Joined: 10/7/2017(UTC)
Posts: 94
Location: Hamilton

Thanks: 21 times
Was thanked: 10 time(s) in 9 post(s)
I am trying to get the streaming status of each destination from the xml document. I have no problem getting fixed element values, eg <streaming>True</streaming> but in the case of more than one destination, there appears to be a different element added to the xml file. It changes depending on the status. Eg if the destination 1 is streaming but not 2, then a new element appears in xml called <streaming channel1="True">True</streaming> and if 2 destinations, then it changes to <streaming channel1="True" channel2="True">True</streaming>

I can see these settings in the xml file, but I don't know how to write the script to extract them. If I am just looking for the streaming element, I use
isstreaming = (x.SelectSingleNode("//streaming").InnerText)

But I can't find out how to get the channel1 or channel2 for several reasons. The main stumbling block is that the vmix script doesn't allow double quotes inside a string or function, and it doesn't recognise chr(34) or """

Further to that, I am not even sure if this is worth pursuing because it doesn't help with a starting up or failing connection. But I don't know how to get those other status values.

Has anyone else worked on this streaming status area ?

UPDATE
Just in case anyone reads this. vMix support confirmed there is no way to get the status through the API. So we have developed an application that monitors the vMix logs for frame drops or stream ending. Within the application we can set the desired action based on the stream failing or ending.
doggy  
#2 Posted : Monday, April 10, 2023 3:59:32 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,243
Belgium
Location: Belgium

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: grantcoll Go to Quoted Post
I am trying to get the streaming status of each destination from the xml document. I have no problem getting fixed element values, eg <streaming>True</streaming> but in the case of more than one destination, there appears to be a different element added to the xml file. It changes depending on the status. Eg if the destination 1 is streaming but not 2, then a new element appears in xml called <streaming channel1="True">True</streaming> and if 2 destinations, then it changes to <streaming channel1="True" channel2="True">True</streaming>

I can see these settings in the xml file, but I don't know how to write the script to extract them. If I am just looking for the streaming element, I use
isstreaming = (x.SelectSingleNode("//streaming").InnerText)

But I can't find out how to get the channel1 or channel2 for several reasons. The main stumbling block is that the vmix script doesn't allow double quotes inside a string or function, and it doesn't recognise chr(34) or """

Further to that, I am not even sure if this is worth pursuing because it doesn't help with a starting up or failing connection. But I don't know how to get those other status values.

Has anyone else worked on this streaming status area ?



Fist off one will need to add an error trap in the script as what you are looking for is not always there and would stop the script due to not found
Also check the scripting for dumies post to get more insight
Users browsing this topic
Guest (2)
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.