Mac Terminal Workflow — Complete Documentation
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/usr/local/Homebrew/usr/local/share/zsh, /usr/local/var/homebrewecho 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile eval "$(/usr/local/bin/brew shellenv)"
brew --version
brew install ffmpeg
Error: Failed to download resource "opus (1.6.1)"Download failed: https://github.com/xiph/opus/releases/download/v1.6.1/opus-1.6.1.tar.gzcurl: (22) The requested URL returned error: 404
Reason: The Opus dependency URL was broken on the server.
cd ~/Downloads unzip ffmpeg-126126-gdab32dcc212.zip sudo mkdir -p /usr/local/bin sudo mv ffmpeg /usr/local/bin/ sudo chmod +x /usr/local/bin/ffmpeg sudo xattr -dr com.apple.quarantine /usr/local/bin/ffmpeg
| Command | Purpose |
|---|---|
cd ~/Downloads | Navigate to Downloads folder |
unzip ffmpeg-*.zip | Extract FFmpeg binary |
sudo mkdir -p /usr/local/bin | Create bin directory |
sudo mv ffmpeg /usr/local/bin/ | Move FFmpeg to bin |
sudo chmod +x | Make executable |
sudo xattr -dr com.apple.quarantine | Remove macOS Catalina quarantine |
ffmpeg -version
ffmpeg -encoders 2>&1 | grep aac
ffmpeg -formats 2>&1 | grep hls
ffmpeg -f lavfi -i "sine=frequency=440:duration=2" -c:a aac -f hls -hls_time 10 -hls_playlist_type vod -hls_segment_filename "test_%03d.ts" "test.m3u8"
ls -la test*
rm test.m3u8 test_*.ts
Before converting to HLS, your audio should be properly mastered for streaming. Here's the complete mastering workflow used for "Only Now".
| Order | Process | Purpose |
|---|---|---|
| 1 | EQ (Equalization) | Balance frequencies |
| 2 | Compression | Control dynamics |
| 3 | Stereo Enhancement | Widen the sound |
| 4 | Limiting | Set final loudness |
| 5 | Loudness Normalization | Match streaming standards |
| Platform | Target LUFS | True Peak |
|---|---|---|
| Spotify | -14 LUFS | -1 dBTP |
| Apple Music | -16 LUFS | -1 dBTP |
| YouTube | -14 LUFS | -1 dBTP |
| This Platform | -14 LUFS | -1 dBTP |
ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" -af loudnorm=print_format=json -f null - 2>&1 | grep -E "input_i|input_tp|input_lra|input_thresh"
ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" \ -af loudnorm=I=-14:TP=-1:LRA=11 \ -c:a pcm_s16le \ "Only_now_Mastered_14LUFS.wav"
ffmpeg -i "Only_now_Mastered_14LUFS.wav" \ -af "equalizer=f=60:width_type=o:width=2:g=2,equalizer=f=120:width_type=o:width=1:g=1,equalizer=f=3000:width_type=o:width=1:g=1.5,equalizer=f=10000:width_type=o:width=2:g=1" \ -c:a pcm_s16le \ "Only_now_Mastered_EQ.wav"
ffmpeg -i "Only_now_Mastered_EQ.wav" \ -af "acompressor=threshold=-18dB:ratio=3:1:attack=20:release=250:makeup=3" \ -c:a pcm_s16le \ "Only_now_Mastered_Comp.wav"
ffmpeg -i "Only_now_Mastered_Comp.wav" \ -af "alimiter=limit=-1dB:attack=5:release=50" \ -c:a pcm_s16le \ "Only_now_FINAL_MASTER.wav"
ffmpeg -i "input.wav" \ -af "loudnorm=I=-14:TP=-1:LRA=11,equalizer=f=60:width_type=o:width=2:g=2,equalizer=f=3000:width_type=o:width=1:g=1.5,acompressor=threshold=-18dB:ratio=3:1:attack=20:release=250:makeup=3,alimiter=limit=-1dB:attack=5:release=50" \ -c:a pcm_s16le \ "output_FINAL_MASTER.wav"
| Process | Parameter | Value | Purpose |
|---|---|---|---|
| Loudness Norm | I=-14 | -14 LUFS | Match Spotify/YouTube standard |
| True Peak | TP=-1 | -1 dBTP | Prevent clipping |
| LRA | LRA=11 | 11 LU | Dynamic range target |
| EQ: Bass | f=60, g=2 | +2 dB @ 60Hz | Add low-end warmth |
| EQ: Presence | f=3000, g=1.5 | +1.5 dB @ 3kHz | Add vocal clarity |
| Compressor | threshold=-18dB | -18 dB | Start compression |
| Ratio | ratio=3:1 | 3:1 | Moderate compression |
| Attack | attack=20 | 20ms | Fast attack |
| Release | release=250 | 250ms | Smooth release |
| Limiter | limit=-1dB | -1 dB | Absolute ceiling |
ffmpeg -i "Only_now_FINAL_MASTER.wav" -af loudnorm=print_format=json -f null - 2>&1 | grep -E "input_i|input_tp|input_lra"
cd ~/Desktop/amusicconvert
ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" 2>&1 | grep Duration
Duration in seconds: 3 × 60 + 26 = 206 seconds
ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" -c:a aac -b:a 128k -f hls -hls_time 10 -hls_playlist_type vod -hls_segment_filename "Only_now_%03d.ts" "Only_now.m3u8"
| Flag | Purpose |
|---|---|
-i "file.wav" | Input file |
-c:a aac | Audio codec: AAC |
-b:a 128k | Bitrate: 128 kbps |
-f hls | Format: HLS |
-hls_time 10 | 10 seconds per segment |
-hls_playlist_type vod | Video on Demand |
-hls_segment_filename "name_%03d.ts" | Segment naming pattern |
"name.m3u8" | Output playlist file |
ls -la Only_now*
ffmpeg -i "filename.wav" 2>&1 | grep Duration
Go to: https://www.jaysoftware.co.uk/af/music/tenant_login.php
Go to: https://www.jaysoftware.co.uk/af/music/admin/upload_advanced.php
| Field | Value |
|---|---|
| Upload Type | Pre-converted HLS |
| Track Title | Only Now |
| Genre | Select genre |
| Price | £4.99 |
| Duration | 206 |
| File | Description |
|---|---|
Only_now.m3u8 | HLS Playlist |
Only_now_000.ts through Only_now_020.ts | Audio segments (select all) |
Click "Upload Track"
sudo mv ~/Downloads/ffmpeg /usr/local/bin/ sudo chmod +x /usr/local/bin/ffmpeg
sudo xattr -dr com.apple.quarantine /usr/local/bin/ffmpeg
The static build includes Opus already — no need to install separately.
# Homebrew Install /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile eval "$(/usr/local/bin/brew shellenv)" brew --version brew install ffmpeg # FAILED - opus 404 error # Static FFmpeg Download & Install cd ~/Downloads unzip ffmpeg-126126-gdab32dcc212.zip sudo mkdir -p /usr/local/bin sudo mv ffmpeg /usr/local/bin/ sudo chmod +x /usr/local/bin/ffmpeg sudo xattr -dr com.apple.quarantine /usr/local/bin/ffmpeg ffmpeg -version # Mastering Chain ffmpeg -i "input.wav" -af loudnorm=print_format=json -f null - 2>&1 | grep -E "input_i|input_tp|input_lra" ffmpeg -i "input.wav" -af "loudnorm=I=-14:TP=-1:LRA=11,equalizer=f=60:width_type=o:width=2:g=2,equalizer=f=3000:width_type=o:width=1:g=1.5,acompressor=threshold=-18dB:ratio=3:1:attack=20:release=250:makeup=3,alimiter=limit=-1dB:attack=5:release=50" -c:a pcm_s16le "output_FINAL_MASTER.wav" # Convert Audio cd ~/Desktop/amusicconvert ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" 2>&1 | grep Duration ffmpeg -i "Only_now_Written_by_Daniel_Mason_Track_02_master.wav" -c:a aac -b:a 128k -f hls -hls_time 10 -hls_playlist_type vod -hls_segment_filename "Only_now_%03d.ts" "Only_now.m3u8" ls -la Only_now*
Homebrew works but may fail on older macOS versions
Static FFmpeg from evermeet.cx is the most reliable option
Always remove quarantine on macOS Catalina with xattr -dr
Master to -14 LUFS for streaming compatibility
Duration = (minutes × 60) + seconds
Upload .m3u8 + ALL .ts files together
Server doesn't have FFmpeg — always pre-convert locally