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
Sdepace  
#1 Posted : Saturday, April 11, 2020 1:41:22 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I've made a script mapped to a shortcut using the AddInput function, allowing me to import an edited video with a preset name. Is there any way to automatically uncheck the "automatically mix audio" and uncheck the "automatically pause after transition" or do I have to do it manually everytime?

Thanks
krassesPferd  
#2 Posted : Saturday, April 11, 2020 2:11:30 AM(UTC)
krassesPferd

Rank: Advanced Member

Groups: Registered
Joined: 11/9/2013(UTC)
Posts: 78
Location: Berlin

Thanks: 8 times
Was thanked: 8 time(s) in 7 post(s)
You can set the behavior for new added inputs in vMix global settings.

https://www.vmix.com/hel...m?StreamingSettings.html
dmwkr  
#3 Posted : Saturday, April 11, 2020 2:15:59 AM(UTC)
dmwkr

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2019(UTC)
Posts: 517

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
Try to add the AudioAutoOff and AutoPauseOff functions to your script.

In the vMix settings there is also the option to change the default setting for the pause.
Sdepace  
#4 Posted : Saturday, April 11, 2020 4:43:26 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Thanks I changed the pause setting, however I still want "auto mix audio on" in audio settings. What would the script function for turning off the auto mix be, so that I could turn it off just for that clip?

Thanks
dmwkr  
#5 Posted : Saturday, April 11, 2020 5:01:47 AM(UTC)
dmwkr

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2019(UTC)
Posts: 517

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
The function is AudioAutoOff
Sdepace  
#6 Posted : Saturday, April 11, 2020 5:08:51 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Thanks for your help, although I still can't get it to work. Very new to scripting! Here's what I have, which imports the video but with Auto mix still turned on.

Function=AddInput&Value=Video|X:\TO VMIX\Edit1.mov
Function=AudioAutoOff

Am I missing something?
dmwkr  
#7 Posted : Saturday, April 11, 2020 5:44:36 AM(UTC)
dmwkr

Rank: Advanced Member

Groups: Registered
Joined: 2/23/2019(UTC)
Posts: 517

Thanks: 62 times
Was thanked: 119 time(s) in 108 post(s)
You have to specify the input, and before wait a second or two until the input is loaded.

Function=AddInput&Value=Video|X:\TO VMIX\Edit1.mov
Sleep 2000
Function=AudioAutoOff&Value=Edit1.mov

Congrats on starting with scripting! I'm also still in the early stages, learning and it is fun, and helpful.

There's a great tool by Richard to build scripts and learn:

https://forums.vmix.com/...r-App---Updated-02-24-20

Keep it up!
Sdepace  
#8 Posted : Saturday, April 11, 2020 6:09:36 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Thanks but still not working. I was able to another shortcut which does the AudioAutoOff function and that works but not ideal.
Sdepace  
#9 Posted : Saturday, April 11, 2020 6:33:07 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
OK I figured it out using the editor. Thanks!
Sdepace  
#10 Posted : Tuesday, April 14, 2020 1:12:41 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
OK next question, same subject from a newbie scriptbuilder. Throughout our show we have videos that an editor posts and I import into VMIX. I previously as per forum above, set up three scripts to import the edits named Edit 1, Edit 2 and Edit 3 with the desired audio settings. It seems that there will be additional edits moving forward, so I wondered if there was a better way to do it.

Is there a way where any new edit in a watch folder would automatically import into VMIX with the correct playback settings? Or perhaps If I manually drag in the edits as new inputs, is there a way to have one script change the playback settings (AudioOn and AudioAutoOff) for the last input or previewed input? Would that be some sort of Dynamic input?

I really appreciate any help on this.
doggy  
#11 Posted : Tuesday, April 14, 2020 1:40:04 AM(UTC)
doggy

Rank: Advanced Member

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

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

Is there a way where any new edit in a watch folder would automatically import into VMIX


this could give some ideas

https://www.vmix.com/kno...ding-to-vmix-as-an-input

thanks 1 user thanked doggy for this useful post.
Sdepace on 4/14/2020(UTC)
Sdepace  
#12 Posted : Tuesday, April 14, 2020 2:43:58 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Thanks. That helps. So I took that and it works, but I'm having trouble adding the AudioAutoOff and AudioOn. I guess I'm not sure how to write the code in VB.net scripting, only web scripting. I got it to work, but only when I know the specific input number. Here is what I have:

Dim szExt As String = ".mov"
Dim szFolder As String ="X:\TO VMIX"
Dim szLatestFile As String = ""
Dim dLatestFile As Date = Nothing
For Each szFile As String In System.IO.Directory.GetFiles(szFolder)
Dim fi As New System.IO.FileInfo(szFile)
If fi.Extension = szExt Then
If fi.LastWriteTime > dLatestFile Then
szLatestFile = szFile
dLatestFile = fi.LastWriteTime
End If
End If
Next
If System.IO.File.Exists(szLatestFile) Then
API.Function("AddInput", Value:="Video|" & szLatestFile)
Sleep(2000)
API.Function("AudioAutoOff", Input:=62)
API.Function("AudioOn", Input:=62)

End If

Any ideas how to complete this script?

Thanks
doggy  
#13 Posted : Tuesday, April 14, 2020 3:02:37 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 284 times
Was thanked: 920 time(s) in 759 post(s)
Just a though.

think you might need to add some logic the search for the added input from the API xml to get the input number or so ?

Overall with all the things you want done it might be better to have an external script as invMix scripts do not allow for subroutines and internal functions etc

From there its much easier to give vMix instructions with httprequests

as said just a thought
Sdepace  
#14 Posted : Tuesday, April 14, 2020 3:52:23 AM(UTC)
Sdepace

Rank: Member

Groups: Registered
Joined: 4/11/2020(UTC)
Posts: 17
United States

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
OK with my son's help, we figured it out! Thanks for your help as well.

If interested, here's the code to import the latest video with AudioAutoOff and AudioOn:

Dim szExt As String = ".mov"
Dim szFolder As String ="X:\TO VMIX"
Dim szLatestFile As String = ""
Dim dLatestFile As Date = Nothing
For Each szFile As String In System.IO.Directory.GetFiles(szFolder)
Dim fi As New System.IO.FileInfo(szFile)
If fi.Extension = szExt Then
If fi.LastWriteTime > dLatestFile Then
szLatestFile = szFile
dLatestFile = fi.LastWriteTime
End If
End If
Next
If System.IO.File.Exists(szLatestFile) Then
API.Function("AddInput", Value:="Video|" & szLatestFile)
Sleep(500)
Console.WriteLine(szLatestFile.substring(11))
Input.Find(szLatestFile.substring(11)).Function("AudioAutoOff")
Input.Find(szLatestFile.substring(11)).Function("AudioOn")
'API.Function("AudioAutoOff", Input:=62)
'API.Function("AudioOn", Input:=62)

End If
thanks 1 user thanked Sdepace for this useful post.
Ario on 1/6/2023(UTC)
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.