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
jkhouw  
#1 Posted : Thursday, April 28, 2022 2:43:55 AM(UTC)
jkhouw

Rank: Newbie

Groups: Registered
Joined: 3/30/2020(UTC)
Posts: 5
United States

VMIX Version 25.0.0.29

So I may be making my life complicated, and I'm not even sure I can explain the issue(s) properly but am looking for help and not sure if some of what I'm seeing is a bug or by design.

OBJECTIVE: To automatically (by keypress, STreamdeck, external controller) change an image on an input.
RESTRICTION: I can't use a photo folder as I can't control the order, names etc easily of the images.

The simplest way I could envision doing it was if there was a way to change an image inputs source file path via an API call - but I only saw a way to add/create a new one, not change an existing one - Am I missing something? But since I couldn't find an api call that would do this I went to solution the next alternative:

I created a title with an image - now I can change the image programmatically . I also leverage transition pages on that title to show/hide other elements within that tile. this is relevant for later.
I do not use this title as an overlay, but rather as a multiview/layer because I can't consume one of the 4 overlay channels for this as they are otherwise used.

This works ok, but for layout reasons, I would prefer to have the top level input be a virtual set, rather than a "blank" standard input. BUT - if i use the title as a layer in a virtual set, it doesn't honor the page transitions of the title. In fact its even worse:
Lets say I have a virtual set with 3 layers, and the 3rd layer is a title input with 3 page transitions
if I CUT from preview to that virtual set, it automatically shows the title on the virtual set as page 3 state. I can then programmatically go back to page 1, and cycle through them - but it doesn't start from zero on cut. (It does if a title is just an layer/multiview on a blank input)
If I use a TRANSITION (Fade, Stinger, etc) then it transitions to that virtual set, again as page 3 state (still a problem), but now even worse: if i try to programmatically go back to page 1 (or any other page) it transitions between preview and program again (taking what was in preview and sending it to program) rather than changing the titles page state.

Basically here i seem to be seeing two different bugs: 1) titles in virtual sets don't start in their transition state after moving from preview to program and 2) if I do any other transition but CUT, it transitions back when I try to manipulate the layered titles page.

So my questions are:
1) Is there a programatic way I missed to change an image inputs source? OR is titles the only way to do this
2) Is there a way to have a virtual set with a title as a layer honor that titles transition in and subsequent pagination animations?
3) What is going on with titles as layers on virtual sets that makes the virtual set transition off again if I try to transition an "embedded" title UNLESS i use CUT to activate the virtual set?
nikosman88  
#2 Posted : Thursday, April 28, 2022 6:01:52 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 113 times
Was thanked: 52 time(s) in 49 post(s)
Hello. What do you mean "now I can change the image programmatically"? What command do you use to do this?
Anyway i think that you may find the solution in these 2 videos

jkhouw  
#3 Posted : Thursday, May 19, 2022 4:43:29 AM(UTC)
jkhouw

Rank: Newbie

Groups: Registered
Joined: 3/30/2020(UTC)
Posts: 5
United States

Originally Posted by: nikosman88 Go to Quoted Post
Hello. What do you mean "now I can change the image programmatically"? What command do you use to do this?
Anyway i think that you may find the solution in these 2 videos


yes have watched both those and am familiar with dynamic inputs.

What I meant by change image programatically is if I have image files (image1.png, image2.png, etc), and I create an "Image Input" (vmix input type is Image) pointing to Image1.png, I would like to change it on the fly to image2.png using an API.

I can do this with a Title -

SetImage Input=[titleName]&SelectedName=[imageNameInTitleFile]&Value=[fullPathToImage.png)
- this is how I do it today, but titles don't play well with VirtualSets (as I attempted to describe in my OP) and I would like to use virtual sets

I can also create a NEW image input using a similar API.

But I don't want to keep creating new ones, I want to change the path an Image Input points to- because the images are generated outside of vmix during the production. If I have to CREATE new inputs everytime, then I also have to keep changing the virtual sets (or dynamic inputs). I can't create the dynamic inputs in advance because I don't know the file names in advance. But I can call an API outside of vmix (like the SetImage api) and change the Value paramter in the external application.
nikosman88  
#4 Posted : Thursday, May 19, 2022 5:25:19 AM(UTC)
nikosman88

Rank: Advanced Member

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

Thanks: 113 times
Was thanked: 52 time(s) in 49 post(s)
It is too complicated the thing you want to do. I dont know if you can do something with scripting. I found in a fb vmix group this script
Code:
API.Function("AddInput", Value:="Colour|")
Sleep (1000)
dim xml as string = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim nodeList as XmlNodeList = x.GetElementsByTagName("input")
dim inputNumber as string
for each node as XmlElement In nodeList
inputNumber = node.GetAttribute("number")
next
console.Writeline("Last Input : " & inputNumber)
API.Function("SetInputName",Input:=inputNumber,Value:="Scene : " & inputNumber)
API.Function("PreviewInput",Input:=inputNumber)

with this script you can add a new input in vmix (it will add input as last input in vmix) and then rename it as you want. Then if you know the name of input you can programm the dynamic inputs.
I combine this script with this one https://forums.vmix.com/...g-for-Dummies#post101554 that can search in a folder and add the files of the last created folder as images sequence or photo.
Users browsing this topic
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.