Skip to content

ecnivs/crank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Crank

Youtube Shorts Generator

IMG_20250901_182631

Overview

Automate the creation of YouTube Shorts with customizable prompts, titles, tags, and descriptions. Designed for fast, efficient content generation while giving you full control over the output.

πŸ› οΈ Prerequisites

  • Python 3.x (Tested with Python 3.13)
  • Required Python libraries (listed in requirements.txt)
  • ffmpeg and ffprobe installed and available in your system PATH (required for video processing)

Environment Variables

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_here

Credential Files

The 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

βš™οΈ Customization

Crank is fully configurable. You can adjust prompts, descriptions, upload behavior, and other settings using your preferred method.

Default settings in preset.yml

Change the following directly in the file:

  • NAME: the channel name
  • UPLOAD: true or false to enable/disable uploads
  • DELAY: number of hours between uploads: 0 for instant upload, or any positive number to schedule the video that many hours later (defaults to 2.5)
  • DESCRIPTION: default video description
  • TAGS: list of tags for each video
  • CATEGORY_ID: defines video category (defaults to 24)
  • FONT: defines text font (defaults to Comic Sans MS)
  • OAUTH_PATH: path to OAuth credentials (defaults to secrets.json)
  • 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 to small)
  • Prompt configurations (CONTENT_PROMPT, GET_TITLE, TERM_PROMPT): control how transcripts, titles, and subjects are generated

πŸ“¦ Installation

  1. Clone the repository
git clone https://github.com/ecnivs/crank.git
cd crank
  1. Install dependencies
pip install -r requirements.txt
  1. 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

πŸš€ Running Crank

Run the tool with the default configuration:

python main.py

Or provide your custom config file with --path:

python main.py --path path/to/your_config.yml

πŸ’– Support the project

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.

Buy Me A Coffee

πŸ™Œ Contributing

Feel free to:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Submit a pull request

I'd appreciate any feedback or code reviews you might have!