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
Pasko  
#1 Posted : Friday, August 11, 2023 8:22:19 PM(UTC)
Pasko

Rank: Newbie

Groups: Registered
Joined: 8/11/2023(UTC)
Posts: 2
Canada

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
doggy  
#2 Posted : Friday, August 11, 2023 10:02:06 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: Pasko Go to Quoted Post
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
melody  
#3 Posted : Saturday, August 12, 2023 1:38:44 AM(UTC)
Guest

Rank: Guest

Groups: Guests
Joined: 1/13/2010(UTC)
Posts: 230

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

Pasko  
#4 Posted : Saturday, August 12, 2023 1:53:32 AM(UTC)
Pasko

Rank: Newbie

Groups: Registered
Joined: 8/11/2023(UTC)
Posts: 2
Canada

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

doggy  
#5 Posted : Saturday, August 12, 2023 3:41:06 AM(UTC)
doggy

Rank: Advanced Member

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

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


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
doggy  
#6 Posted : Saturday, August 12, 2023 3:52:43 AM(UTC)
doggy

Rank: Advanced Member

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

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


Yes one can use your script https://forums.vmix.com/...another-input#post102595
to check the 4 videos and do what need to do


and for each new list one would need to edit this script, not a flexible idea!
nikosman88  
#7 Posted : Saturday, August 12, 2023 4:55:49 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 113 times
Was thanked: 52 time(s) in 49 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post


Yes one can use your script https://forums.vmix.com/...another-input#post102595
to check the 4 videos and do what need to do


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
doggy  
#8 Posted : Saturday, August 12, 2023 5:49:54 AM(UTC)
doggy

Rank: Advanced Member

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

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

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
thanks 2 users thanked doggy for this useful post.
nikosman88 on 8/12/2023(UTC), Peter1000 on 8/12/2023(UTC)
nikosman88  
#9 Posted : Saturday, August 12, 2023 6:18:12 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 113 times
Was thanked: 52 time(s) in 49 post(s)
As always you are the master in vmix scripting!
doggy  
#10 Posted : Saturday, August 12, 2023 4:50:26 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: nikosman88 Go to Quoted Post
As always you are the master in vmix scripting!


Nah, just used ChatGPT (or whatever its called) ;-)
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.