logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

26 Pages«<1718192021>»
Options
Go to last post Go to first unread
doggy  
#361 Posted : Saturday, February 11, 2023 9:34:59 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: nikosman88 Go to Quoted Post


Ok im not script guru so i am trying to combine things from "here" and "there".. Try not to laugh :p with my logic i do the things
At first i add
dim markout as string = ""
then i add the line that reads markout as first line after activeinput and the script doesnt start. it says object line error. Then i put this line after position line and script start but not work. Then i tried Timeleft= Double.Parse(duration)-Double.Parse(position) to change to Timeleft= Double.Parse(duration)-Double.Parse(markout) or Timeleft= Double.Parse(position)-Double.Parse(markout) some combinations here,dont work
Then i see to xml manually the total time of video (that of course will need to change every time because not all videos are have to be split for example 30minutes exactly) so for the specific video that said markout=1900340 and i wanted to do the "script thing" 8sec before it reaches the markout point to change the triggertime. As value in triggertime i tried to do some mathematical actions and put the result actual duration - markout duration -8sec.. Of course it didnt work and if i have for every video that i need something to do before it ends,to take the calculator, i prefer to do edit real editing in premiere. That`s the way i tried and search..


Why not check on "state" instead of trying calculations etc ;-) (or use a trigger oncompletion instead of a script)
if you want to use it in a script check on status running or completed , or trigger to call a script.

KISS

PS original script is fr doing an action BEFORE a certain position is reached

Quote:
i am trying to combine things from "here" and "there".

Best is to stay away from scripting then. Is better to learn than throwing things to a wall and see what sticks
doggy  
#362 Posted : Saturday, February 11, 2023 10:43:06 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: doggy Go to Quoted Post
From a recent request/discussion to trigger something BEFORE a video finishes


Code:
' 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 = 2000       '2 seconds before end
dim triggerduration as integer = 2000   '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("SetVolumeFade",Input:=activeinput.tostring(),Value:="0," & triggerduration.tostring())
  ' do whatever one wants to do 

end if

sleep(500)
Loop


Adjusted for using MarkOut points

Screenshot 2023-02-11 133611.jpg (95kb) downloaded 4 time(s).



thanks 1 user thanked doggy for this useful post.
nikosman88 on 2/11/2023(UTC)
nikosman88  
#363 Posted : Saturday, February 11, 2023 10:44:00 PM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Edit
Your "markout" script work perfect!!! Thank you very much.
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: nikosman88 Go to Quoted Post


Ok im not script guru so i am trying to combine things from "here" and "there".. Try not to laugh :p with my logic i do the things
At first i add
dim markout as string = ""
then i add the line that reads markout as first line after activeinput and the script doesnt start. it says object line error. Then i put this line after position line and script start but not work. Then i tried Timeleft= Double.Parse(duration)-Double.Parse(position) to change to Timeleft= Double.Parse(duration)-Double.Parse(markout) or Timeleft= Double.Parse(position)-Double.Parse(markout) some combinations here,dont work
Then i see to xml manually the total time of video (that of course will need to change every time because not all videos are have to be split for example 30minutes exactly) so for the specific video that said markout=1900340 and i wanted to do the "script thing" 8sec before it reaches the markout point to change the triggertime. As value in triggertime i tried to do some mathematical actions and put the result actual duration - markout duration -8sec.. Of course it didnt work and if i have for every video that i need something to do before it ends,to take the calculator, i prefer to do edit real editing in premiere. That`s the way i tried and search..


Why not check on "state" instead of trying calculations etc ;-) (or use a trigger oncompletion instead of a script)
if you want to use it in a script check on status running or completed , or trigger to call a script.

KISS

PS original script is fr doing an action BEFORE a certain position is reached

Quote:
i am trying to combine things from "here" and "there".

Best is to stay away from scripting then. Is better to learn than throwing things to a wall and see what sticks

on state or on completion will not work because it says either "running" or "paused". And i want to do something before video ends. Anyway your script is what i wanted and thank you again. Yes i try to learn but i dont have the time or the way to learn everything in vb.net. But im trying to learn and if i know something i will help to this forum because this forum helps me. For example 2 scripts i made myself after searching how
https://forums.vmix.com/...-List-Restart#post106220 and https://forums.vmix.com/...77-Text-files#post106377 simple scripts but for me it took much time to understand how it will work
bilalesb  
#364 Posted : Saturday, February 25, 2023 11:28:44 PM(UTC)
bilalesb

Rank: Newbie

Groups: Registered
Joined: 12/16/2022(UTC)
Posts: 4
Algeria
Location: Batna

Hello please i need help
live bloomberg ticker like this
like this
doggy  
#365 Posted : Sunday, February 26, 2023 1:04:33 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: bilalesb Go to Quoted Post
Hello please i need help
live bloomberg ticker like this
like this


This is nothing to do with scripting but with GT titles'\A static image does not tell us much regarding the ticker specifics.
Please do an effort to explain/show what exactly your goal is in a proper post/forum
bilalesb  
#366 Posted : Monday, February 27, 2023 1:56:44 AM(UTC)
bilalesb

Rank: Newbie

Groups: Registered
Joined: 12/16/2022(UTC)
Posts: 4
Algeria
Location: Batna

Originally Posted by: doggy Go to Quoted Post
Originally Posted by: bilalesb Go to Quoted Post
Hello please i need help
live bloomberg ticker like this
like this


This is nothing to do with scripting but with GT titles'\A static image does not tell us much regarding the ticker specifics.
Please do an effort to explain/show what exactly your goal is in a proper post/forum

this live

take a look i need help to make ticker of bloomberg
doggy  
#367 Posted : Monday, February 27, 2023 3:46:41 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: bilalesb Go to Quoted Post

take a look i need help to make ticker of bloomberg


Again this is in the wrong forum and post , please post GT title related questions here https://forums.vmix.com/topics/12-GT
gpdipalmerahtimur  
#368 Posted : Monday, February 27, 2023 12:14:22 PM(UTC)
gpdipalmerahtimur

Rank: Advanced Member

Groups: Registered
Joined: 6/5/2020(UTC)
Posts: 91
Indonesia
Location: Jakarta

Thanks: 17 times
Was thanked: 5 time(s) in 3 post(s)
Hi,

Is it possible to know when a SRT Client is Connected via Script? The background is to display LARIX QR Code when there is no Client Connected and Removes it once Connection Established.

Thanks in advance.
nikosman88  
#369 Posted : Tuesday, February 28, 2023 6:14:54 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Originally Posted by: gpdipalmerahtimur Go to Quoted Post
Hi,

Is it possible to know when a SRT Client is Connected via Script? The background is to display LARIX QR Code when there is no Client Connected and Removes it once Connection Established.

Thanks in advance.

Hello. A way to do this is if your srt input when connected has audio. If yes, you can check api xml to see if audio is coming or not and then do what you want to do. A script to do this is, can be like that
Code:

Do while true
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
'set the name of your input
dim AU = (x.SelectSingleNode("//input[@shortTitle='nameyourinputorinputkey']/@meterF1").Value)
'check audio of this input'
If AU > 0 Then
'do whatever you want to do'
ElseIf AU = 0 Then
End if
loop


gpdipalmerahtimur  
#370 Posted : Friday, March 3, 2023 3:22:49 PM(UTC)
gpdipalmerahtimur

Rank: Advanced Member

Groups: Registered
Joined: 6/5/2020(UTC)
Posts: 91
Indonesia
Location: Jakarta

Thanks: 17 times
Was thanked: 5 time(s) in 3 post(s)
Hi nikosman88,

Thanks for your help, unfortunately we have flaw on that approach, if Cameraman decided to mute LARIX on his Phone then the action will be triggered falsely.
Huaba  
#371 Posted : Thursday, March 23, 2023 8:23:30 AM(UTC)
Huaba

Rank: Member

Groups: Registered
Joined: 1/12/2021(UTC)
Posts: 12
Germany
Location: Rosenheim

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

I've found this script that helped me a lot.

Originally Posted by: titasas Go to Quoted Post


Code:
do while True
 if Input.Find("home-powerplay.gtzip").Text("pp.Text") >= "0:01" then
   API.Function("MultiViewOverlayOn", Input:="scoreboard.gtzip", Value:="1")
 else
   API.Function("MultiViewOverlayoff", Input:="scoreboard.gtzip", Value:="1")
 end if
sleep(500)
Loop


But in my case I need to check if an image is set in the title editor or not.

Unfortunately I do not get this done

My code:

Code:
do while True

 if Input.Find("Whatsapp nur Text").Text("bild.Source") = "" and Input.Find("Whatsapp nur Text").Text("Text.Text") <> "" then 
   API.Function("OverlayInput1In",Input:="Whatsapp nur Text")

 elseif Input.Find("Whatsapp nur Text").Text("bild.Source") <> "" and Input.Find("Whatsapp nur Text").Text("Text.Text") = "" then 
   API.Function("OverlayInput1In",Input:="Whatsapp nur Bild")

 else API.Function("OverlayInput1In",Input:="Whatsapp Bild und Text")

 end if
sleep(500)
Loop


I have already tried a few things.

.Text("bild.Source")
.Source("bild.Source")
.Image("bild.Source")
.Pciture("bild.Source")

Can anybody please help me?

Andi
doggy  
#372 Posted : Thursday, March 23, 2023 8:43:26 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Huaba Go to Quoted Post


My code:

Code:
do while True

 if Input.Find("Whatsapp nur Text").Text("bild.Source") = "" and Input.Find("Whatsapp nur Text").Text("Text.Text") <> "" then 
   API.Function("OverlayInput1In",Input:="Whatsapp nur Text")

 elseif Input.Find("Whatsapp nur Text").Text("bild.Source") <> "" and Input.Find("Whatsapp nur Text").Text("Text.Text") = "" then 
   API.Function("OverlayInput1In",Input:="Whatsapp nur Bild")

 else API.Function("OverlayInput1In",Input:="Whatsapp Bild und Text")

 end if
sleep(500)
Loop


I have already tried a few things.

.Text("bild.Source")
.Source("bild.Source")
.Image("bild.Source")
.Pciture("bild.Source")

Can anybody please help me?

Andi



Use checking the vMix API XML file content instead
Huaba  
#373 Posted : Thursday, March 23, 2023 9:28:11 PM(UTC)
Huaba

Rank: Member

Groups: Registered
Joined: 1/12/2021(UTC)
Posts: 12
Germany
Location: Rosenheim

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Do you have a code example for this, please?
doggy  
#374 Posted : Thursday, March 23, 2023 10:12:01 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Huaba Go to Quoted Post
Do you have a code example for this, please?


You are in the right post subject allread, start from the top
nikosman88  
#375 Posted : Friday, March 24, 2023 7:38:01 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Hello guys. A great tool for script by dummies or for general vb.net code that we dont know how to do or if possible to do is Chatgpt AI. If we give it, the details it needs, it can do a big piece of our vb.net script. I needed a script that will find if a specific input in vmix exists and if exists to rename it to a random name. The result after telling chatgpt for vmix xml file and some more details is this
Code:

Dim xml As String = API.XML()
Dim x As New System.Xml.XmlDocument()
x.LoadXml(xml)

Dim apiUrl As String = "http://127.0.0.1:8088/api"

'set the name of your input
Dim inputNodeBack1 As XmlNode = x.SelectSingleNode("//input[@title='back1']")
If inputNodeBack1 IsNot Nothing Then
    Dim randomName As String = "Input" & Guid.NewGuid().ToString().Substring(0, 5)
    inputNodeBack1.Attributes("title").Value = randomName
    inputNodeBack1.Attributes("shortTitle").Value = randomName ' update shortTitle as well

    Dim client As New WebClient()
    Dim xmlString As String = x.OuterXml
    client.Headers("Content-Type") = "application/xml"
    client.UploadString(apiUrl, "POST", xmlString)

    API.Function("SetInputName", Input:="back1", Value:=randomName)

    Console.WriteLine("Input 'back1' renamed to '" & randomName & "'")
Else
    Console.WriteLine("Input 'back1' does not exist")
End If

Of course a vb.net person script guru can make something better but for us who dont know how and where to search chatgpt can help a lot. What impressed me the most was that it created a script that told the vmix console that the input file had been renamed, but in reality nothing changed inside vmix. I told it that, and it replied that "vmix probably doesn't support file renaming while it's running." Then I thought of telling it that vmix does support it and i give to it the command "API.Function("SetInputName", Input:="My input", Value:="My new input name")" and he fixed the command on his own, as you can see in the above script."
thanks 1 user thanked nikosman88 for this useful post.
Nguyendung on 1/5/2024(UTC)
Salvatore  
#376 Posted : Wednesday, March 29, 2023 9:41:49 PM(UTC)
Salvatore

Rank: Advanced Member

Groups: Registered
Joined: 11/15/2021(UTC)
Posts: 72
Italy

Thanks: 8 times
Was thanked: 9 time(s) in 7 post(s)
Hi,
i was wondering if it's possible to play a certain Soundfile from a List (not PlayList) without playing in PGM

For example, my list contains 3 sound files. I would like to play file two detached from PGM

MyList
Sound1.wav
Sound2.wav
Sound3.wav

This Play the List, but how to select the file?:
Code:
API.Function("Play", Input:="MyList")


This don't work:
Code:
API.Function("Play", Input:="MyList", Value:="Sound2.wav")
doggy  
#377 Posted : Wednesday, March 29, 2023 10:01:05 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Salvatore Go to Quoted Post
Hi,
i was wondering if it's possible to play a certain Soundfile from a List (not PlayList) without playing in PGM

For example, my list contains 3 sound files. I would like to play file two detached from PGM

MyList
Sound1.wav
Sound2.wav
Sound3.wav

The Shortcut Function Reference show only this to play a list:

Code:
API.Function("ListPlayOut", Input:="MyList")


This Play the List:
Code:
API.Function("Play", Input:="MyList")


But how to select the file?


you cant unless manually
What do you mean by detached/not playing from PGN? As in not "captured" in the output ?


Salvatore  
#378 Posted : Wednesday, March 29, 2023 10:10:15 PM(UTC)
Salvatore

Rank: Advanced Member

Groups: Registered
Joined: 11/15/2021(UTC)
Posts: 72
Italy

Thanks: 8 times
Was thanked: 9 time(s) in 7 post(s)
Originally Posted by: doggy Go to Quoted Post

What do you mean by detached/not playing from PGN? As in not "captured" in the output ?



i want to play the sounds on AudioOutput B
doggy  
#379 Posted : Wednesday, March 29, 2023 10:20:13 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Salvatore Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

What do you mean by detached/not playing from PGN? As in not "captured" in the output ?



i want to play the sounds on AudioOutput B


Use audio as regulare inputs and set it to bus B

nikosman88  
#380 Posted : Wednesday, March 29, 2023 10:26:13 PM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Originally Posted by: Salvatore Go to Quoted Post
Originally Posted by: doggy Go to Quoted Post

What do you mean by detached/not playing from PGN? As in not "captured" in the output ?



i want to play the sounds on AudioOutput B




Uncheck from audio settings that belong to your list the button M and select B. Then press play manually and it will start play. By commands you can do it this way
1. Check audio in your list so it will be green the button
2.Uncheck button M
3. Make a script like this that will uncheck the M and select the B bus and then a shortcut for it
Code:

API.Function("AudioBusOff", Input:="1", Value:="M")
API.Function("AudioBusOn", Input:="1", Value:="B")
API.Function("Play", Input:="1")

of course you can make more commands like selectindex for specific clip in your list
thanks 2 users thanked nikosman88 for this useful post.
doggy on 3/29/2023(UTC), Salvatore on 3/29/2023(UTC)
Users browsing this topic
Guest (4)
26 Pages«<1718192021>»
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.