Files
i2v/installation-and-usage.md

67 lines
2.8 KiB
Markdown

# i2v (Image to Video)
## Get set up with stability.ai
Set up an account with stability.ai add credits and set up an API key here: https://platform.stability.ai/account/keys
Once you've created an API key you should set it as an environment variable on your system. Specific instructions for each platform can be found below.
## How to install
### Windows
Download the file `i2v-windows-amd64.exe` or `i2v-windows-arm64.exe`. Place the file somewhere on your path. I usually change the name of the file to `i2v.exe`.
I usually have a folder named 'bin' in my user's home folder. I then make sure that folder is on my path by adding it to the path system environment variable. Here is a link with instructions on how to do that: https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14)
To set the API key in your environment you can follow the above linked instructions for updating your PATH variable but instead of changing your PATH, you can create a new variable.
It should be called `STABILITY_API_KEY` and should have the value of the API key you created when you set up your stability.ai account.
### Mac
Download the file `i2v-darwin-amd64` or `i2v-darwin-arm64`. Place the file somewhere on your path. I usually change the name of the file to `i2v`.
Set an environment variable named `STABILITY_API_KEY` with the value of the API key created when you set up your stability.ai account.
### Linux
Download the file `i2v-linux-amd64` or `i2v-linux-arm64`. Place the file somewhere on your path. I usually change the name of the file to `i2v`.
Set an environment variable named `STABILITY_API_KEY` with the value of the API key created when you set up your stability.ai account.
## Usage
```
% i2v -h # windows will be `i2v.exe -h`
NAME:
i2v - A command line tool to convert images to videos, based on Stability.ai's Rest API.
USAGE:
i2v [global options] command [command options] [arguments...]
VERSION:
v1.0.0
DESCRIPTION:
i2v (Image to Video) is a command line tool to convert images to videos, based on Stability.ai's Rest API.
AUTHOR:
Mason Payne <mason@masonitestudios.com>
COMMANDS:
get-job-result, gjr Get the result of a job
resize, r Resize an image to a supported size for the API
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--output value, -o value path to output file (should be a mp4) (default: "./output.mp4")
--format value, -f value The format to resize the image to wide, tall, or square (default: "wide")
--help, -h show help
--version, -v print the version
COPYRIGHT:
2023 Masonite Studios LLC
```
You can get more help for a specific command by adding the help option after the command e.g. `i2v resize -h`