Youtube Shorts Generator
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.
- Python 3.x (Tested with Python 3.13)
- Required Python libraries (listed in
requirements.txt
) ffmpeg
andffprobe
installed 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_here
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
Crank is fully configurable. You can adjust prompts, descriptions, upload behavior, and other settings using your preferred method.
Change the following directly in the file:
NAME
: the channel nameUPLOAD
:true
orfalse
to enable/disable uploadsDELAY
: number of hours between uploads:0
for instant upload, or any positive number to schedule the video that many hours later (defaults to2.5
)DESCRIPTION
: default video descriptionTAGS
: list of tags for each videoCATEGORY_ID
: defines video category (defaults to24
)FONT
: defines text font (defaults toComic Sans MS
)OAUTH_PATH
: path to OAuth credentials (defaults tosecrets.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 tosmall
)- Prompt configurations (
CONTENT_PROMPT
,GET_TITLE
,TERM_PROMPT
): control how transcripts, titles, and subjects are generated
- Clone the repository
git clone https://github.com/ecnivs/crank.git
cd crank
- Install dependencies
pip install -r requirements.txt
- 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
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
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.
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