FLAC to MP3 Converter - macOS Automator App
Quick Recreation Prompt
Create a macOS Automator application that converts FLAC audio files to MP3 format with the following requirements:
Technical Requirements
- Platform: macOS Automator application (double-click to run)
- Dependencies: ffmpeg (installed via Homebrew at /opt/homebrew/bin/ffmpeg)
- Interface: Native macOS dialogs using AppleScript (no Python GUI)
- Functionality:
- Browse and select folder containing FLAC files
- Choose MP3 bitrate (128k, 192k, 256k, 320k) with 320k as default
- Option to include/exclude subfolders (recursive search)
- Convert all FLAC files to MP3 in the same location
- Preserve metadata (artist, album, title, etc.)
- Show progress notifications during conversion
- Display completion summary (successful/failed/total)
Implementation Details
- Use bash shell script with AppleScript for dialogs
- Add Homebrew paths to PATH (/opt/homebrew/bin and /usr/local/bin)
- Check for ffmpeg installation before starting
- Use find command for file discovery (recursive or single-level)
- Use ffmpeg with flags: -ab for bitrate, -map_metadata 0, -id3v2_version 3
- Output MP3 files with same name as FLAC in same directory
- Handle user cancellation gracefully
- Suppress ffmpeg verbose output (stderr to /dev/null)
Key Features
- No Python dependencies (avoids Tkinter compatibility issues)
- Works on Apple Silicon and Intel Macs
- Simple double-click execution
- Native macOS look and feel
- Real-time progress notifications
- Error checking for missing dependencies
Deliverable
A complete bash script for Automator’s “Run Shell Script” action that can be saved as a standalone macOS .app file.
Step-by-Step Recreation Instructions
- Open Automator ? New Document ? Application
- Add “Run Shell Script” action
- Set “Pass input:” to “as arguments”
- Paste the complete shell script
- Save as “FLAC to MP3 Converter.app”
- Ensure ffmpeg is installed: brew install ffmpeg
- Double-click the app to use
Expected User Experience
- User double-clicks app
- Folder selection dialog appears
- Bitrate selection dialog appears (4 options)
- Include subfolders dialog appears (Yes/No)
- Notification shows conversion starting
- Progress notifications for each file
- Completion dialog shows final results
- MP3 files created alongside original FLACs
Prerequisites for Users
- macOS (any modern version)
- Homebrew installed (brew.sh)
- ffmpeg installed (brew install ffmpeg)
- FLAC files to convert
Troubleshooting Notes
- If “ffmpeg not found” error: Add Homebrew paths to script PATH
- If app shows gear but nothing happens: Use shell script approach, not Python
- If permission denied: Right-click app ? Open (first time only)
- Apple Silicon Macs: ffmpeg location is /opt/homebrew/bin/ffmpeg
- Intel Macs: ffmpeg location is /usr/local/bin/ffmpeg
Tagged .