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
Yannick  
#1 Posted : Monday, November 5, 2018 12:40:28 AM(UTC)
Yannick

Rank: Advanced Member

Groups: Registered
Joined: 9/12/2017(UTC)
Posts: 37
Location: Germany

Thanks: 2 times
Was thanked: 10 time(s) in 9 post(s)
Hello,

I´m currently facing a problem with increased render times when I´m using an external controller that controls vmix through the tcp api.
The controller is sending a huge amount of commands to vmix to be able to monitor the status of all inputs.
This seems to increase the cpu load dramatically. Instead of around 8ms render time I´m seeing times of 180ms and more.
This results in huge amounts of dropped frames.

Does anyone know how stressfull it is for vmix to be constantly confronted with api requests?
Is there a guideline as to how much commands I can request per second without seeing increased render times?

Thank you for your help
Yannick
Yannick  
#2 Posted : Monday, November 5, 2018 1:19:16 AM(UTC)
Yannick

Rank: Advanced Member

Groups: Registered
Joined: 9/12/2017(UTC)
Posts: 37
Location: Germany

Thanks: 2 times
Was thanked: 10 time(s) in 9 post(s)
Hi again,

I just checked out the subscribe possibility of the tcp api.
This should be the best solution to reduce the high amount of requests to keep the controller "real time" updated.
However, I saw in the release notes for vmix 20 that the subscripe command was only supporting the tally functionality.
Are there already other functions implemented?
I was only able to get the tally functionality working, but maybe it´s just a mistake in my command...

Otherwise I will have to make a feature request to add a lot of functions to the subscribe function, or I won´t be able to have a working controller :-(
admin  
#3 Posted : Monday, November 5, 2018 2:59:14 AM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,158
Man
Location: Gold Coast, Australia

Was thanked: 4162 time(s) in 1495 post(s)
Hi,

We've tested the TCP API in excess of over 60 times a second without issue
so I suspect something else is going on.

First make sure you are using the same connection, creating a new TCP connection
each time is going to create a huge amount of unnecessary overhead.

Next, make sure the commands are sent no faster than 16-20ms, and that you wait for
a response from vMix each time before sending another command.

I recommend 100ms as a good polling rate that has good performance yet still ensures the controls will be responsive.

Regards,

Martin
vMix
Yannick  
#4 Posted : Monday, November 5, 2018 9:34:48 PM(UTC)
Yannick

Rank: Advanced Member

Groups: Registered
Joined: 9/12/2017(UTC)
Posts: 37
Location: Germany

Thanks: 2 times
Was thanked: 10 time(s) in 9 post(s)
Hello Martin,

Thank you for the fast and informative answer.

My problem might be that I´m sending far more than 60 requests pe second.
I´m building a controller with 16 channels, and to poll all information that the controller is currently able to indicate
(Channel Name, Volume, Preview, Program, Output2, Output3, Output4, Playing, Audio, BusAAudio, BusBAudio, BusMAudio)
I have 192 datapoints. If I want to be somehow responsive I have to update each of them at least 10times per second,
otherwise the user experience will be terrible. So I would have 1920 requests per second.

Since I´m planning to have even more datapoints in the future, I will have to do the implementation differently.
So my hope is for the subscribe events to include all those datapoints.
I have started a feature request for that.

Regards
Yannick
admin  
#5 Posted : Tuesday, November 6, 2018 11:07:37 PM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,158
Man
Location: Gold Coast, Australia

Was thanked: 4162 time(s) in 1495 post(s)
If I am understanding correctly you are using XMLTEXT to parse individual properties?
If so that explains the overhead, as XMLTEXT internally retrieves the entire XML state each time and extracts the property value.

But never fear, vMix 21 actually added all the events in activators to the TCP API, see the ACTS command below:

https://www.vmix.com/help21/TCPAPI.html

You can subscribe to events for most of what you need via that.

Regards,

Martin
vMix
thanks 1 user thanked admin for this useful post.
rowby on 11/8/2018(UTC)
Users browsing this topic
Guest
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.