How to Batch Create ProRes Proxies with FFmpeg and Bash

This article provides a complete Bash script and guide to automate the creation of low-resolution Apple ProRes proxy video files from high-resolution MOV source files using FFmpeg. You will learn how to set up the script, traverse directories, scale down video resolution, and output optimized editing proxies to speed up your video editing workflow.

The Bash Script

Save the following code into a file named make_proxies.sh in the directory containing your high-resolution MOV files:

#!/bin/bash

# Create a folder for the proxies if it doesn't exist
mkdir -p proxies

# Loop through all .mov files in the current directory (case-insensitive)
shopt -s nocaseglob
for file in *.mov; do
    # Prevent errors if no .mov files are found
    [ -e "$file" ] || continue

    # Extract the file name without the extension
    filename="${file%.*}"
    
    echo "Processing: $file"
    
    # Run FFmpeg to convert the video to ProRes Proxy
    ffmpeg -i "$file" \
           -c:v prores_ks \
           -profile:v 0 \
           -vendor ap10 \
           -pix_fmt yuv422p10le \
           -vf "scale=1280:-2" \
           -c:a copy \
           "proxies/${filename}_proxy.mov"
done
shopt -u nocaseglob

echo "All proxies generated successfully in the 'proxies' directory."

How the Script Works

How to Run the Script

  1. Install FFmpeg: Ensure you have FFmpeg installed on your system. You can install it via Homebrew on macOS (brew install ffmpeg) or APT on Ubuntu (sudo apt install ffmpeg).

  2. Make the script executable: Open your terminal, navigate to the folder containing your script, and run the following command:

    chmod +x make_proxies.sh
  3. Execute the script: Run the script in the terminal:

    ./make_proxies.sh

Once the process finishes, you will find all your newly created low-resolution ProRes Proxy files in the newly generated proxies folder.