Skip to content

Commit

Permalink
better documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmikels committed Nov 15, 2022
1 parent e641fcb commit 9a65612
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 734 deletions.
56 changes: 18 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,31 @@ vMix has a robust API, but one key limitation of the API is that while you can
tell vMix to take a snapshot of an input, it will save the image on the vMix
machine but not send the image over the network.

This is a small application running on the nodejs framework to act as a proxy
for those images.
The Snapshot Proxy is a small application written in the Go language to automatically generate
those images and provide them over the network to other applications.

The application is especially helpful in providing preview images of each input for

[Unofficial vMix Remote Control for Android](https://play.google.com/store/apps/details?id=org.jeffmikels.vmix_remote)
[Unofficial vMix Remote Control for iOS](https://apps.apple.com/us/app/unofficial-vmix-remote-control/id1551404035)

## Installation for Advanced Users
## Installation:

These commands should be run on the same computer that is running vMix.
- Download the latest zip file from the [Releases Page](https://github.com/jeffmikels/vmix-snapshot-proxy/releases)
- Unzip the file.
- Put the `.exe` and the `.bat` files both in the same directory wherever you want (NOTE: they must be on the SAME computer that's running vMix).
- Start vMix.
- Double-click on the `.bat` file.
- If you have problems, look at the `.bat` file for the available command line options:
- `-h` will print the help
- `-p` will allow you to specify the Web API port vMix is using
- `-d` will allow you to specify the directory where vMix stores snapshot images

```bash
$ git clone https://github.com/jeffmikels/vmix-snapshot-proxy.git
$ cd vmix-snapshot-proxy
$ npm install
```
## Advanced Usage:

## Usage
When running, the proxy will open a web server at port `8098` and will expose the following HTTP endpoints:

Edit the settings at the top of `index.js`.

Start vMix and then the proxy server...

```
$ node index.js
```

You'll see something like the following output

```
=====================================
Running vMix Snapshot Proxy at port 8098
Get a list of all inputs: http://192.168.1.1:8098/
Force regen one input (0 means program): http://192.168.1.1:8098/regen/#
Force regen all inputs: http://192.168.1.1:8098/regen
Get input snapshot: http://192.168.1.1:8098/#.jpg
Getting an input snapshot sends the most recent snapshot, and queues the generation of a new one.
Snapshots take about 1 second to process
=====================================
```

Open a browser and visit:

`http://[PROXY_IP_ADDRESS]:8098/[INPUT_NUMBER].jpg`

Every time you visit that address, you will receive a new snapshot image of the selected input.
- `http://[IP_ADDRESS]:8098/` will return a list of all the discovered vMix inputs
- `http://[IP_ADDRESS]:8098/regen` will trigger a global regeneration of all input snapshots
- `http://[IP_ADDRESS]:8098/regen/[INPUT_NUMBER]` will trigger a regeneration of one input's snapshot
- `http://[IP_ADDRESS]:8098/[INPUT_NUMBER].jpg` will serve the input snapshot as a jpg image.
25 changes: 0 additions & 25 deletions build-win.sh

This file was deleted.

3 changes: 3 additions & 0 deletions go-version/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash

go mod tidy
env GOOS=windows GOARCH=amd64 go build -o vmix-snapshot-proxy.exe

zip -u vmix-snapshot-proxy.zip vmix-snapshot-proxy.exe vmix-snapshot-proxy.bat
Binary file modified go-version/vmix-snapshot-proxy.exe
Binary file not shown.
4 changes: 3 additions & 1 deletion go-version/vmix-snapshot-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Inputs struct {
Inputs []Input `xml:"input"`
}

//Input{name: "Camera 1", number: 1}
// Input{name: "Camera 1", number: 1}
type Input struct {
XMLName xml.Name `xml:"input"`
Name string `xml:"title,attr"`
Expand Down Expand Up @@ -196,6 +196,8 @@ func main() {
}
}()

PrintStatus()

// start the server
app.Listen(fmt.Sprintf("%s:%d", myIp, proxyPort))

Expand Down
Binary file modified go-version/vmix-snapshot-proxy.zip
Binary file not shown.
53 changes: 0 additions & 53 deletions index.html

This file was deleted.

145 changes: 0 additions & 145 deletions index.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/vue.js

This file was deleted.

Loading

0 comments on commit 9a65612

Please sign in to comment.