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
Adriano  
#1 Posted : Sunday, May 24, 2020 4:02:57 AM(UTC)
Adriano

Rank: Newbie

Groups: Registered
Joined: 5/24/2020(UTC)
Posts: 4
Brazil

Thanks: 1 times
Hello friends,

I'm new here.

Just a simple question: Is there a function in vMix API to just check if a media file exists?

I know I can do that by checking the return of AddInput or ListAdd functions, but I'd like to check it without needing to add sometime (an input or a list item) to vMix.

Is there any way to do that?

Thanks in avance
doggy  
#2 Posted : Sunday, May 24, 2020 4:22:21 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)
Exist where ?

If as input check with the api xml else with a script
Adriano  
#3 Posted : Sunday, May 24, 2020 7:11:32 AM(UTC)
Adriano

Rank: Newbie

Groups: Registered
Joined: 5/24/2020(UTC)
Posts: 4
Brazil

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
Exist where ?

If as input check with the api xml else with a script


Basically, what I'm looking for is a way to make the API tells me that vMix can access a media file without having to add an input to perform this check. This would be a pre-check for registration purposes.

Let me give you an example:

I can do the following request to check if vMix can access the file 'image.jpg':

http://vmix-pc:8088/api?Function=AddInput&Value=Image|c:\path\to\image.jpg

If the file's not found, the request will returns null. This is OK for my checking purposes, because the input won't be added to vMix. But if the file exists, the request will return something, which allows me to know that the file has found, but it will also add the input to vMix. I would like to avoid that. I just want to know if the API provides a way to do this check without needing to change anything in the vMix's GUI (like adding a new input, for example).

Thanks again.
doggy  
#4 Posted : Sunday, May 24, 2020 7:33:54 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)
What you want the API can not do but a simple script can with the added bonus if exist you could do whatever you want even give you a message
There is even sort of an example in a previous post to check if a file exist
Adriano  
#5 Posted : Sunday, May 24, 2020 9:54:45 AM(UTC)
Adriano

Rank: Newbie

Groups: Registered
Joined: 5/24/2020(UTC)
Posts: 4
Brazil

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
What you want the API can not do but a simple script can with the added bonus if exist you could do whatever you want even give you a message
There is even sort of an example in a previous post to check if a file exist


In my case, vMix is running on a computer and my program is running on another computer. The program doesn't have access to the media file paths. These paths are only accessed by the computer where vMix is installed. My program just gets (reads) a list of paths (it doesn't know if they exist) and passes them to vMix through the API.

I could solve that by creating another program to run on the computer where vMix is installed, check the paths and send the info that I need, but I'd like to avoid that, if it's possible to validate file existence using the API.
Adriano  
#6 Posted : Sunday, May 24, 2020 10:17:21 AM(UTC)
Adriano

Rank: Newbie

Groups: Registered
Joined: 5/24/2020(UTC)
Posts: 4
Brazil

Thanks: 1 times
Oh, when you said script I was thinking it's an external app that uses the API to communicate with vMix. I haven't realized that vMix has its own script resources.

Sorry! Thanks for the tip, doggy :)
doggy  
#7 Posted : Sunday, May 24, 2020 10:33:14 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: Adriano Go to Quoted Post
Oh, when you said script I was thinking it's an external app that uses the API to communicate with vMix. I haven't realized that vMix has its own script resources.

Sorry! Thanks for the tip, doggy :)


5th example

https://forums.vmix.com/...ng-for-Dummies#post70735
thanks 1 user thanked doggy for this useful post.
Adriano on 5/24/2020(UTC)
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.