logo

Live Production Software Forums


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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
mirrormatt86  
#1 Posted : Tuesday, December 13, 2022 6:53:41 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Hi brains trust. short of vb.net scripting, is there any way to have a list restart from the top without LOOP (since that just repeats the individual list item if AUTO NEXT is off)
nikosman88  
#2 Posted : Tuesday, December 13, 2022 8:06:19 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
You don't need script for this. Just make a shortcut with command selectindex and value 1
mirrormatt86  
#3 Posted : Friday, December 16, 2022 6:08:42 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: nikosman88 Go to Quoted Post
You don't need script for this. Just make a shortcut with command selectindex and value 1


hi mate, except that just restarts the list without regard for where it is in the list.

I have several lists that we're cycling through. Play one video, then play the next in a different list ... then rinse and repeat a few more times.

List 1 - say - has 20 clips, list 2 has 50. So List one will reach the end before list two and once we come back to list one we'll just repeat that 20th clip... until there is manual intervention to restart the list.
mirrormatt86  
#4 Posted : Friday, December 16, 2022 6:35:25 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

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

If API.Function("SetIndex").Input.Find("list1").Value = "20"
then 
   API.Function("SetIndex", Input:="list1", Value:="1"
end if


?
nikosman88  
#5 Posted : Friday, December 16, 2022 8:20:48 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Ok so you want to restart a list without knowing if the clip you play manually, is or not the last clip in the list.
This may involve some scripting with active window. Don't know personally how to do this but I've read some examples in topic script for dummies. I think you have to make a script that will check name of the last clip in the list is same name at pgm/active window and if then go to top
But also in this situation you have either to edit the script if the last clip in a list changes name or change the name of the last clip inside the list
mirrormatt86  
#6 Posted : Friday, December 16, 2022 8:48:39 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.

It's writing that that I'm stuck on.
nikosman88  
#7 Posted : Friday, December 16, 2022 9:08:11 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
See this script https://forums.vmix.com/...ng-for-Dummies#post94381
You can to try to do something similar. Put in the end of your list a clip with dummy name that will contain a word you want like vot or not or whatever you want. Then if script finds or not this word go or not go to the top of the list
doggy  
#8 Posted : Friday, December 16, 2022 9:22:24 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)
mirrormatt86  
#9 Posted : Friday, December 16, 2022 9:48:08 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)


Hi mate,

I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)...

vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop.

UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list.

So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1.


Hopefully that's a bit clearer?
doggy  
#10 Posted : Friday, December 16, 2022 10:02:59 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)


Hi mate,

I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)...

vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop.

UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list.

So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1.


Hopefully that's a bit clearer?



why not create one list (easy to import/export a list and edit = text file) ?
You mention can't use loop (same episode on repeat) but also you mention an infinite loop ?
Sorry not clear at all (essential for creating a script)

"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before
nikosman88  
#11 Posted : Friday, December 16, 2022 10:26:23 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)


Hi mate,

I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)...

vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop.

UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list.

So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1.


Hopefully that's a bit clearer?

So it plays every time the same episodes one by one from one list to next list? If so you need something that will automatically play your inputs. If so i will suggest and something else. See vscheduler for vmix https://forums.vmix.com/...ler---vMixScheduler-Fork it have it`s own list that plays inside vmix in the time you want, you can do copy-paste-insert inside list, see exact time when a clip starts or ends
nikosman88  
#12 Posted : Friday, December 16, 2022 10:28:43 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mirrormatt86 Go to Quoted Post
I'm thinking I should be able to grab the SelectedIndex state - given that I know the number of videos in the list. If=20, Then=SetSelectedIndex=1... that would restart the list - especially if I run the script OnTransitionOut.



One can retrieve the current index , the list of items , the count of items in the list, the current status of an item in this list etc . (or anything that is presented inthe vMix API XML)

Still don't fully understand the goal though ( restart, loop , switch, continue ???)


Hi mate,

I've created a live stream of all of our video podcasts, with around 25 episodes per list (totaling 13 lists right now)...

vMix plays an episode in List 1, OnCompletion STINGER1 to next Input (list 2). And so on until list 13 when it transitions back to list 1... thus creating a infinite loop.

UNTIL, we've played through all of the videos in the list. Without LOOP enabled the list stays on that final video - repeating it each time we come back to the list, because there's no trigger to restart list. We can't enable LOOP because we'll have the same episode on repeat - just like current experience with the final video in the list.

So it has to be a VB .net script - because OnTransitionOut we need to poll the API about what is cued in that list. If the last clip, then recue to clip 1.


Hopefully that's a bit clearer?



why not create one list (easy to import/export a list and edit = text file) ?
You mention can't use loop (same episode on repeat) but also you mention an infinite loop ?
Sorry not clear at all (essential for creating a script)

"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before

I agree with you. But list system in vmix can go too heavy (depends on pc specs of course) if you load too many items. So it is better if you have too many files to split them in 2 or more lists
mirrormatt86  
#13 Posted : Friday, December 16, 2022 11:04:24 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: doggy Go to Quoted Post

why not create one list (easy to import/export a list and edit = text file) ?
You mention can't use loop (same episode on repeat) but also you mention an infinite loop ?
Sorry not clear at all (essential for creating a script)

"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before


Because one list will play over 980+ episodes in order (or in some random order that I have no control over)

I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list.



I was pretty clear in the beginning and even showed my attempted script...


OnTransitionOut -> Run Script

Script needs to be:

Load API
Read IndexValue of list1
If IndexValue=20
THEN SetIndexValue=1
Else DO NOTHING


The examples being linked to in that other thread do not work and are not fit for this purpose.
doggy  
#14 Posted : Friday, December 16, 2022 11:22:49 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

why not create one list (easy to import/export a list and edit = text file) ?
You mention can't use loop (same episode on repeat) but also you mention an infinite loop ?
Sorry not clear at all (essential for creating a script)

"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before


Because one list will play over 980+ episodes in order (or in some random order that I have no control over)

I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list.



I was pretty clear in the beginning and even showed my attempted script...


OnTransitionOut -> Run Script

Script needs to be:

Load API
Read IndexValue of list1
If IndexValue=20
THEN SetIndexValue=1
Else DO NOTHING


The examples being linked to in that other thread do not work and are not fit for this purpose.


With all due respect you have no idea how to script and even claim a posted script in "scripting for dummies" is wrong becasue it just doesn't work for you without even bothering to answer the subsequent question so far .

First one has to detail the procesflow of what you want to achieve (in detail) based on what criteria etc. (Its called a flowchart). Have to check if the functions needed in that flow are available and how to best implement them. If somethng isnot directly avaialable, is there a way to get that anyway or what alternative does one has to come up with.
There is a need to capture and solve the what if's too.

What seems like a simple idea might turn out to be a very complex thing to find a proper logic to as a script.

Script tidbits that are linked to are almost never the full solution but merely ideas to work from and adjust

nikosman88  
#15 Posted : Friday, December 16, 2022 11:39:08 PM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

why not create one list (easy to import/export a list and edit = text file) ?
You mention can't use loop (same episode on repeat) but also you mention an infinite loop ?
Sorry not clear at all (essential for creating a script)

"poll the API about what is cued in that list." : info to determin is in the API XML as mentioned before


Because one list will play over 980+ episodes in order (or in some random order that I have no control over)

I can't use the list's LOOP function as it will loop that list. The infinite loop is playing between each list.



I was pretty clear in the beginning and even showed my attempted script...


OnTransitionOut -> Run Script

Script needs to be:

Load API
Read IndexValue of list1
If IndexValue=20
THEN SetIndexValue=1
Else DO NOTHING


The examples being linked to in that other thread do not work and are not fit for this purpose.

So you have 13 lists in vmix with various file names and every lists has different quantity of files that you play between them in a circle and you want a script that will "understand" which is last file in every list and after the completion of this last file in any list, this list will go again to first file. Right?
mavik  
#16 Posted : Saturday, December 17, 2022 1:18:24 AM(UTC)
mavik

Rank: Advanced Member

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

Thanks: 3 times
Was thanked: 168 time(s) in 150 post(s)
Can't you check the length of a given list and do a modulo. Every time there is no rest start the list again. This way the script can be used generally, the lists can change over time (more/less items). You may even wan't to write to a simple text file for how often you repeated a list or item inside if you need it for reportings (adds)
nikosman88  
#17 Posted : Saturday, December 17, 2022 6:20:52 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Originally Posted by: mavik Go to Quoted Post
Can't you check the length of a given list and do a modulo. Every time there is no rest start the list again. This way the script can be used generally, the lists can change over time (more/less items). You may even wan't to write to a simple text file for how often you repeated a list or item inside if you need it for reportings (adds)

He says that he has auto next disabled and want to move between lists. By this case every time a video plays and ends it will be zero duration the list. How can you know that really you are in the end of list?
mirrormatt86  
#18 Posted : Saturday, December 17, 2022 6:31:09 AM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

With all due respect, I don’t need to know the ins and outs of scripting - that’s why I came to the forum. I understand that it’s tiresome, annoying and frustrating for senior users to have to answer questions daily on these matters - but my advice there would be, stop doing it.

You’re all getting stuck on some pretty basic stuff - how will the script know when it’s the end of the list? what you’re doing is stupid. What your asking for needs to be learnt by yourself - defeating the purpose of the forum.

I know what the final SelectedIndex value will be, the script doesn’t need to guess it.

I will create a script for each list and I will tell it what the end of the list is and then what to do. The script will then run each time the list transitions out. If the condition is true then it will execute the next line.

Don’t presume to tell me what I do and don’t know, when I have answered your questions and you are simply returning to say that I am stupid… a common failing of these forums.
nikosman88  
#19 Posted : Saturday, December 17, 2022 6:42:50 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 123 times
Was thanked: 71 time(s) in 67 post(s)
Originally Posted by: mirrormatt86 Go to Quoted Post
With all due respect, I don’t need to know the ins and outs of scripting - that’s why I came to the forum. I understand that it’s tiresome, annoying and frustrating for senior users to have to answer questions daily on these matters - but my advice there would be, stop doing it.

You’re all getting stuck on some pretty basic stuff - how will the script know when it’s the end of the list? what you’re doing is stupid. What your asking for needs to be learnt by yourself - defeating the purpose of the forum.

I know what the final SelectedIndex value will be, the script doesn’t need to guess it.

I will create a script for each list and I will tell it what the end of the list is and then what to do. The script will then run each time the list transitions out. If the condition is true then it will execute the next line.

Don’t presume to tell me what I do and don’t know, when I have answered your questions and you are simply returning to say that I am stupid… a common failing of these forums.

With all respect also you come here and ask for help on how to do what you want to do. And everybody here tries to help you.
mirrormatt86  
#20 Posted : Saturday, December 17, 2022 6:45:11 AM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: nikosman88 Go to Quoted Post

With all respect also you come here and ask for help on how to do what you want to do. And everybody here tries to help you.


Yeah, a few suggestions have been offered, but an ignorance of my use case remains.
Users browsing this topic
Guest (8)
2 Pages12>
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.