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
Nikolis  
#1 Posted : Thursday, October 24, 2024 2:16:41 AM(UTC)
Nikolis

Rank: Newbie

Groups: Registered
Joined: 1/28/2024(UTC)
Posts: 8

Thanks: 4 times
Hello all !

I have an issue, trying to automatize some things in my season's streamings ; I have some inputs were both logos (home team's & visitor's) need to appear. Thus, instead of making these titles again and again seasonwide (each once for every game) I intend to have 2 png images, named LogoHome.png & LogoAway.png and the title editor of this input loading them as data from Datasources. So, all I will have to do in every game is copy the 2 logos in the games folder and renaming them to LogoHome.png and LogoAway.png

How do I do it ?


What I have tried so far is ; I load the title editor of this input, intending to grab the paths (C:\...) from a .json file.
Now, I have confirmed the correct syntax of the .json file from one of the relative websites, yet Notepad++ indicates most of my data as troublesome (orange background).
Back to the title editor > Images tab, trying to map the field with this .json file, I add the file to my project's datasources and this appears ; "ERROR : Encountered unexpected character G".

I have watched a tutorial of how this is done, but they use Excel (Google Spreadsheet) and it's a bit more complicated.


Any ideas about how it's properly done and why I cannot grab the paths from a .json file, would be greatly appreciated.
doggy  
#2 Posted : Thursday, October 24, 2024 4:24:28 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Nikolis Go to Quoted Post
Hello all !

I have an issue, trying to automatize some things in my season's streamings ; I have some inputs were both logos (home team's & visitor's) need to appear. Thus, instead of making these titles again and again seasonwide (each once for every game) I intend to have 2 png images, named LogoHome.png & LogoAway.png and the title editor of this input loading them as data from Datasources. So, all I will have to do in every game is copy the 2 logos in the games folder and renaming them to LogoHome.png and LogoAway.png

How do I do it ?


How is copying and renaming logos a timesaver compared to just open your title editor and choose another image in the image placeholder ?


Quote:

What I have tried so far is ; I load the title editor of this input, intending to grab the paths (C:\...) from a .json file.
Now, I have confirmed the correct syntax of the .json file from one of the relative websites, yet Notepad++ indicates most of my data as troublesome (orange background).


????

Maybe show the relevant part of the Json file and what data for the image it gives you ?

Quote:

Back to the title editor > Images tab, trying to map the field with this .json file, I add the file to my project's datasources and this appears ; "ERROR : Encountered unexpected character G".
I have watched a tutorial of how this is done, but they use Excel (Google Spreadsheet) and it's a bit more complicated.


Principle is exaclty the same


Quote:

Any ideas about how it's properly done and why I cannot grab the paths from a .json file, would be greatly appreciated.


Again (is the path available or just the name of the image? )
One can always "format" the datasource result in the Title editor/datasource mapping (see helpfiles, datasource section)

thanks 1 user thanked doggy for this useful post.
Nikolis on 10/25/2024(UTC)
nielsen01  
#3 Posted : Thursday, October 24, 2024 5:37:14 PM(UTC)
nielsen01

Rank: Newbie

Groups: Registered
Joined: 5/27/2020(UTC)
Posts: 3
Denmark
Location: Copenhagen

Was thanked: 2 time(s) in 2 post(s)
What we normally do with datasource and images, is that we output the filename in the datasource ie. "HomeTeam.png".
Then you can use the Format section when you are mapping the datasource to the graphics.
Ie. C:/../{0}

The "{0}" is the syntax for the content of your datasource. So the output in this case would be "C:/../HomeTeam.png"
It also works with URLs if you have the images hosted on a webserver.

You can read more about it here: https://www.vmix.com/hel...SourcesTitleMapping.html
thanks 1 user thanked nielsen01 for this useful post.
Nikolis on 10/25/2024(UTC)
Nikolis  
#4 Posted : Friday, October 25, 2024 4:32:07 AM(UTC)
Nikolis

Rank: Newbie

Groups: Registered
Joined: 1/28/2024(UTC)
Posts: 8

Thanks: 4 times
@doggy & nielsen01 ... thank you both !

This is what the code looks like within my JSON file ;

[img=http://www.imagevenue.com/ME199Y4Q]The code[/img]

And this is the json validator page, its URL is https://csvjson.com/json_validator

[img=https://www.imagevenue.com/ME199Y5W]The validator[/img]

Apparently, there's something "going on", as the page validates my code alright, yet the red button appears in line 2. I don't know how both of these could be happening simultaneously but they are.

This .gtzip file consists of 5 layers ;
2 bars (graphics),
1 competition logo,
(all of them, so far, are "constants")
the name of the club (which I grab from the Teams.json file, which works out alright),
the logo of the club (which we are now discussing)

To answer your question, doggy, this layer is animated in/out, so I prefer to design it once and for all and then let the mapping do its work with the related file (HomeLogo.png or AwayLogo.png) instead of me reanimating the title twice for each game (for Home and Visitors). It works with the text (e.g. team names, referees, starting lineups etc.), I am looking for the way to go the extra step with the image part as well.

@nielsen01 ; never touched the Format parameter, will certainly give it a try once the situation with the json code is cleared.

To both of you, thanks again !
doggy  
#5 Posted : Friday, October 25, 2024 5:39:20 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Originally Posted by: Nikolis Go to Quoted Post
@doggy & nielsen01 ... thank you both !

This is what the code looks like within my JSON file ;

[img=http://www.imagevenue.com/ME199Y4Q]The code[/img]



do you have editing acces to the json file ?

use / instead of \ within the link addresses
thanks 1 user thanked doggy for this useful post.
Nikolis on 10/25/2024(UTC)
Nikolis  
#6 Posted : Friday, October 25, 2024 7:59:39 AM(UTC)
Nikolis

Rank: Newbie

Groups: Registered
Joined: 1/28/2024(UTC)
Posts: 8

Thanks: 4 times
@doggy, nielsen 01
Thank you both, it works like beauty !

doggy, yes, I had the original code but screen printing, loading Photoshop, pasting, cropping, saving, uploading, getting the link came to mind first, instead of only copying the text ...
I guess this is what is described in profiles as "Status : Complicated" ... lol

Also, since it was a file path from my hard disk I thought that "\" would be the one to do the job.

Now I have the solution but, just for the record, can you please explain the reason why "/" (like the "URL format") is the one needed ?
Users browsing this topic
Guest
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.