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
mjgraves  
#1 Posted : Friday, June 1, 2018 6:31:52 PM(UTC)
mjgraves

Rank: Advanced Member

Groups: Registered
Joined: 7/1/2015(UTC)
Posts: 1,151
Man
United States
Location: Houston TX

Thanks: 319 times
Was thanked: 263 time(s) in 233 post(s)
Some time ago I was quite handy with VB & VBscript. Thinking about trying to scripting in vMix. Before I can do that I need to upgrade to a 4K or Pro license.

Until then, I see in the docs a list of macro functions. Things that I can do, but no way to query the status of something.

Would some have an example of how to query an input to see if the audio is active?

Thanks.
DWAM  
#2 Posted : Saturday, June 2, 2018 3:55:43 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
Hi Michael

Alternatively you can do this with vMix UTC, even without 4K or Pro licence. Since a few months UTC handles "conditions" for command execution. I believe it's possible to analyse when 2 audio inputs are active at the same time in order to switch to CAM3 and it's also possible to use a delay before execution in order to prevent from inappropriate switching (such as a cough, a laugh or just an occasional noise coming from one of the audio inputs)

Another solution I can think of for this use case I saw on FB is to use Triggers on inputs. Triggers can call a script on conditions. If the script only does the case analysis for action to take, this solves your issue of querying the status.

I never tried this, as it's the opposite of what I use vMix for -being a director, I don't want vMix to do my job - but these are 2 solutions I would work on if I had to do it.

Keep us posted
Guillaume

PS : I think it'd be easier to consider CAM3 (wide angle) as the default, and only switch to individual shots when sure only 1 audio is active... My 2 cts...
DWAM  
#3 Posted : Saturday, June 2, 2018 4:06:36 AM(UTC)
DWAM

Rank: Advanced Member

Groups: Registered
Joined: 3/20/2014(UTC)
Posts: 2,721
Man
France
Location: Bordeaux, France

Thanks: 243 times
Was thanked: 794 time(s) in 589 post(s)
I just read another post about writing your own VST3 plugin
https://forums.vmix.com/...aspx?g=posts&t=15902

This is obviously another lead for your request. Don't think that this particular software to write VST3 can do it, but a VST3 plugin that would allow to analyse audio inputs with conditions and for each condition the ability trigger a switching choice is definitely a path to explore. With a GUI...

Have fun!
Guillaume
mjgraves  
#4 Posted : Saturday, June 2, 2018 11:00:07 AM(UTC)
mjgraves

Rank: Advanced Member

Groups: Registered
Joined: 7/1/2015(UTC)
Posts: 1,151
Man
United States
Location: Houston TX

Thanks: 319 times
Was thanked: 263 time(s) in 233 post(s)
Select shot based on audio makes a certain amount of sense to me. It might be used to follow action around a course/track.

Emulating a video conference system seems a little misguided. I'd prefer to just use a VC system, and bring it into vMix as a source. of course, my background include lots of telecom/VC as well as broadcast.
sinc747  
#5 Posted : Saturday, June 16, 2018 12:27:07 PM(UTC)
sinc747

Rank: Advanced Member

Groups: Registered
Joined: 8/2/2013(UTC)
Posts: 1,072
Man
United States
Location: Fairhope, Alabama USA

Thanks: 553 times
Was thanked: 200 time(s) in 166 post(s)
So, to Michael's original question...

"Would some have an example of how to query an input to see if the audio is active?"

- Tom
desmar  
#6 Posted : Saturday, June 16, 2018 6:56:24 PM(UTC)
desmar

Rank: Advanced Member

Groups: Registered
Joined: 8/21/2015(UTC)
Posts: 324
Man
Canada
Location: Cornwall, Ontario, Canada

Thanks: 18 times
Was thanked: 80 time(s) in 60 post(s)
if you send a http://127.0.0.1:8088/api/? vMix will a return with the some of the following.

Version of vMix
Edition of VMix
Which input is loaded and Status and Information of Input
Which Overlay is loaded and Status and Information of Input
Which input is set to Preview and Status and Information of Input
Which input is set to Output and Status and Information of Input
Audio levels ...
etc...

eg.

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<vmix>
<version>21.0.0.45</version>
<edition>Basic HD</edition>
<inputs>
<input key="8065cdca-d64b-4813-a75f-122e6f27d164" number="1" type="Xaml" title="NewsHD2.xaml" state="Paused" position="0" duration="0" loop="False" selectedIndex="0">
NewsHD2.xaml
<text index="0" name="Headline">HEADLINE</text>
<text index="1" name="Description">DESCRIPTION</text>
<text index="2" name="TitleTime">{0:hh:mm tt}</text>
<image index="0" name="BackgroundImage">
file:///C:/Program Files (x86)/vMix/titles/NewsHD2.xaml.png
</image>
</input>
<input key="fb3e17a7-a077-4ef9-8efa-06277a13c1e2" number="2" type="Blank" title="Blank" state="Paused" position="0" duration="0" loop="False">Blank</input>
</inputs>
<overlays>
<overlay number="1"/>
<overlay number="2"/>
<overlay number="3"/>
<overlay number="4"/>
<overlay number="5"/>
<overlay number="6"/>
</overlays>
<preview>2</preview>
<active>1</active>
<fadeToBlack>False</fadeToBlack>
<transitions>
<transition number="1" effect="Fade" duration="500"/>
<transition number="2" effect="Merge" duration="1000"/>
<transition number="3" effect="Wipe" duration="1000"/>
<transition number="4" effect="Stinger2" duration="1000"/>
</transitions>
<recording>False</recording>
<external>False</external>
<streaming>False</streaming>
<playList>False</playList>
<multiCorder>False</multiCorder>
<fullscreen>False</fullscreen>
<audio>
<master volume="100" muted="False" meterF1="0" meterF2="0" headphonesVolume="100"/>
<busA volume="100" muted="True" meterF1="0" meterF2="0"/>
<busB volume="100" muted="False" meterF1="0" meterF2="0"/>
</audio>
</vmix>

So yes, it would be possible to write a VB.NET to parse the information returned from the HTTP API. and send API commands to vMix in return.. There might be another way to do it directly in the vMixAPI.dll, vMixTitleLibrary.dll, vMixInterop.dll and other .dll's also..

I was just starting to learn Visual Studio and the various languages after a 30 year break from programming, but due to my new job driving trucks and being on the road 6 days a week, I no longer have time to try and write applications

sinc747 wrote:
So, to Michael's original question...

"Would some have an example of how to query an input to see if the audio is active?"

- Tom

Users browsing this topic
Guest (3)
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.