Automates generating short-form video scripts with OpenAI, fetching stock footage from Pexels, formatting to vertical with FFmpeg, and uploading to YouTube.
- Python 3.9+
- FFmpeg installed and available in PATH
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile in the project root with your keys:OPENAI_API_KEY=sk-... PEXELS_API_KEY=pxl-... # Optional: path to your Google OAuth client secrets JSON CLIENT_SECRET_FILE=client_secret.json
- Place your Google OAuth client file at the path specified by
CLIENT_SECRET_FILE.
Run the main script and follow the prompt:
python main.py.envis loaded automatically byconfig.pyvia python-dotenv.- Sensitive files like
.envandclient_secret.jsonare ignored by git via.gitignore.