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
NTSC  
#1 Posted : Sunday, May 3, 2020 10:30:16 AM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Is there a way to set up a trigger to perform an action at a specific time as a video played back during air?

I don't want to perform the action at the end of playback but rather at a specific time. .
doggy  
#2 Posted : Sunday, May 3, 2020 10:48:00 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Scripting will be in order

see "scripting for dummies post" , there is a script in there to do just that
NTSC  
#3 Posted : Sunday, May 3, 2020 12:27:54 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: doggy Go to Quoted Post
Scripting will be in order

see "scripting for dummies post" , there is a script in there to do just that


Thx. I read that and the scripting documentation.

It did not pop to me how it works or what variables I need to edit. I'll keep looking.
doggy  
#4 Posted : Sunday, May 3, 2020 7:31:59 PM(UTC)
doggy

Rank: Advanced Member

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

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


Thx. I read that and the scripting documentation.

It did not pop to me how it works or what variables I need to edit. I'll keep looking.


all you need to do is change the API.Function "action" ( any that is available also as shortcut) to whatever you want it to do when then

https://forums.vmix.com/...ng-for-Dummies#post71985
thanks 1 user thanked doggy for this useful post.
stigaard on 5/4/2020(UTC)
richardgatarski  
#5 Posted : Sunday, May 3, 2020 7:45:49 PM(UTC)
richardgatarski

Rank: Advanced Member

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

Thanks: 138 times
Was thanked: 292 time(s) in 246 post(s)
Depending on how many triggers you have for the video, you can delay the trigger to the point in the video to when you want it to kick in.
NTSC  
#6 Posted : Monday, May 4, 2020 12:38:09 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Thanks. I just have one action. I want cut away from the video at :45 in.
NTSC  
#7 Posted : Monday, May 4, 2020 12:51:25 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Just took the sample that Doggy wrote, and edited it so that with 40 seconds left in my video, it does a fly rotate to the preview.

It did not work :(

************************************************

' Checking time left of active input
' and do some stuff at certain time remaining

dim position as string = ""
dim duration as string = ""
dim activeinput as string = ""
dim Timeleft as double = 0
dim triggertime as integer = 40000 '40 seconds before end
dim triggerduration as integer = 500 'fade duration, could be different than trigger

do while true

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

activeinput = (x.SelectSingleNode("//active").InnerText)
duration = (x.SelectSingleNode("//input[@number='"& activeinput &"']/@duration").Value)
position = (x.SelectSingleNode("//input[@number='"& activeinput &"']/@position").Value)

Timeleft= Double.Parse(duration)-Double.Parse(position)

if Timeleft < triggertime

API.Function("FlyRotate",Input:=activeinput.tostring(),Value:="0," & triggerduration.tostring())
' do whatever one wants to do

end if

sleep(500)
Loop
******************************
doggy  
#8 Posted : Monday, May 4, 2020 5:41:53 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Code:
if Timeleft < triggertime  

  API.Function("FlyRotate",Input:="name or nr input to fly in")
  sleep(1000)
 
end if
thanks 1 user thanked doggy for this useful post.
stigaard on 5/4/2020(UTC)
admin  
#9 Posted : Monday, May 4, 2020 6:07:43 PM(UTC)
admin

Rank: Administration

Groups: Administrators
Joined: 1/13/2010(UTC)
Posts: 5,161
Man
Location: Gold Coast, Australia

Was thanked: 4166 time(s) in 1497 post(s)
Input.Preview.Function("FlyRotate") is what you need.
thanks 2 users thanked admin for this useful post.
stigaard on 5/4/2020(UTC), doggy on 5/4/2020(UTC)
doggy  
#10 Posted : Monday, May 4, 2020 6:11:19 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: admin Go to Quoted Post
Input.Preview.Function("FlyRotate") is what you need.


Thanks, ignore my mail about API.Function("FlyRotate",Input:="Preview") not working ;-)





NTSC  
#11 Posted : Tuesday, May 5, 2020 1:05:01 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Thanks! That worked perfectly - but now it keeps looping - I see at the end a LOOP command. How can I get a full stop in there?
doggy  
#12 Posted : Thursday, May 7, 2020 4:22:51 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Originally Posted by: NTSC Go to Quoted Post
Thanks! That worked perfectly - but now it keeps looping - I see at the end a LOOP command. How can I get a full stop in there?


Exit

NTSC  
#13 Posted : Thursday, May 7, 2020 7:30:17 AM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Thanks doggy
KnKproductions  
#14 Posted : Tuesday, May 12, 2020 1:37:45 PM(UTC)
KnKproductions

Rank: Advanced Member

Groups: Registered
Joined: 4/6/2019(UTC)
Posts: 95
United States
Location: Florida

Thanks: 10 times
Was thanked: 13 time(s) in 11 post(s)
Change the mark-out point on the video, set a trigger to do something at the completion of the video. No real need to mess with scripting.
NTSC  
#15 Posted : Tuesday, May 12, 2020 1:39:22 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Right...except I want the music from the video to be playing under my production after I cut away from it.
KnKproductions  
#16 Posted : Tuesday, May 12, 2020 1:51:48 PM(UTC)
KnKproductions

Rank: Advanced Member

Groups: Registered
Joined: 4/6/2019(UTC)
Posts: 95
United States
Location: Florida

Thanks: 10 times
Was thanked: 13 time(s) in 11 post(s)
Originally Posted by: NTSC Go to Quoted Post
Right...except I want the music from the video to be playing under my production after I cut away from it.


ah.. two actions then :)

I do the same thing on an intro video, but instead of playing the embedded audio I load it as an audio file in vmix and marry the two with a trigger. When the video goes to output it plays, and simultaneously triggers the accompanying audio file (music). Once the video is done, it's triggered to fade to another input and the audio file keeps playing separately with no interruptions. Then I fade out the music on the midi controller.

example:


That way of doing it gives a lot of control on the fly
NTSC  
#17 Posted : Tuesday, May 12, 2020 2:17:39 PM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Yea, I considered trying that. You've inspired me to give it a try.

Thanks.
KnKproductions  
#18 Posted : Wednesday, May 13, 2020 12:25:34 AM(UTC)
KnKproductions

Rank: Advanced Member

Groups: Registered
Joined: 4/6/2019(UTC)
Posts: 95
United States
Location: Florida

Thanks: 10 times
Was thanked: 13 time(s) in 11 post(s)
Originally Posted by: NTSC Go to Quoted Post
Yea, I considered trying that. You've inspired me to give it a try.

Thanks.


I think you'll find it's quite easy, maybe the only hard part is getting the audio file by itself. I was 'lucky' that the intro music was a normal song that was available on amazon music.

Might be helpful to include some reset triggers so that when the video transitions out, it automatically resets to the mark-in position. Same with the audio file... fading it out and letting it finish, then it does its own trigger to reset upon completion. This way, if you play the video/audio sequence again later on, it will be ready. After I had forgotten to restart the audio after a test run, I decided to add that trigger. Nice little failsafe.

If you need any help separating the audio I can do it in a few minutes, just send a download link to the video.
NTSC  
#19 Posted : Wednesday, May 13, 2020 1:42:32 AM(UTC)
NTSC

Rank: Advanced Member

Groups: Registered
Joined: 5/3/2020(UTC)
Posts: 35
United States

Was thanked: 1 time(s) in 1 post(s)
Thanks for the offer. I should be ok! Thank you so much for your help.
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.