|
1 | | -# vidai |
2 | | -Video generation using AI |
| 1 | +# vidai 📹🤖 |
| 2 | + |
| 3 | +**vidai** generates videos using AI. |
| 4 | + |
| 5 | +This is a CLI tool for [RunwayML Gen-2](https://runwayml.com/) that adds some extra features on top of it. |
| 6 | + |
| 7 | +## 🚀 Features |
| 8 | + |
| 9 | + - Generate videos directly from the command line using a text or image prompt. |
| 10 | + - Create or extend videos longer than 4 seconds by reusing the last frame of the video as the input for the next generation. |
| 11 | + - Other handy tools to edit videos, like generating loops or resizing videos. |
| 12 | + |
| 13 | +## 📦 Installation |
| 14 | + |
| 15 | +You can use the Golang binary to install **vidai**: |
| 16 | + |
| 17 | +```bash |
| 18 | +go install github.com/igolaizola/vidai/cmd/vidai@latest |
| 19 | +``` |
| 20 | + |
| 21 | +Or you can download the binary from the [releases](https://github.com/igolaizola/vidai/releases) |
| 22 | + |
| 23 | +## 📋 Requirements |
| 24 | + |
| 25 | +You need to have a [RunwayML](https://runwayml.com/) account and extract the token from the request authorization header using your browser's developer tools. |
| 26 | + |
| 27 | +To create extended videos, you need to have [ffmpeg](https://ffmpeg.org/) installed. |
| 28 | + |
| 29 | +## 🕹️ Usage |
| 30 | + |
| 31 | +### Some examples |
| 32 | + |
| 33 | +Generate a video from an image prompt: |
| 34 | + |
| 35 | +```bash |
| 36 | +vidai generate --token RUNWAYML_TOKEN --image car.jpg --output car.mp4 |
| 37 | +``` |
| 38 | + |
| 39 | +Generate a video from a text prompt: |
| 40 | + |
| 41 | +```bash |
| 42 | +vidai generate --token RUNWAYML_TOKEN --text "a car in the middle of the road" --output car.mp4 |
| 43 | +``` |
| 44 | + |
| 45 | +Extend a video by reusing the last frame twice: |
| 46 | + |
| 47 | +```bash |
| 48 | +vidai extend --input car.mp4 --output car-extended.mp4 --n 2 |
| 49 | +``` |
| 50 | + |
| 51 | +Convert a video to a loop: |
| 52 | + |
| 53 | +```bash |
| 54 | +vidai loop --input car.mp4 --output car-loop.mp4 |
| 55 | +``` |
| 56 | + |
| 57 | +### Help |
| 58 | + |
| 59 | +Launch `vidai` with the `--help` flag to see all available commands and options: |
| 60 | + |
| 61 | +```bash |
| 62 | +vidai --help |
| 63 | +``` |
| 64 | + |
| 65 | +You can use the `--help` flag with any command to view available options: |
| 66 | + |
| 67 | +```bash |
| 68 | +vidai generate --help |
| 69 | +``` |
| 70 | + |
| 71 | +### How to launch commands |
| 72 | + |
| 73 | +Launch commands using a configuration file: |
| 74 | + |
| 75 | +```bash |
| 76 | +vidai generate --config vidai.conf |
| 77 | +``` |
| 78 | + |
| 79 | +```bash |
| 80 | +# vidai.conf |
| 81 | +token RUNWAYML_TOKEN |
| 82 | +image car.jpg |
| 83 | +output car.mp4 |
| 84 | +extend 2 |
| 85 | +``` |
| 86 | + |
| 87 | +Using environment variables (`VIDAI` prefix, uppercase and underscores): |
| 88 | + |
| 89 | +```bash |
| 90 | +export VIDAI_TOKEN=RUNWAYML_TOKEN |
| 91 | +export VIDAI_IMAGE="car.jpg" |
| 92 | +export VIDAI_OUTPUT="car.mp4" |
| 93 | +export VIDAI_EXTEND=2 |
| 94 | +vidai generate |
| 95 | +``` |
| 96 | + |
| 97 | +Using command line arguments: |
| 98 | + |
| 99 | +```bash |
| 100 | +vidai generate --token RUNWAYML_TOKEN --image car.jpg --video car.mp4 --extend 2 |
| 101 | +``` |
| 102 | + |
| 103 | +## ⚠️ Disclaimer |
| 104 | + |
| 105 | +The automation of RunwayML accounts is a violation of their Terms of Service and will result in your account(s) being terminated. |
| 106 | + |
| 107 | +Read about RunwayML Terms of Service and Community Guidelines. |
| 108 | + |
| 109 | +vidai was written as a proof of concept and the code has been released for educational purposes only. The authors are released of any liabilities which your usage may entail. |
| 110 | + |
| 111 | +## 💖 Support |
| 112 | + |
| 113 | +If you have found my code helpful, please give the repository a star ⭐ |
| 114 | + |
| 115 | +Additionally, if you would like to support my late-night coding efforts and the coffee that keeps me going, I would greatly appreciate a donation. |
| 116 | + |
| 117 | +You can invite me for a coffee at ko-fi (0% fees): |
| 118 | + |
| 119 | +[](https://ko-fi.com/igolaizola) |
| 120 | + |
| 121 | +Or at buymeacoffee: |
| 122 | + |
| 123 | +[](https://buymeacoffee.com/igolaizola) |
| 124 | + |
| 125 | +Donate to my PayPal: |
| 126 | + |
| 127 | +[paypal.me/igolaizola](https://www.paypal.me/igolaizola) |
| 128 | + |
| 129 | +Sponsor me on GitHub: |
| 130 | + |
| 131 | +[github.com/sponsors/igolaizola](https://github.com/sponsors/igolaizola) |
| 132 | + |
| 133 | +Or donate to any of my crypto addresses: |
| 134 | + |
| 135 | + - BTC `bc1qvuyrqwhml65adlu0j6l59mpfeez8ahdmm6t3ge` |
| 136 | + - ETH `0x960a7a9cdba245c106F729170693C0BaE8b2fdeD` |
| 137 | + - USDT (TRC20) `TD35PTZhsvWmR5gB12cVLtJwZtTv1nroDU` |
| 138 | + - USDC (BEP20) / BUSD (BEP20) `0x960a7a9cdba245c106F729170693C0BaE8b2fdeD` |
| 139 | + - Monero `41yc4R9d9iZMePe47VbfameDWASYrVcjoZJhJHFaK7DM3F2F41HmcygCrnLptS4hkiJARCwQcWbkW9k1z1xQtGSCAu3A7V4` |
| 140 | + |
| 141 | +Thanks for your support! |
0 commit comments