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
Clint Cruz  
#1 Posted : Monday, January 4, 2021 6:40:12 AM(UTC)
Clint Cruz

Rank: Member

Groups: Registered
Joined: 4/24/2020(UTC)
Posts: 10
United States
Location: Garden Grove

Thanks: 3 times
Hello,

could anyone help me be able to write a script that would let me capture a screenshot of each of my video inputs for example (Input Numbers 5-10)?

i have four live shots for example that i want to take a screenshot of them at same timing. could anyone please help? greatly appreciated.
doggy  
#2 Posted : Monday, January 4, 2021 7:00:20 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Why a script when a multiple (combined) shortcut will do that (SnapshotInput)?

Btw they wont be exactly at the same time (shortcuts or script) as each instruction takes some tie even if it's minimal

input 5-10 does not equates 4 four live shots ;-)


Help to be able to write a script:
- Read the helpfiles
- check the "scripting for dummies" post
- script functions contain the same elements as a shortcut (hint)
- just write x lines with the same function but different input specified in your script
- run script
mark2020  
#3 Posted : Saturday, February 13, 2021 11:02:17 AM(UTC)
mark2020

Rank: Advanced Member

Groups: Registered
Joined: 12/11/2020(UTC)
Posts: 31

Thanks: 4 times
Originally Posted by: doggy Go to Quoted Post
Why a script when a multiple (combined) shortcut will do that (SnapshotInput)?

Btw they wont be exactly at the same time (shortcuts or script) as each instruction takes some tie even if it's minimal

input 5-10 does not equates 4 four live shots ;-)


Help to be able to write a script:
- Read the helpfiles
- check the "scripting for dummies" post
- script functions contain the same elements as a shortcut (hint)
- just write x lines with the same function but different input specified in your script
- run script


I appreciate the reply but haven't seen anything from the OP, so was wondering if you might be able to enlighten people in a bit more on this.

I tried my hand at a script that would automatically:
-take a screenshot of *one* input
-name it currentcap.png (automatically, with no dialog, which I apparently couldn't get the syntax right)
-replace the source on input XX with the clip (or create it as input XX and delete XX+1 to keep things in order)

I'm on the fence about the version that allows scripting and time is a factor; might you be able to assist with a shortcut-based option? Or Companion has been useful for workarounds in the past.
doggy  
#4 Posted : Saturday, February 13, 2021 5:10:54 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mark2020 Go to Quoted Post
I appreciate the reply but haven't seen anything from the OP, so was wondering if you might be able to enlighten people in a bit more on this.


I often wonder why one is posting in the first place ;-)


Quote:

I tried my hand at a script that would automatically:
-take a screenshot of *one* input
-name it currentcap.png (automatically, with no dialog, which I apparently couldn't get the syntax right)
-replace the source on input XX with the clip (or create it as input XX and delete XX+1 to keep things in order)

I'm on the fence about the version that allows scripting and time is a factor; might you be able to assist with a shortcut-based option? Or Companion has been useful for workarounds in the past.


Scripting is available in the 4k and pro licenses!
External scripts are also possible (as done before vMix scripting was available or still done)

what you want to do can be done with shortcuts alone as you describe it :

Snapshot or SnapshotInput and value is the location and filename to save to
AddInput specify input type and filename
RemoveInput removes a specific input
MoveInput moves specific input to specific place
SetInputName if you want to change the name being displayed

need to be aware that shome shortcuts take a bit of time meaning you can't execute them too quickly on after the other , script can add pause
thanks 1 user thanked doggy for this useful post.
mark2020 on 2/13/2021(UTC)
mark2020  
#5 Posted : Saturday, February 13, 2021 9:08:24 PM(UTC)
mark2020

Rank: Advanced Member

Groups: Registered
Joined: 12/11/2020(UTC)
Posts: 31

Thanks: 4 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mark2020 Go to Quoted Post
I appreciate the reply but haven't seen anything from the OP, so was wondering if you might be able to enlighten people in a bit more on this.


I often wonder why one is posting in the first place ;-)


Quote:

I tried my hand at a script that would automatically:
-take a screenshot of *one* input
-name it currentcap.png (automatically, with no dialog, which I apparently couldn't get the syntax right)
-replace the source on input XX with the clip (or create it as input XX and delete XX+1 to keep things in order)

I'm on the fence about the version that allows scripting and time is a factor; might you be able to assist with a shortcut-based option? Or Companion has been useful for workarounds in the past.


Scripting is available in the 4k and pro licenses!
External scripts are also possible (as done before vMix scripting was available or still done)

what you want to do can be done with shortcuts alone as you describe it :

Snapshot or SnapshotInput and value is the location and filename to save to
AddInput specify input type and filename
RemoveInput removes a specific input
MoveInput moves specific input to specific place
SetInputName if you want to change the name being displayed

need to be aware that shome shortcuts take a bit of time meaning you can't execute them too quickly on after the other , script can add pause


Thank you much! I forgot the key final steps, lol - adding the new screenshot into a multiview and previewing it, but I've been using those plenty enough to be familiar. I use MoveInput to cycle media and scenes, but in this case I settled for deleting the last input and the still just re-populates that slot.

In total it's 5 commands in Companion - 3 shortcuts and two direct commands. Snapshot, Add and RemoveInput weren't immediately obvious options. But it works as intended!

P.S. I meant scripting being in the top option that's remotely in my budget, contracts permitting. :) I'll have to look into external scripts when time permits.
doggy  
#6 Posted : Saturday, February 13, 2021 9:31:59 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: mark2020 Go to Quoted Post
I'll have to look into external scripts when time permits.


vMix scripting is basically a more simplified way of making the exact same script in visual studio ( vb.net) with a few added vMix specific related functions
vMix scripting does not allow for added functionscalls or subs etc within and vMix specific functions might need to be replaced by httpfunctions or so ..... ( of course one is not limited to coding in vb.net ;-) )
Clint Cruz  
#7 Posted : Saturday, March 6, 2021 5:59:12 PM(UTC)
Clint Cruz

Rank: Member

Groups: Registered
Joined: 4/24/2020(UTC)
Posts: 10
United States
Location: Garden Grove

Thanks: 3 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: mark2020 Go to Quoted Post
I'll have to look into external scripts when time permits.


vMix scripting is basically a more simplified way of making the exact same script in visual studio ( vb.net) with a few added vMix specific related functions
vMix scripting does not allow for added functionscalls or subs etc within and vMix specific functions might need to be replaced by httpfunctions or so ..... ( of course one is not limited to coding in vb.net ;-) )



sorry to ask for help again... thanks in advance.

when i used the shortcut i cloned it 5 times to take a snapshot of each liveinput i wanted... but when i check the directory where im saving it, it would only take one snapshot. i think i want to revist the idea of scripting beacuse you can delay (pause) a certain amount of time before you can do the next instruction. can you take a look at this instruction and see what im doing wrong?
i want to use snapshotinput because i can choose the input i want to take a snapshot of.


function=snapshotinput&input=11, d:\savedsnapshots\{0:dd MMM yyyy- hh-mm-ss tt}.png

sleep 1400

function=snapshotinput&input=12, d:\savedsnapshots\{0:dd MMM yyyy- hh-mm-ss tt}.png

sleep 1400

function=snapshotinput&input=13, d:\savedsnapshots\{0:dd MMM yyyy- hh-mm-ss tt}.png

sleep 1400


doggy  
#8 Posted : Saturday, March 6, 2021 6:50:11 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Clint Cruz Go to Quoted Post


sorry to ask for help again... thanks in advance.



There you are, nice to see you back

better go with vb.net scripting ( seems SnapShotInput has a little issue otherwise)
and give them a different name to ( not just the time code)

Code:
API.Function("SnapshotInput",Input:="31",Value:="d:\test31{0:dd MMM yyyy- hh-mm-ss tt}.png")
sleep (200)
API.Function("SnapshotInput",Input:="34",Value:="d:\test34{0:dd MMM yyyy- hh-mm-ss tt}.png")
thanks 1 user thanked doggy for this useful post.
Clint Cruz on 3/7/2021(UTC)
Clint Cruz  
#9 Posted : Sunday, March 7, 2021 1:54:51 AM(UTC)
Clint Cruz

Rank: Member

Groups: Registered
Joined: 4/24/2020(UTC)
Posts: 10
United States
Location: Garden Grove

Thanks: 3 times
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Clint Cruz Go to Quoted Post


sorry to ask for help again... thanks in advance.



There you are, nice to see you back

better go with vb.net scripting ( seems SnapShotInput has a little issue otherwise)
and give them a different name to ( not just the time code)

Code:
API.Function("SnapshotInput",Input:="31",Value:="d:\test31{0:dd MMM yyyy- hh-mm-ss tt}.png")
sleep (200)
API.Function("SnapshotInput",Input:="34",Value:="d:\test34{0:dd MMM yyyy- hh-mm-ss tt}.png")


Works Perfectly!!! what i also did was i moved the filename "Test31" after the timestamp, that way it was controlled by the time rather than the file name. thanks so much!!!
doggy  
#10 Posted : Sunday, March 7, 2021 2:29:04 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Clint Cruz Go to Quoted Post
what i also did was i moved the filename "Test31" after the timestamp, that way it was controlled by the time rather than the file name. thanks so much!!!


Whatever works for you :-)

gre2gor  
#11 Posted : Sunday, March 7, 2021 2:48:52 PM(UTC)
gre2gor

Rank: Advanced Member

Groups: Registered
Joined: 12/14/2018(UTC)
Posts: 81
Slovenia

Was thanked: 17 time(s) in 6 post(s)
How would you use value from database or field on that input that you want to run screenshot script?
Lets say I want to create title images (thumbnails) for YouTube. I do it already with GT Title and database values and manual "Snapshot command". But I have to put filename manually. If I could do it with a script I could create multiple snapshots and save time :D
doggy  
#12 Posted : Sunday, March 7, 2021 2:57:29 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 293 times
Was thanked: 955 time(s) in 790 post(s)
Pull data for a filename from a title input fed by a datasource.

Check scripting for dummies post for how to pull data from a title input.
Users browsing this topic
Guest (4)
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.