High Quality Audio Extractor
Video Converter for macOS in TERMINAL
This script automatically extracts audio from .mp4, .mov, .mkv, or .m4v video files and converts them into high-quality .mp3 format.
It uses FFmpeg with the LAME MP3 encoder for efficient audio conversion while preserving sound quality.
Automatically processes all supported video files found in the selected folder and saves the resulting MP3 files into a converted_target folder.
Suitable for interviews, recorded calls, podcasts, voice recordings, transcription workflows, and audio archiving.
Integration
◉ Step 1 Install in TERMINAL – ffmpeg and bc via Homebrew (once):
To install it, just paste in terminal this code- brew install ffmpeg bc
◉ Step 2 Create a folder on your Desktop (e.g. convert-videos) and drop your videos inside.
◉ Step 3 Open TextEdit → Set format to Plain Text
→ Copy ONE of the SCRIPTS BELOW and Paste it in the TextEdit
→ Save it with name: extract_mp3.sh
→ Make sure the file is placed inside the convert-videos folder on your Desktop.
◉ Step 4 Make it executable, and Run it in Terminal:chmod +x ~/Desktop/convert-videos/extract_mp3.sh
cd ~/Desktop/convert-videos && chmod +x extract_mp3.sh && ./extract_mp3.sh
Script 1
Video to MP3 Audio Extractor
#!/bin/bash
mkdir -p converted_target
find . -type f (
-iname "*.mp4" -o
-iname "*.mov" -o
-iname "*.mkv" -o
-iname "*.m4v"
) -exec sh -c '
for f do
ffmpeg -y -i "$f"
-vn
-c:a libmp3lame
-q:a 2
"converted_target/$(basename "${f%.*}").mp3"
done
' sh {} +
echo "Done."
Script 2
Batch Video Compressor (50MB Target)
NEED Higher or Lower Quality?
Look inside the script for:
-q 2
You can change the value:
-q 0 = highest MP3 quality, larger files
-q 2 = recommended balance
-q 4 = smaller files, slightly lower quality
-q 6 = much smaller files, noticeable quality loss
