vMix Forums
»
General
»
General Discussion
»
Advertising List (Like Array)
Rank: Newbie
Groups: Registered
Joined: 8/11/2023(UTC) Posts: 2
|
Hi There, I made a List Input with 5 video each video are not the same lengh. i use a shortkey with z key for "Play Out" the list. im looking to play only 1 video at time after the 1st is completed i return to my BlackMagic. but im looking to automatic select the next video in the List Input, like this if i press the z key again is the second video will Play Out. same thing here after is completed i return to BlackMagic, once i reach the last video in the List Input, it select the first video in this list.
Maybe the "Play Out" is not the good way i dont know. im stuck here already for few days.
The reason of this. is we play advertising on dead time in video and i dont want to play the same video twice before we played all the sponsor.
Thanks for your help
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: Pasko Hi There, I made a List Input with 5 video each video are not the same lengh. i use a shortkey with z key for "Play Out" the list. im looking to play only 1 video at time after the 1st is completed i return to my BlackMagic. but im looking to automatic select the next video in the List Input, like this if i press the z key again is the second video will Play Out. same thing here after is completed i return to BlackMagic, once i reach the last video in the List Input, it select the first video in this list.
Maybe the "Play Out" is not the good way i dont know. im stuck here already for few days.
The reason of this. is we play advertising on dead time in video and i dont want to play the same video twice before we played all the sponsor.
Thanks for your help
Can use the playcommand to play a specific video from the list or a transition Have a oncompletion trigger in the lsit input to go back out whe video finishes playing If you use an API call (script) for the above playcommand one can specify the index of the list item (instead of the name) .In the script one can advance the index counter for your next one in the list for the next play call
|
|
|
|
Rank: Guest
Groups: Guests
Joined: 1/13/2010(UTC) Posts: 230
Was thanked: 3 time(s) in 3 post(s)
|
hi pasko and doggy,
i run a 24/7 webtv, based on 2 list inputs and each one has their "OnCompletion" trigger, which jump between them and keep the stream alive. it works very nice
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/11/2023(UTC) Posts: 2
|
There is what i did, i think im very close.
4 Videos files in a List Called "Advertising"
Shortcut on 0numpad key with command "Fade" / Input 3 (Advertising List) Video setted to Current In setting of Input 3 (Advertising List) i setted a trigger : OnCompletion Fade to Input 1 (Main Camera) OnCompletion NextItem on Input 3 (Advertising List)
Than work close to the perfect setting but the problem is when it reached the last video in the List how can i return to the 1st one. Because once i reached to last one every time i hit the Shortcut key it played the last video in the List.
thanks all for your help
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: Pasko
Than work close to the perfect setting but the problem is when it reached the last video in the List how can i return to the 1st one. Because once i reached to last one every time i hit the Shortcut key it played the last video in the List.
thanks all for your help
As i usually work with scripts i do a check t0 see it the "next one" has the same name indicating it the last and jump to the first
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: nikosman88 and for each new list one would need to edit this script, not a flexible idea!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 507 Location: athens Thanks: 123 times Was thanked: 71 time(s) in 67 post(s)
|
Originally Posted by: doggy Originally Posted by: nikosman88 and for each new list one would need to edit this script, not a flexible idea! You`re right. I had made a while ago a script that make exactly this but i had forgotten it. This is a right script for doing this Code:
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
'set the name of your list
dim SI = (x.SelectSingleNode("//input[@shortTitle='Advertising']/@selectedIndex").Value)
'set the numbers of your list items and decide what to do
If SI = "4" Then
API.Function("SelectIndex", Input:="Advertising", Value:="1")
ElseIf SI < 4 Then
API.Function("NextItem", Input:="Advertising")
End if
In order to run it you can do 2 triggers in this input list called "Advertising" like you did 1st trigger OnCompletion Fade to Input 1 (Main Camera) 2nd trigger OnCompletion -->script start -->name your script for example adslist. Also in the 2nd trigger you can put a small delay for example 1500 means 1,5sec because when you do the 1st trigger fade out and then immediatelly the 2nd one it appear for a little time the beggining of the next video in the list and in order to avoid,we can use a small dealy
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: nikosman88 You`re right. I had made a while ago a script that make exactly this but i had forgotten it. This is a right script for doing this Code:
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
'set the name of your list
dim SI = (x.SelectSingleNode("//input[@shortTitle='Advertising']/@selectedIndex").Value)
'set the numbers of your list items and decide what to do
If SI = "4" Then
API.Function("SelectIndex", Input:="Advertising", Value:="1")
ElseIf SI < 4 Then
API.Function("NextItem", Input:="Advertising")
End if
In order to run it you can do 2 triggers in this input list called "Advertising" like you did 1st trigger OnCompletion Fade to Input 1 (Main Camera) 2nd trigger OnCompletion -->script start -->name your script for example adslist. Also in the 2nd trigger you can put a small delay for example 1500 means 1,5sec because when you do the 1st trigger fade out and then immediatelly the 2nd one it appear for a little time the beggining of the next video in the list and in order to avoid,we can use a small dealy What about a bit simpler and only one thing to change inthe script : the actual input number of the list ? - Shorcut to fade (or whatever transition you choose) for the currently selected video in the list - Trigger in the List Input" Oncompletion to Scriptstart the script - After script is done the next video will be slected ready to be played (if last in list auto jump to first inthe list ) ready for the next shortcut transition call - No Need to change the script when adding or removing items in the list Code:dim TheList as string = "27" 'replace with the number of yout List Input
API.Function("Fade") 'fade/play the currently selected clip in the List
dim TheIndex as integer
dim TheoldIndex as integer
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(API.XML())
TheoldIndex = (x.SelectSingleNode("//input[@number='" & TheList & "']/@selectedIndex").Value)
API.Function("SelectIndex",Input:=TheList ,Value:=TheoldIndex +1 ) 'or API.Function("NextItem", Input:=TheList )
x.loadxml(API.XML())
TheIndex = (x.SelectSingleNode("//input[@number='" & TheList & "']/@selectedIndex").Value)
if TheIndex= TheoldIndex
API.Function("SelectIndex",Input:=TheList ,Value:=1) 'reached end of list so jump to first
end if
|
2 users thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/24/2021(UTC) Posts: 507 Location: athens Thanks: 123 times Was thanked: 71 time(s) in 67 post(s)
|
As always you are the master in vmix scripting!
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: nikosman88 As always you are the master in vmix scripting! Nah, just used ChatGPT (or whatever its called) ;-)
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Advertising List (Like Array)
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close