add sleep for checking render success, add readme
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -265,6 +266,7 @@ func job(id, outputLocation string) error {
|
|||||||
fmt.Println("Video has completed rendering.")
|
fmt.Println("Video has completed rendering.")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
}
|
}
|
||||||
|
|
||||||
// decode the video, it is in base64 and is expected to be a mp4
|
// decode the video, it is in base64 and is expected to be a mp4
|
||||||
|
21
readme.md
Normal file
21
readme.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# i2v (Image to Video)
|
||||||
|
|
||||||
|
I2V is a tool for converting a still image into a video. It uses the Stability.ai API to generate a video from a single image.
|
||||||
|
|
||||||
|
You can find the API documentation here: https://platform.stability.ai/docs/api-reference#tag/v2alphageneration/paths/~1v2alpha~1generation~1image-to-video/post
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To build the binary run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go build -o i2v i2v/cmd/cli
|
||||||
|
```
|
||||||
|
|
||||||
|
To run the binary:
|
||||||
|
|
||||||
|
Set the `STABILITY_API_KEY` environment variable to your API key.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./i2v -o <path to output video> <path to input image>
|
||||||
|
```
|
Reference in New Issue
Block a user