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)