Batch Convert Videos to 720p in Subfolders (Python)

Batch Convert Videos to 720p in Subfolders (Python)

Ever open a folder of videos and realize you have way too many to convert one by one? Same. I built this because I had hundreds to re-upload in a second format, and manual conversion was not happening.

This setup lets you batch convert anything over 720p into a new 720p file across every subfolder, while keeping your original files untouched.

Find the Zip File with both the script and bat file HERE

Who this is for

This is for anyone with a lot of videos, especially if:

  • Your videos live in nested folders (one folder per shoot, scene, project, etc.)
  • You need a smaller “web version” (720p) for uploads, backups, or quick reuse
  • You want automation that does not destroy your original files

Why 720p is usually enough

If you’re uploading to platforms, sending previews, building a second format library, or just trying to save storage, 720p is often the sweet spot.

You get:

  • Smaller files (less storage, faster uploads)
  • Still solid quality for web playback
  • One consistent “standard version” across your library

The simple mental model (recipe style)

If this stuff always feels confusing, here’s the easiest way to think about it:

  • Terminal is the kitchen. It’s where you run commands.
  • FFmpeg is the blender. It does the actual video conversion.
  • Python script is the recipe card. It tells FFmpeg what to do, for which files, in which folders.

Same kitchen, different tools, one job.


What this script does

When you run it, the script scans your current folder and all subfolders, then:

  1. Checks each video’s resolution using FFprobe
  2. Converts only videos that are higher than 720p
  3. Saves a new file next to the original as *_720.mp4
  4. Skips files you do not want converted (previews, trailers, etc.)

Your originals are never overwritten. The whole point is safe batch conversion.

Quick Start (do this first)

If you do one thing before converting, do this.

  1. Put convert_720p.py and convert_720p.bat into the main folder that contains your subfolders
  2. Run a dry run:
  • python convert_720p.py --dry-run

That will show you what would convert and what would be skipped, without changing anything.

Then when it looks right, run:

  • Double-click convert_720p.bat on Windows
    or
  • python convert_720p.py

What it converts (and what it skips)

Converts

  • .mp4, .mov, .mkv
  • Anything above 720p (1080p, 4K, etc.)
  • Files in the main folder and all subfolders

Skips

It skips files if:

  • The filename contains keywords like: trailer, preview, gif, gifs, promo, compressed, blur, blurred, highlight
  • The video is already 720p or lower
  • A converted version already exists (_720.mp4 or _720p.mp4)

Here’s what that looks like in real life:

  • scene_preview.mp4 gets skipped
  • promo_clip.mov gets skipped
  • full_scene_1080p.mp4 converts to full_scene_1080p_720.mp4

Important: folder-level skipping (read this)

This is the part that trips people up.

If a folder contains any _720.mp4 or _720p.mp4, the script skips that entire folder.

Why? Because it prevents you from accidentally reprocessing a folder you already handled. Subfolders still get checked normally, so you can re-run the script without fear.

If you expected it to process a folder and it did nothing, check whether that folder already contains a _720 file.


How the conversion is done (quality settings)

The script uses FFmpeg settings that balance “looks good” with “doesn’t explode file size.”

  • Scale: -2:720 (keeps aspect ratio and avoids weird widths)
  • Codec: H.264 (libx264)
  • Quality: CRF 23
  • Speed preset: slow (better compression, less bloat)
  • Audio: AAC 160 kbps

If conversion feels slow, that is normal. The slow preset is doing its job.


What you’ll see while it runs

The script prints what it’s doing as it goes:

  • Which folder it’s checking
  • What files it found
  • Why something got skipped
  • What it is converting (and the detected resolution)

At the end it prints a summary, including:

  • Total videos found
  • Skipped by keyword
  • Skipped because already 720p or lower
  • Skipped because output already exists
  • Converted and failed totals

Safety features you’ll be glad you have

It never overwrites originals

All outputs are new files ending in _720.mp4. Your source files stay intact.

It warns about “probably broken” outputs

If it finds _720.mp4 files under 500KB, it flags them as likely interrupted conversions. You can delete those and rerun.

Clean stop support

Press Ctrl+C and it will try to clean up the partial output file for the current conversion.

Still Nervous?

Create a system restore point in case of any accidents


Troubleshooting (quick fixes)

“Python is not recognized”

Python is not installed or not in your PATH. Install Python 3 and make sure “Add Python to PATH” is checked.

“FFmpeg and/or FFprobe not found”

FFmpeg is not installed or not in your PATH. Confirm ffmpeg runs in Command Prompt.

“It skipped a folder I wanted”

Look inside that folder. If there is any _720.mp4 or _720p.mp4 file, the script will skip the entire folder.

“Why didn’t it convert this file?”

Most common reasons:

  • The filename contains a skip keyword like preview or promo
  • It is already 720p or lower
  • A _720.mp4 already exists

Conclusion

If you have a ton of videos and you want a clean 720p library without doing manual conversions, this script is the easy button. Start with a dry run, confirm what it will touch, then run the batch and let it chew through your folders.

Find the Zip File with both the script and bat file HERE

Scroll to Top