pandas 3 Migration Guide: Copy-on-Write, str Dtype, pd.col and Faster read_csv (2026) Python multiprocessing Tutorial: Pool, ProcessPoolExecutor, Queues and Locks (2026) YOLO26 Object Detection in Python with Ultralytics: Detect, Count, Track and Export (2026) Remove Background from Image in Python with rembg: Models, Batch, Masks and CLI (2026) FastAPI File Upload Tutorial: UploadFile, Multiple Files, Validation and Size Limits (2026) Ollama Python Tutorial: Run Local LLMs with Chat, Streaming, Structured Outputs, Tools and Embeddings (2026) Python sqlite3 Tutorial: Tables, Transactions, JSON and Upserts with the Built-in Database (2026) Convert Python to EXE with PyInstaller: One-File Apps, Data Files and Hidden Imports (2026) Two-Factor Authentication in Python with pyotp: TOTP, QR Codes and FastAPI (2026) Hash Passwords in Python with Argon2: pwdlib, argon2-cffi and bcrypt Migration (2026) Encrypt and Decrypt in Python with Fernet: Strings, Files and Passwords (2026) psutil Tutorial: Monitor CPU, Memory, Disk and Processes in Python (2026) PyMuPDF Tutorial: PDF to Image, Extract Text and Images in Python (2026) MoviePy 2 Tutorial: Edit Videos with Python (Trim, Text, Merge, Audio) 2026 FastAPI Dependency Injection with Depends: Annotated, Yield and Overrides (2026) HTML to PDF in Python with WeasyPrint and Jinja2: Invoices and Reports (2026) Extract Tables from PDF in Python with pdfplumber: CSV, Excel and pandas (2026) OCR in Python: Extract Text from Images and Scanned PDFs with RapidOCR (2026) Text to Speech in Python with Piper: Offline Natural Voices, WAV Files and a TTS API (2026) Speech to Text in Python with faster-whisper: Transcribe Audio and Make Subtitles (2026) Send Email with Python: smtplib, HTML, Attachments and Bulk Mail (2026) Python QR Code Generator: Styled QR Codes with qrcode (2026) Pillow 13: Resize, Crop and Watermark Images in Python (2026) Parallel Programming with Dask in Python 2026: Intro Guide MarkItDown: Convert Files to Markdown for LLMs in Python (2026) Plotly Express: Interactive Charts in Python (2026) pandera: Validate pandas DataFrames in Python (2026) jsonschema: Validate JSON Data in Python (2026) Faker: Generate Fake Test Data in Python (2026) RapidFuzz: Fuzzy String Matching in Python (2026) View all in this category →

Build an Auto YouTube Shorts Maker in Python (Text to Video, Voice, Captions) 2026 – Source Code

Build a Python tool that turns a plain text file into a finished 1080x1920 vertical video for YouTube Shorts, Reels or TikTok: a neural voice and word timings with edge-tts, a moving neon background made with NumPy, word-by-word highlighted captions drawn with Pillow, a title card and a subscribe card with MoviePy 2's TextClip, all put together with one command. Includes a batch mode that makes a Short for every script in a folder.

Duration
15:14 (13 chapters)
Tools
Python 3.13, MoviePy 2.2.1, edge-tts 7.3.1, NumPy, Pillow, VS Code

Watch the tutorial

Watch on YouTube

Chapters

  1. 0:0001. Intro: the finished Short
  2. 0:1902. The plan: text file to finished Short
  3. 1:2003. Setup: install MoviePy 2 and edge-tts
  4. 2:0604. Voice and word timings with edge-tts
  5. 3:4205. Moving neon background with NumPy
  6. 5:0706. Word-by-word captions with Pillow
  7. 6:1007. Title card and subscribe card with TextClip
  8. 6:5508. make_short.py: one command builds the Short
  9. 8:5809. Make your own Short and change the voice
  10. 10:1110. Bonus: batch mode, a Short for every script
  11. 11:4111. Customize the look: colours, captions and cards
  12. 12:5812. Common errors and quick fixes
  13. 14:0613. Recap and next steps

What's in the zip

  • python-auto-shorts-maker/.gitignore
  • python-auto-shorts-maker/HOW_TO_RUN.txt
  • python-auto-shorts-maker/LICENSE
  • python-auto-shorts-maker/MANIFEST.sha256
  • python-auto-shorts-maker/PLAN.md
  • python-auto-shorts-maker/README.md
  • python-auto-shorts-maker/background.py
  • python-auto-shorts-maker/batch.py
  • python-auto-shorts-maker/captions.py
  • python-auto-shorts-maker/cards.py
  • python-auto-shorts-maker/fonts/DejaVuSans-Bold.ttf
  • python-auto-shorts-maker/fonts/LICENSE-DejaVu.txt
  • python-auto-shorts-maker/make_short.py
  • python-auto-shorts-maker/requirements.txt
  • python-auto-shorts-maker/script.txt
  • python-auto-shorts-maker/scripts/list_tip.txt
  • python-auto-shorts-maker/scripts/made_by_python.txt
  • python-auto-shorts-maker/voice.py

How to run

Python 3.10+ (tested with 3.13). Works on Windows, macOS and Linux. Run every command from the folder. The voice needs an internet connection.

python -m venv .venv
source .venv/bin/activate        (Windows: .venv\Scripts\activate)
pip install -r requirements.txt
mkdir out
python make_short.py script.txt
python make_short.py script.txt --voice en-US-AvaNeural --out out/ava.mp4
python batch.py

See HOW_TO_RUN.txt for every step and the common errors, and README.md for the script format and options.

Media

No video, music or stock footage is bundled or needed. The background is generated with NumPy, the voice comes from edge-tts, and the DejaVu Sans Bold font is included under its own free licence.

Next step

New to MoviePy? The free MoviePy 2 Tutorial code is here too, and so is the Python for Data Engineering full course.

Download source code

File: python-auto-shorts-maker-code.zip

Size: 357.3 KB (365,923 bytes)

SHA-256:
4c89b4f0bf4d230f19f912bbd53effb793c94838fd85b8e0cee43abda9512e9a

Licence: code is released under the MIT licence, copyright PyInns. See LICENSE and README inside the zip. Free learning code, not production code.