logo

Live Production Software Forums


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

Notification

Icon
Error

26 Pages«<56789>»
Options
Go to last post Go to first unread
NDI_SRT  
#121 Posted : Tuesday, July 6, 2021 8:59:59 PM(UTC)
NDI_SRT

Rank: Newbie

Groups: Registered
Joined: 6/29/2021(UTC)
Posts: 3
Indonesia
Location: Manado

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: NDI_SRT Go to Quoted Post

Thanks for this script. I will use it for playing list of several items in AutoNext mode.


Why would you need this script if you are playing the list in auto next ?

I want to trigger something before the list ends

Quote:
I want the trigger to occur once at the last item with their total duration and not before every item ends.


Again , the mentioned script is not applicable then (some of it's ideas might)

I will keep looking for this till it's solved

Quote:
What should be the syntax like?


So you want someone to solve your specific request by writing code for you ? With all due respect I suggest hiring a programmer!

Tell the programmer the code needs to check for the last item being played, check when its at the end of its play and then perform the trigger.

There are often several different ways to skin a cat. This thread provides little tidbits and ideas to start from and learn.


Thank you for your suggestion, i love this thread because it is for Dummy and i love learning.
doggy  
#122 Posted : Tuesday, July 6, 2021 9:33:40 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
You are contradicting yourself

Quote:
I want the trigger to occur once at the last item with their total duration

<>
Quote:
I want to trigger something before the list ends


Anyway , check if last item of list is playing or get the total time of the list items then check its time and calculate
gefiltafish  
#123 Posted : Tuesday, August 24, 2021 4:23:03 AM(UTC)
gefiltafish

Rank: Advanced Member

Groups: Registered
Joined: 12/5/2017(UTC)
Posts: 32
Location: Zagreb

Thanks: 8 times
Heya guys, I would need some help

I have a layer in .gtzip that is hidden, and would like for it to become visible after a certain cell in my Google Sheet becomes "yes" (e.g. or some other word/number).

I'm trying to find out how can vMix read a cell from Google Sheet?
doggy  
#124 Posted : Tuesday, August 24, 2021 5:58:05 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: gefiltafish Go to Quoted Post
Heya guys, I would need some help

I have a layer in .gtzip that is hidden, and would like for it to become visible after a certain cell in my Google Sheet becomes "yes" (e.g. or some other word/number).

I'm trying to find out how can vMix read a cell from Google Sheet?


Use your google sheet as a data source and connext the"yes" cell tot a textbox in your title . hide that if needed.

Let the script read that textbox and act upon its value with approprate functions.

Chech out previous comments inthis post to see how to retrieve the text from a title textbox
thanks 1 user thanked doggy for this useful post.
gefiltafish on 9/14/2021(UTC)
chasseb  
#125 Posted : Thursday, September 2, 2021 6:50:46 AM(UTC)
chasseb

Rank: Newbie

Groups: Registered
Joined: 4/9/2020(UTC)
Posts: 7
Canada
Location: montréal

Thanks: 4 times
I'm trying to create a script that would close all audio sources except mic 1 for example. I know how to shut off all audio sources. is to create the exception of which I am incapable.

anyone have an idea
doggy  
#126 Posted : Thursday, September 2, 2021 11:31:19 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: chasseb Go to Quoted Post
I'm trying to create a script that would close all audio sources except mic 1 for example. I know how to shut off all audio sources. is to create the exception of which I am incapable.

anyone have an idea


Do you mean close the inputs (remove) or just silence them ?
What do you have so far ?

For an exception create an if then else loop while checking the name of the input
doggy  
#127 Posted : Friday, September 3, 2021 2:18:49 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: Harness Go to Quoted Post
Hello,

Is there any way to find the duration of a video in a playlist using a script?

Cheers


From the one that is currently playing yes (API XML) else no

PS: havent checked if it matches the position and duration of a clip set within the playlist
doggy  
#128 Posted : Saturday, September 4, 2021 3:14:59 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
From another post regarding AUDIO

https://forums.vmix.com/...ntally-via-API#post95893


IncreaseGain.JPG (39kb) downloaded 12 time(s).
gefiltafish  
#129 Posted : Tuesday, September 14, 2021 5:39:50 AM(UTC)
gefiltafish

Rank: Advanced Member

Groups: Registered
Joined: 12/5/2017(UTC)
Posts: 32
Location: Zagreb

Thanks: 8 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: gefiltafish Go to Quoted Post
Heya guys, I would need some help

I have a layer in .gtzip that is hidden, and would like for it to become visible after a certain cell in my Google Sheet becomes "yes" (e.g. or some other word/number).

I'm trying to find out how can vMix read a cell from Google Sheet?


Use your google sheet as a data source and connext the"yes" cell tot a textbox in your title . hide that if needed.

Let the script read that textbox and act upon its value with approprate functions.

Chech out previous comments inthis post to see how to retrieve the text from a title textbox




Had to login to say thank you! You made me use my head and find a solution instead of just giving one to me! :) it was hard, but I found what I needed to do, but not in a way how I wanted to do it (I've sent a number from GSheet to Data Source, linked it to a random .gtzip and then the script reads the number and does what I need).

Thank you once again!
minhdowndown  
#130 Posted : Wednesday, September 22, 2021 12:38:36 AM(UTC)
minhdowndown

Rank: Member

Groups: Registered
Joined: 9/2/2021(UTC)
Posts: 10
Viet Nam
Location: VN

Thanks: 4 times
hello, is it possible to make a script to auto choose the last item of the list when cut/fade to the list, regardless of whether other items is added or not? Like this topic: https://forums.vmix.com/.../t8562-LastItem-for-List
Thanks.
doggy  
#131 Posted : Wednesday, September 22, 2021 4:07:38 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: minhdowndown Go to Quoted Post
hello, is it possible to make a script to auto choose the last item of the list when cut/fade to the list


Directly No (there is no select function for a list) , indirectly Yes

Quote:
, regardless of whether other items is added or not?
even if there is only one it will be the last one also ;-)
What is the criteria of a last item ? time/date , manually added , added based on some production process, why a list to play only one ?


script: check the XML API for the list input content, check for the file in last place , loaded into vMix and transition to it to play

hardayildiz  
#132 Posted : Wednesday, September 29, 2021 8:52:49 PM(UTC)
hardayildiz

Rank: Member

Groups: Registered
Joined: 1/20/2021(UTC)
Posts: 11
Location: Istanbul

Thanks: 8 times
Hello,

First i must explain the theme i have a little;

- I have uvmap virtual sets.
- Each virtual set has it's own NDI source and these are constant. (in example: "Virtual Set1" does always include "NDI source1")

- I also have multilayer inputs.
- Each multilayer input have above virtual sets distributed between layer3 and layer9
- Layer order of these virtual sets are always changing. (but they are always between layer3-layer9)
- Each of these multilayer inputs have different positioning, some layers are positioned outside of the screen limits, but they still have their virtual sets on them to be able to make clean merge transition.


I'm working on a script which i want to do the below, there will be different scripts for each multilayer input.

Step 1) It will determine which input is on layer 3,4,5 (i'm confused at this step)
Step 2) it will turn on the audio of NDI inputs depending on the input it determined on step 1
Step 3) it will determine which input is on layer 6,7,8,9 (again this is the step i'm stuck)
Step 4) it will turn of the audio of NDI inputs depending on the input it determined on step 3

Once i achieve to have one working script, i will create for all other multilayer inputs based on the working one.

Appreciate your help on Step 1&3
doggy  
#133 Posted : Wednesday, September 29, 2021 10:04:22 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: hardayildiz Go to Quoted Post
Hello,

First i must explain the theme i have a little;

- I have uvmap virtual sets.
- Each virtual set has it's own NDI source and these are constant. (in example: "Virtual Set1" does always include "NDI source1")

- I also have multilayer inputs.
- Each multilayer input have above virtual sets distributed between layer3 and layer9
- Layer order of these virtual sets are always changing. (but they are always between layer3-layer9)
- Each of these multilayer inputs have different positioning, some layers are positioned outside of the screen limits, but they still have their virtual sets on them to be able to make clean merge transition.


I'm working on a script which i want to do the below, there will be different scripts for each multilayer input.

Step 1) It will determine which input is on layer 3,4,5 (i'm confused at this step)
Step 2) it will turn on the audio of NDI inputs depending on the input it determined on step 1
Step 3) it will determine which input is on layer 6,7,8,9 (again this is the step i'm stuck)
Step 4) it will turn of the audio of NDI inputs depending on the input it determined on step 3

Once i achieve to have one working script, i will create for all other multilayer inputs based on the working one.

Appreciate your help on Step 1&3


https://forums.vmix.com/...ng-for-Dummies#post84682
filipe.shakeit  
#134 Posted : Friday, October 8, 2021 1:34:01 AM(UTC)
filipe.shakeit

Rank: Member

Groups: Registered
Joined: 9/29/2021(UTC)
Posts: 11
Portugal
Location: Porto

Thanks: 3 times
I'm not able to use a variable in "inputnametoaddtolayer3" field. It works with a number. So, am I missing something??

Code:

'Change/Add the input of a multilayer Input
API.Function("SetMultiViewOverlay",Input:="InputWithMultiview",Value:="3,inputnameToAddToLayer3")



I also use the function "SetLayer".

I'm sorry if this has been answered before, I've been looking for a while. Thank you all for sharing all this tips. Scripting in vmix is changing everything for the better :)
doggy  
#135 Posted : Friday, October 8, 2021 3:52:43 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: filipe.shakeit Go to Quoted Post
I'm not able to use a variable in "inputnametoaddtolayer3" field. It works with a number. So, am I missing something??

Code:

'Change/Add the input of a multilayer Input
API.Function("SetMultiViewOverlay",Input:="InputWithMultiview",Value:="3,inputnameToAddToLayer3")



I also use the function "SetLayer".

I'm sorry if this has been answered before, I've been looking for a while. Thank you all for sharing all this tips. Scripting in vmix is changing everything for the better :)


inputnameToAddToLayer3 is within the quote of the value string so is taken literally and not as a variable !

Either build it up a string by pulling the variable's content first and convert
or Try something like this maybe:
Code:
...........,Value:="3," + inputnameToAddToLayer3.tostring)

If the variable contains an integer else just the variable name if already a string

Good idea is to check out the tons of vb.net coding sites !
filipe.shakeit  
#136 Posted : Friday, October 8, 2021 4:04:45 AM(UTC)
filipe.shakeit

Rank: Member

Groups: Registered
Joined: 9/29/2021(UTC)
Posts: 11
Portugal
Location: Porto

Thanks: 3 times
Yeah!

I tried string and integer. Also tried:
...........,Value:="3," & inputnameToAddToLayer3)

It kinda works for the first line but I get an error (on save no errors are shown)

"error line 5: The calling thread must be STA, because many UI components require this."

to add, even if I have a long list of working functions, sometimes I get this message.
If you run the script multiple times I eventualy end up with all the functions running.

So, I assume there is something we have to do earlier or, it is what it is.

Thanks
doggy  
#137 Posted : Friday, October 8, 2021 4:35:40 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: filipe.shakeit Go to Quoted Post
Yeah!
So, I assume there is something we have to do earlier or, it is what it is.

Thanks


How are we supposed to know without any source ,what you have done/written, want to achieve . Kinda guess maybe?

you will never get an error if the logic of the script is wrong . typos, bad syntaxes on the other hand will bug you to no end.
Scripts can not read minds, nor can we
filipe.shakeit  
#138 Posted : Friday, October 8, 2021 7:22:38 PM(UTC)
filipe.shakeit

Rank: Member

Groups: Registered
Joined: 9/29/2021(UTC)
Posts: 11
Portugal
Location: Porto

Thanks: 3 times
You are right! I'm sorry about that.

So, I have a number of inputs designed to acomodate vmixcall inputs. Depending on the session, I use diferent calls so I have a script for each session. Because the script is big, I'll show the example for the first 2 layout inputs.

<code>

'First, making sure all layers are ON, inside layout inputs

dim inputn as integer = 24

for n as integer = 24 to 47

dim layer1 as integer = 1

for i as integer = 1 to 10
API.Function("LayerOn",Input:=inputn,Value:=layer1)
layer1 = layer1 + 1
next

inputn = inputn + 1
Sleep(200)
next

'next, define vmixcall to each speaker

dim moderador as integer = 1 'refer call for the moderator
dim oradora as integer = 2 'refer call for the first speaker
dim oradorb as integer = 3 'refer call for the second speaker

API.Function("SetLayer",Input:="24",Value:="2,"&moderador)

API.Function("SetLayer",Input:="25",Value:="2,"&moderador)

API.Function("SetLayer",Input:="25",Value:="3,"&oradora)

API.Function("SetLayer",Input:="25",Value:="4,"&oradorb)

</code>

With the code like this I have a syntax error.

The current script I use works but I have to go througth each line individualy:

<code>
API.Function("SetLayer",Input:="24",Value:="2,1")

API.Function("SetLayer",Input:="25",Value:="2,1")

API.Function("SetLayer",Input:="25",Value:="3,2")

API.Function("SetLayer",Input:="25",Value:="4,3")
</code>

Sorry for the long text. I hope it helps other folks also. Thanks :)
doggy  
#139 Posted : Friday, October 8, 2021 11:57:42 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 916 time(s) in 755 post(s)
Originally Posted by: filipe.shakeit Go to Quoted Post

'next, define vmixcall to each speaker

dim moderador as integer = 1 'refer call for the moderator
dim oradora as integer = 2 'refer call for the first speaker
dim oradorb as integer = 3 'refer call for the second speaker

API.Function("SetLayer",Input:="24",Value:="2,"&moderador)

API.Function("SetLayer",Input:="25",Value:="2,"&moderador)

API.Function("SetLayer",Input:="25",Value:="3,"&oradora)

API.Function("SetLayer",Input:="25",Value:="4,"&oradorb)

</code>

With the code like this I have a syntax error.


Did you actually read previous answers? the "moderador" etc you are using are integers but have to be a string !
Also add s pace before and after & or use a +

right here : https://forums.vmix.com/...ng-for-Dummies#post96700
Roy Sinclair  
#140 Posted : Saturday, October 9, 2021 8:03:41 AM(UTC)
Roy Sinclair

Rank: Advanced Member

Groups: Registered
Joined: 11/23/2020(UTC)
Posts: 146
United States
Location: Wichita

Thanks: 8 times
Was thanked: 21 time(s) in 17 post(s)
Originally Posted by: filipe.shakeit Go to Quoted Post
You are right! I'm sorry about that.

So, I have a number of inputs designed to acomodate vmixcall inputs. Depending on the session, I use diferent calls so I have a script for each session. Because the script is big, I'll show the example for the first 2 layout inputs.

...

Sorry for the long text. I hope it helps other folks also. Thanks :)


Overly complex, you set up a for-next loop with an integer that goes from 1 to 10 and just before the loop you set an integer to 1 and increment it by 1 each time through the loop which is totally redundant because it will always have the exact same value as the integer from the for-next loop.

The following may not work either but it's simpler and should be a lot closer to functional. It have tried it but I don't have access to vMix right now to see what it might complain about.

Code:

'			First, making sure all layers are ON, inside layout inputs

dim inputn as integer = 24
for n as integer = 24 to 47
	for layer1 as integer = 1 to 10
		API.Function("LayerOn",Input:=inputn,Value:=layer1)
	next
	inputn += 1
	Sleep(200) ' Wait .2 seconds
next
'			next, define vmixcall to each speaker

dim moderador as string = "1" 	'	refer call for the moderator
dim oradora as string = "2"   	'	refer call for the first speaker
dim oradorb as string = "3"   	'	refer call for the second speaker

API.Function("SetLayer", Input:= "24", Value:= "2," + moderador)
API.Function("SetLayer", Input:= "25", Value:= "2," + moderador)
API.Function("SetLayer", Input:= "25", Value:= "3," + oradora)
API.Function("SetLayer", Input:= "25", Value:= "4," + oradorb)
Users browsing this topic
26 Pages«<56789>»
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.