vMix Forums
»
General
»
GT
»
Changing an image in the Web Editor
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
I am using the web editor to prepare name straps for the competitors in a race. The strap has their Name, Country code and a flag image. At the moment I update them using a spreadsheet, but would like to update using the web interface. I can type in the country code as text, but cannot browse to the image, as you would using the Title Editor.
Is there any script I can use to connect the correct flag image?
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 8/21/2015(UTC) Posts: 324 Location: Cornwall, Ontario, Canada Thanks: 18 times Was thanked: 80 time(s) in 60 post(s)
|
Take a look at GitHub - worlds flags in SVG and PNG It might help you. Originally Posted by: IanM I am using the web editor to prepare name straps for the competitors in a race. The strap has their Name, Country code and a flag image. At the moment I update them using a spreadsheet, but would like to update using the web interface. I can type in the country code as text, but cannot browse to the image, as you would using the Title Editor.
Is there any script I can use to connect the correct flag image?
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
That's a really useful link, but I don't think it helps in this case
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
its easy enough using data sources with the country code placeholder wrapped with the file location and IMO the most practical way to change the data by just going through the list and select your competitor . we use a special folder for that just containing all the flag images
in a script i believe you will have to read the content of a textfield (a visually hidden one) which contains the country code and translate that to instuct your image field to load the appropriate flag file
I am actually at a loss as as you state you prepared a list and still wants to manually change using the web interface each individual field
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
I'm in a small OB truck so not much room for large or second screens to have spreadsheet and vMix interface showing at the same time. The vMix operator is quite busy. I thought it might be an easier option to have someone using the Web Interface via wifi. They can watch the competitors as they cross the line and would update the graphic showing the finishing order. However, they cannot set the image in a strap this way. We would have to have created straps for every competitor and that would give us a list of fifty or more in the interface; a little too much to sort through.
I agree though, that the spreadsheet system works well most of the time.
I'll look into that visually hidden field.
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
IMO i believe you need to brush up on using data sources Load the whole list of all the competitors in the datasources open it up (as it only needs to contain the name and the country code you can have it in a very narrow window, we do this all the time) and just select the name from the list , no need for the flag file location to be in the datasource list as the code is enough and as said can be wrapped in the title data source format field as for remote control , there are many options to go through the list from webshortcut, regular shortcut, streamdecks etc to advance through the list
just use your spreadsheet to create your list initially , after that you dont need it anymore ( unless you want to edit items ) . We do hundreds of participants this way with more info needed but to select from the list we only need to see the name
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
You're making me work hard for this answer. Probably good for me. I indeed need to edit the items to include place number and the subheading text for their particular place. I now understand what you were saying about the code being wrapped and that is the breakthrough. Thankyou. I can now do without the browsing for images.
Using the data source is still a bit awkward if trying to use the web interface, but I shall continue to research. I've used data sources on many systems, so it's just a case of working out how in this case.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Quote:You're making me work hard for this answer. Sorry ;-) From what i understand of your goal one could also use both ways , like only have certain fields related to the datasource and others manually through the web interface.(you didnt mention placings and subheadings text before) I assume the placings will be chronological input as you mentioned pointing marking an athlete at arrival so you could have a shortcut that just adds a value(placing) for example I'll be honest , I still work a lot with the classical xaml titles as i can put formulas in the back coding to automate even more as just like you there is just not enough time (nor screen estate) to go start looking in a list (often create a little external app to automate even further of make input easier, but very sport element specific While a lot can be achieved strait from within vMix , using its capabilities from outside ( and userfriendly) is often beneficial , granted it demands a bit of more prepping but once you have it it can be used over and over again BTW , we never create the lists ourselves but get them from the event , we might tweak the columns a bit (or check the country codes and if we have all the flags etc) to match out titles but not going to enter manually hundreds of names and extras ;-) The fun part of it all it to find a easy workflow that works for you demanding a bit of brainstorming and thinking outside the box ;-).
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
Just an explanation of what @doggy was suggesting...
I have a spreadsheet of name, country code for each of the contestants. My graphic has text fields for these and also a flag image. When setting up the data source for the graphic, the column in the spreadsheet for each of the text fields would be the name of the column of data and the format as default '{0}'. For the flag the Column entry would be the country code column name and the Format entry would be 'C:/flags/{0}.png', assuming all my flags are in that directory.
It doesn't solve my Web Interface problem but helps in other situations. I can select particular contestants in the Data Source Manager list, to update the graphic. I can use Revert to add them to my web list, but when using Apply to bring them back in, the flags are not linked to the country code text field. I might try a custom solution next.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
as an extra , scripting might help with your web Interface for the flags again if the flag images are in a specific location the script can read the value of a (hidden) Textfield and translate that to the image that needs to be displayed something like: Quote:Code:dim i As string = ""
i = Input.Find("mytitle").Text("Message.Text")
i = "D:/Folder/" & i & ".png"
API.Function("SetImage",Input:="mytitle",Value:=i)
havent figured out how to specify which image in the title in case of multiple , the Image placeholder variable/name like in a shortcut doesn't take :-( so will be the first one in the list this way
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
Cool. The API has this function, http://127.0.0.1:8088/API/?Function=SetImage&Input=1&SelectedName=Flag.Source&Value=c:/flags/CAN.png Where Input=1 is for the first input source. So I assume there is a way of passing 'SelectedName' for the particular image. I have just been testing by sending the whole url.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Yes, That's it :-)
API.Function("SetImage",Input:="mytitle",SelectedName:="FromPhoto.Source",Value:=i )
Used a social title here that i renamed the input for
will have to make the script loop to continuously check for the text change
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
So, are you adding these calls as a shortcut? I was thinking of just programming a separate web page. Similar to the Web Interface, but to my requirements.
I haven't used the API.Function yet.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
I am not adding them anywhere :-)
just because you insisted on having to update the display from a web interface i looked for a way to automate the change if the country image other than i am used to (never use the webinterface and typing) Other than that my instructions mostly come from external apps (vb.net) specifically (and yes they use http request to send the instructions to vMix ) but mostly i pull my data and control it from a datasource list. the less typing the better (no time anyway) as we need to control the camera also , for scores those are shortcuts or buttons in an app or better yet a stream deck tied to it all Often not even from a OBS truck (the luxury lol) but often from a chair with a single laptop on a stand ;-) But hey each ones procedures are different because the job/sport requires it ;-)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
If you have a number of images, such as player faces, you can use SelectedIndex=3 eg instead of SelectedName, so can use in a loop.
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/3/2019(UTC) Posts: 21 Location: London Thanks: 1 times
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,209 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
yes (on the selectedindex)
|
|
|
|
vMix Forums
»
General
»
GT
»
Changing an image in the Web Editor
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