vMix Forums
»
General
»
Feature Requests
»
Easy: Input Thumbnails over API
Rank: Newbie
Groups: Registered
Joined: 1/15/2021(UTC) Posts: 5 Location: LAFAYETTE
|
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
already there: snapshotinput
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/15/2021(UTC) Posts: 5 Location: LAFAYETTE
|
Doesn't that just save a file on the machine? I want to receive the image data over the API.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: jeffmikels I want to receive the image data over the API. What do you mean ?
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/15/2021(UTC) Posts: 5 Location: LAFAYETTE
|
The command
FUNCTION SnapshotInputNet Input=1&Format=jpg
Should respond
SnapshotInput OK 123456 (123456 bytes of jpeg data)
Does that make sense?
vMix should take the snapshot, but not save it at all and instead send the image data directly out as the response to the API.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: jeffmikels The command
FUNCTION SnapshotInputNet Input=1&Format=jpg
Should respond
SnapshotInput OK 123456 (123456 bytes of jpeg data)
Does that make sense?
vMix should take the snapshot, but not save it at all and instead send the image data directly out as the response to the API. Why would it have to respond as the response is the saved image (snapshot) . the point of this function is to actually save a snapshot of the input specified (instead of the general output snapshot) btw the function is written completely wrong Function=SnapshotInput&Input=nameofinput&Value=filename.png (doesn't seem to respond to the input number) or API.Function("SnapshotInput",Input:="nameofinput",Value:="filename.png") from the helpfiles: SnapshotInput - Create a snapshot image of the selected Input. Optional Value specifies save Filename, otherwise a save file window will appear. Filename can specify date, for example mysnapshot {0:dd MMM yyyy}.jpg Might help if you stated your actual goal with a snapshot
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/15/2021(UTC) Posts: 5 Location: LAFAYETTE
|
I wrote my command using the TCP syntax.
The point is to get an image of an input to a different computer on the network. The API methods allow all kinds of information to be accessed over the network, but preview images are an exception. Since vMix can TAKE snapshots using the API, it should also be able to SEND snapshots.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: jeffmikels I wrote my command using the TCP syntax.
IC Quote:
The point is to get an image of an input to a different computer on the network. The API methods allow all kinds of information to be accessed over the network, but preview images are an exception. Since vMix can TAKE snapshots using the API, it should also be able to SEND snapshots.
Exception and Should it ? that's bold What about using a standard copy command in a vMix script ? We send recordings and snapshots that way all the time Btw you want to transfer a image file not its data(name,size,format etc), would have understood the goal quicker, sorry That's not the same as retrieving information
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/15/2021(UTC) Posts: 5 Location: LAFAYETTE
|
Originally Posted by: doggy What about using a standard copy command in a vMix script ? We send recordings and snapshots that way all the time
I already have workarounds for what I need, but I think this feature should not need a workaround. Here are all the details I can think of for this feature request: I'm writing an app to employ all the features of the vMix API as a simple "Remote Control" for vMix. Having an image for each one of the inputs would make my app more usable. Currently, I use the API to tell vMix to snapshot an input and save it to a file like so: Code:?Function=SnapshotInput&Input=1&Value=1.jpg
That saves the image as 1.jpg to the vmixStorage directory on the computer. I'm also running a nodejs server on the same computer to serve those image files back to me so my app can get the snapshot images. This workaround works, and I have also implemented a different workaround that gets snapshot images directly from the NDI feeds. However, both of these methods are slow, and with such an incredibly robust API, vmix could easily accomplish this directly without any workarounds. To be specific: what I want is to be able to send something like this API request: Code:?Function=SnapshotInputImage&Input=1&Value=640x320,jpg
and have the response be the immediately generated jpg image at the specified resolution or using the TCP API, something like this: Code:FUNCTION SNAPSHOTINPUTIMAGE Input=1&Value=1920x1080,png
and have the following be the response Code:SNAPSHOTINPUTIMAGE OK 123456
(123456 bytes of png data)
I labelled the original post as "Easy" because I think my request requires no new features. Instead of writing the bytes to disk, this new api shortcut/function would stream the bytes directly over the TCP connection or as the body of the HTTP response. If I had access to the source code. I'm sure I could implement it myself in about 5 minutes, but the current developers could do it I'm sure in less than 1.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,222 Location: Belgium Thanks: 293 times Was thanked: 955 time(s) in 790 post(s)
|
Much better explanation than originally posted :-)
|
|
|
|
Rank: Member
Groups: Registered
Joined: 8/1/2019(UTC) Posts: 14 Location: Kansas
|
Originally Posted by: jeffmikels Originally Posted by: doggy What about using a standard copy command in a vMix script ? We send recordings and snapshots that way all the time
I already have workarounds for what I need, but I think this feature should not need a workaround. Here are all the details I can think of for this feature request: I'm writing an app to employ all the features of the vMix API as a simple "Remote Control" for vMix. Having an image for each one of the inputs would make my app more usable. Currently, I use the API to tell vMix to snapshot an input and save it to a file like so: Code:?Function=SnapshotInput&Input=1&Value=1.jpg
That saves the image as 1.jpg to the vmixStorage directory on the computer. I'm also running a nodejs server on the same computer to serve those image files back to me so my app can get the snapshot images. This workaround works, and I have also implemented a different workaround that gets snapshot images directly from the NDI feeds. However, both of these methods are slow, and with such an incredibly robust API, vmix could easily accomplish this directly without any workarounds. To be specific: what I want is to be able to send something like this API request: Code:?Function=SnapshotInputImage&Input=1&Value=640x320,jpg
and have the response be the immediately generated jpg image at the specified resolution or using the TCP API, something like this: Code:FUNCTION SNAPSHOTINPUTIMAGE Input=1&Value=1920x1080,png
and have the following be the response Code:SNAPSHOTINPUTIMAGE OK 123456
(123456 bytes of png data)
I labelled the original post as "Easy" because I think my request requires no new features. Instead of writing the bytes to disk, this new api shortcut/function would stream the bytes directly over the TCP connection or as the body of the HTTP response. If I had access to the source code. I'm sure I could implement it myself in about 5 minutes, but the current developers could do it I'm sure in less than 1. +1 I'm also making a web dashboard for my team, and it's crazy because the normal vMix web Shortcuts page has images, but they don't match the GUID of the input, so you can't just link to those. Also, with the streamdeck showing live preview to each button, I don't think it's a performance limitation, since it's spirtually similar? Also, the resolution parameter, or something selecting a size that's more reasonable for web than 3840x2160 would be appreciated as well.
|
|
|
|
vMix Forums
»
General
»
Feature Requests
»
Easy: Input Thumbnails over API
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