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
Peter Berglund  
#1 Posted : Monday, February 5, 2024 8:28:45 PM(UTC)
Peter Berglund

Rank: Advanced Member

Groups: Registered
Joined: 1/9/2019(UTC)
Posts: 76
Man
Sweden
Location: Stockholm

Thanks: 19 times
Was thanked: 5 time(s) in 4 post(s)
Hi,

I often use the merge-function with long transition times like 8000ms. By that I can achieve smooth zooms in and out from a 4K camera input to a virtual input of the same camera with predefined zoom and pan. Works just perfect. But I have done mistakes and selected another input for preview DURING an ongoing transition and the consequence is obvious.

A couple of years ago we had a feature request (https://forums.vmix.com/posts/t26470-Indicator-that-effect-is-processing) to indicate exactly this in the vMix UI - and we got it! Big thx to the vMix-team!

Long story short, I would appreciate if we could get a shortcut for the exact same thing. For example "TransitionActive" that just returns true or false, or a string value of the remaining transition time in ms. I would then use this information and add functionality to my Skaarhoj AirflyPro to prevent human error during live events.

Thx!
/Peter
doggy  
#2 Posted : Monday, February 5, 2024 8:59:33 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: Peter Berglund Go to Quoted Post
Hi,

I often use the merge-function with long transition times like 8000ms. By that I can achieve smooth zooms in and out from a 4K camera input to a virtual input of the same camera with predefined zoom and pan. Works just perfect. But I have done mistakes and selected another input for preview DURING an ongoing transition and the consequence is obvious.

A couple of years ago we had a feature request (https://forums.vmix.com/posts/t26470-Indicator-that-effect-is-processing) to indicate exactly this in the vMix UI - and we got it! Big thx to the vMix-team!

Long story short, I would appreciate if we could get a shortcut for the exact same thing. For example "TransitionActive" that just returns true or false, or a string value of the remaining transition time in ms. I would then use this information and add functionality to my Skaarhoj AirflyPro to prevent human error during live events.

Thx!
/Peter


Interesting.

Until available can you not check the value (script) of the Preview input number ( API XML) as that changes to what was the output the moment a transition finishes ? this could create your shortcut/trigger
Peter Berglund  
#3 Posted : Monday, February 5, 2024 9:12:50 PM(UTC)
Peter Berglund

Rank: Advanced Member

Groups: Registered
Joined: 1/9/2019(UTC)
Posts: 76
Man
Sweden
Location: Stockholm

Thanks: 19 times
Was thanked: 5 time(s) in 4 post(s)
Quote:
Interesting.

Until available can you not check the value (script) of the Preview input number ( API XML) as that changes to what was the output the moment a transition finishes ? this could create your shortcut/trigger


Thx for your suggestion. Might be possible, but so much easier to act on a vMix DeviceCore parameter inside Skaarhoj (Reactor). I can imagine that other control surfaces can benefit from the suggested shortcut as well, and even inside a script itself to make things simpler.

Thx!
/Peter
richardgatarski  
#4 Posted : Tuesday, February 6, 2024 1:19:30 AM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,815
Location: Stockholm

Thanks: 138 times
Was thanked: 292 time(s) in 246 post(s)
+1, if
As I guess Peter means some information in the API XML that reflects the status, something like:
Quote:
<transitions>
<transition number="1" active="true" effect="Fade" duration="500"/>
<transition number="2" active="false" effect="Merge" duration="500"/>
<transition number="3" active="false" effect="Wipe" duration="1000"/>
<transition number="4" active="false" effect="CubeZoom" duration="1000"/>
</transitions>


or, perhaps instead of "true" reports time in ms, e.e "200", where the number is how far the transition has executed
Peter Berglund  
#5 Posted : Tuesday, February 6, 2024 1:32:51 AM(UTC)
Peter Berglund

Rank: Advanced Member

Groups: Registered
Joined: 1/9/2019(UTC)
Posts: 76
Man
Sweden
Location: Stockholm

Thanks: 19 times
Was thanked: 5 time(s) in 4 post(s)
Originally Posted by: richardgatarski Go to Quoted Post
+1, if
As I guess Peter means some information in the API XML that reflects the status, something like:
Quote:
<transitions>
<transition number="1" active="true" effect="Fade" duration="500"/>
<transition number="2" active="false" effect="Merge" duration="500"/>
<transition number="3" active="false" effect="Wipe" duration="1000"/>
<transition number="4" active="false" effect="CubeZoom" duration="1000"/>
</transitions>


or, perhaps instead of "true" reports time in ms, e.e "200", where the number is how far the transition has executed


Well, for me it's good enough by far if it is an or-query of these transition numbers. In other way, if any of the transitions are active, return "True". Else "False". Or as I mentioned in my original post, remaining time in ms (rather than how far the transition has executed). So if 0(ms) is returned, it equals transition complete.

Thx!
/P
doggy  
#6 Posted : Tuesday, February 6, 2024 1:55:15 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: richardgatarski Go to Quoted Post
+1, if
As I guess Peter means some information in the API XML that reflects the status, something like:
Quote:
<transitions>
<transition number="1" active="true" effect="Fade" duration="500"/>
<transition number="2" active="false" effect="Merge" duration="500"/>
<transition number="3" active="false" effect="Wipe" duration="1000"/>
<transition number="4" active="false" effect="CubeZoom" duration="1000"/>
</transitions>


or, perhaps instead of "true" reports time in ms, e.e "200", where the number is how far the transition has executed


WOuld be handy indeed but imo only usefull for long transition times. Both could be done/retrieved with a (VB.net) script though for now . either way it would have to be queried by script and a lot would depend on how you woud call the transition , decide which transition want to look for etc

Pron more effective if it would show which transition is actually hapening
richardgatarski  
#7 Posted : Tuesday, February 6, 2024 2:13:19 AM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,815
Location: Stockholm

Thanks: 138 times
Was thanked: 292 time(s) in 246 post(s)
Originally Posted by: doggy Go to Quoted Post
imo only usefull for long transition times.

agree

Originally Posted by: doggy Go to Quoted Post
Both could be done/retrieved with a (VB.net) script though for now . either way it would have to be queried by script and a lot would depend on how you woud call the transition , decide which transition want to look for etc

This brings, together with an idea for a new related FR I am pondering about, up the question how frequently the XML is updated by vix? I have not seen anything about that in the documentation. (I understand that the XML is generated when the API is called, but is it generated directly from vMix current status, or is it somehow cashed?)

doggy  
#8 Posted : Tuesday, February 6, 2024 2:17:37 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: richardgatarski Go to Quoted Post

This brings, together with an idea for a new related FR I am pondering about, up the question how frequently the XML is updated by vix? I have not seen anything about that in the documentation. (I understand that the XML is generated when the API is called, but is it generated directly from vMix current status, or is it somehow cashed?)



AFAIK Presets are updated once a minute, API XML whenever there is a change

Checking it with using it as a datasource there it is responding tothe min poling time of 100 miliseconds
richardgatarski  
#9 Posted : Tuesday, February 6, 2024 3:10:49 AM(UTC)
richardgatarski

Rank: Advanced Member

Groups: Registered
Joined: 2/18/2014(UTC)
Posts: 1,815
Location: Stockholm

Thanks: 138 times
Was thanked: 292 time(s) in 246 post(s)
Originally Posted by: doggy Go to Quoted Post
Checking it with using it as a datasource there it is responding tothe min poling time of 100 miliseconds

No offence, and you had a lower time than 100ms set for the Datasource update interval?
In any case, thanks for checking - good to know (100 ms is a lot in my humble opinion).

doggy  
#10 Posted : Tuesday, February 6, 2024 4:11:35 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: richardgatarski Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Checking it with using it as a datasource there it is responding tothe min poling time of 100 miliseconds

No offence, and you had a lower time than 100ms set for the Datasource update interval?
In any case, thanks for checking - good to know (100 ms is a lot in my humble opinion).



One can not set the update interval lower than 100ms in the datasource manager ( can in script)
doggy  
#11 Posted : Tuesday, February 6, 2024 4:15:34 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Below is a go at determining time remaining and when a transition is finished
Its based on the transitionsettings on the vMix GUI
Mind you response time in the script editor console is slower than actual say display info in the title


Code:
' One of Transitions (1-4) set in the vMix GUI
dim vTransition as string = "CubeZoom"

dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)

'Get the duration of the transition
Dim vDuration as string = x.SelectSingleNode("//transition[@effect='" & Vtransition & "']/@duration").Value

'Input that is currently active
Dim vActive as string = x.SelectSingleNode("//active").InnerText

Dim vElapsed As TimeSpan 
Dim watch As Stopwatch = Stopwatch.StartNew()

'Execute the transition
API.Function(vTransition,,duration:=vDuration )

Do While true

    xml= API.XML()
    x.loadxml(xml)
  
    If x.SelectSingleNode("//preview").InnerText = vActive 
       ' if preview becomes what was active the transition is done
       console.writeline("Done")
       API.Function("SetText",Input:=1,SelectedName:="Headline.Text" ,Value:="DONE")  
       Exit do 
    else
       ' a bit of countdon based on the transition duration (formula can be improved)
       API.Function("SetText",Input:=1,SelectedName:="Headline.Text" ,Value:=(vDuration/1000) - Math.Floor(watch.Elapsed.TotalMilliseconds/1000) ) 
       Console.WriteLine( vDuration/1000 - Math.Floor(watch.Elapsed.TotalMilliseconds/1000))
    end if
    ' sleep(100)
Loop


thanks 1 user thanked doggy for this useful post.
richardgatarski on 2/6/2024(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.