Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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
|
|
|
|
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)
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 556
Thanks: 62 times Was thanked: 130 time(s) in 118 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.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 556
Thanks: 62 times Was thanked: 130 time(s) in 118 post(s)
|
The function is AudioAutoOff
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 2/23/2019(UTC) Posts: 556
Thanks: 62 times Was thanked: 130 time(s) in 118 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-20Keep it up!
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 Thanks: 2 times Was thanked: 1 time(s) in 1 post(s)
|
OK I figured it out using the editor. Thanks!
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,225 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,225 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 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
|
|
|
|
Rank: Member
Groups: Registered
Joined: 4/11/2020(UTC) Posts: 17 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
|
1 user thanked Sdepace for this useful post.
|
|
|
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