Crank takes a topic and generates a complete YouTube Short, including video and metadata, ready for upload. Designed for fast, efficient content creation with full control over the output.
- Python 3.x (Tested with Python 3.13)
uv(Python package manager)ffmpegandffprobeinstalled and available in your system PATH (required for video processing)
Crank uses a .env file to load sensitive keys and config values.
Make sure to create a .env file in the root directory containing your API keys, for example:
GEMINI_API_KEY=your_api_key_hereThe other credentials are stored as JSON files inside the root directory:
secrets.jsonβ OAuth 2.0 client credentials JSON used for YouTube API upload authentication
Crank is fully configurable. You can adjust prompts, upload behavior, and other settings using your preferred method.
Change the following directly in the file:
NAME: The channel namePROMPT: Topic or idea to base the generated video onUPLOAD:trueorfalseto enable/disable uploadsDELAY: Number of hours between uploads:0for instant upload, or any positive number to schedule the video that many hours later (defaults to2.5)GEMINI_API_KEY: Optional channel-specific API key (overrides .env if set)WHISPER_MODEL: Preferred whisper model (tiny,base,small,medium,large-v1,large-v2,large-v3; defaults tosmall)OAUTH_PATH: Path to OAuth credentials (defaults tosecrets.json)FONT: Defines text font (defaults toComic Sans MS)
GET_CONTENT: Guidelines for generating the transcriptGET_TITLE: Guidelines for generating the titleGET_SEARCH_TERM: YouTube search term used for background video scrapingGET_DESCRIPTION: Guidelines for generating the descriptionGET_CATEGORY_ID: Guidelines for generating Category ID for the video
- Clone the repository
git clone https://github.com/ecnivs/crank.git
cd crank- Install
uv
pip install uv- Install dependencies using
uv
uv sync- Install
ffmpeg
# Debian / Ubuntu
sudo apt install ffmpeg
# Arch Linux
sudo pacman -S ffmpeg
# macOS (Homebrew)
brew install ffmpeg
# Windows (using Chocolatey)
choco install ffmpeg- Install
spaCylanguage model
uv run python -m spacy download en_core_web_mdRun the tool with the default configuration
uv run main.pyOr provide your custom config file with --path
uv run main.py --path path/to/your_config.ymlexample.mp4
If you find Crank helpful and want to support its development, donations are welcome! Your support helps keep the project active and enables new features.
For information about running tests, see TESTING.md.
For information about creating custom background video plugins, see PLUGIN_GUIDE.md.
Feel free to:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Submit a pull request