/media-os:media-ffmpeg-normalize [input]from media-os
Batch-normalizes audio files to EBU R128 loudness using ffmpeg-normalize. Supports 2-pass loudnorm, target LUFS/TP/LRA, stream preservation, and batch processing across directories.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
ffmpeg-normalize is a Python wrapper around ffmpeg's loudnorm filter that automates proper 2-pass EBU R128 normalization, batch directories, and preserves non-audio streams. Raw loudnorm is 1-pass by default (dynamic, inaccurate); this tool does the measure-then-apply pass automatically.
ffmpeg-normalize in.mp3 -o out.mp3 → Step 3ffmpeg-normalize in.wav -t -14 -o out.wav → Step 2ffmpeg-normalize episodes/*.mp3 -of out/ -t -16 -tp -1.5 -lrt 11 → Step 3ffmpeg-normalize in.mp4 -c:a aac -b:a 192k -o out.mp4 → Step 3loudnorm JSON round-trip yourself (see ffmpeg-audio-filter skill if you need manual control).loudnorm with a shared measurement, per the ffmpeg-audio-filter skill.pip install ffmpeg-normalize
# or with uv
uv tool install ffmpeg-normalize
Requires ffmpeg on PATH. Verify:
ffmpeg-normalize --version
ffmpeg -hide_banner -filters | grep loudnorm
Decide the three EBU R128 parameters:
| Flag | Meaning | Typical value |
|---|---|---|
-t | Integrated loudness (LUFS) | -23 broadcast EBU R128, -24 ATSC A/85, -16 Apple Podcasts, -14 YouTube/Spotify |
-tp | True peak ceiling (dBFS) | -1.0 to -2.0 (use -1.5 as default) |
-lrt | Loudness range target (LU) | 11 broadcast / podcast, omit for streaming (no clamp) |
Rule of thumb: broadcast = -23 LUFS, podcast = -16 LUFS, streaming = -14 LUFS. See references/normalize.md for the full platform table.
Single file:
ffmpeg-normalize input.mp3 -o output.mp3 -t -16 -tp -1.5 -lrt 11
Folder (glob expanded by shell):
ffmpeg-normalize in/*.mp3 -of out/ -t -16 -tp -1.5 -lrt 11 --progress
Video (copy video, re-encode audio — REQUIRED since raw can't be muxed back):
ffmpeg-normalize in.mp4 -c:a aac -b:a 192k -o out.mp4
The helper script:
uv run ${CLAUDE_SKILL_DIR}/scripts/normalize.py preset --input in.mp3 --output out.mp3 --platform apple-podcasts
uv run ${CLAUDE_SKILL_DIR}/scripts/normalize.py batch --indir episodes/ --outdir normalized/ --platform spotify
Dry-run first:
ffmpeg-normalize in.mp3 -o out.mp3 --dry-run
Measure the output to confirm it hit the target:
ffmpeg -i out.mp3 -af ebur128=peak=true -f null - 2>&1 | tail -20
# Look for: I: (integrated LUFS), LRA, True peak
Or use --print-stats / --debug during the normalize run to emit per-file loudnorm JSON.
scripts/normalize.py — check / normalize / preset / batch subcommands wrapping ffmpeg-normalize; stdlib only.references/normalize.md for the platform target table, LUFS/dBFS/LRA concepts, raw-loudnorm vs wrapper comparison, and recipe book.loudnorm).-t -14 for YouTube/Spotify or -t -16 for Apple Podcasts.-t = integrated loudness (LUFS); -tp = true peak (dBFS, typically -1 to -2); -lrt = loudness range target (LU).loudnorm with a shared measurement (see ffmpeg-audio-filter).-c:a aac is REQUIRED for MP4 output (or pcm_s16le for WAV). Default encoder is pcm_s16le which only works in raw/WAV containers.-c:v copy is the default for video — the video stream is never re-encoded.-of output/ (output folder) creates the dir if missing. Naming convention: output/<original-filename>.<ext>.--keep-loudness-range-target preserves source LRA (don't compress dynamics).--dual-mono auto-detects dual-mono and compensates (-3 dB, per EBU spec).--lower-only only reduces level, never boosts — useful when you don't want to amplify quiet source noise.--extra-input-options / --extra-output-options pass arbitrary flags through to ffmpeg (e.g., -ar 44100).--progress shows a tqdm progress bar.--keep-lra-above-loudness-range-target when source LRA exceeds target.volume= filter after normalization — it defeats the normalization.ffmpeg-normalize podcast/*.mp3 \
-of podcast-normalized/ \
-t -16 -tp -1.5 -lrt 11 \
-c:a libmp3lame -b:a 192k \
--progress
ffmpeg-normalize talk.mp4 \
-t -14 -tp -1.0 \
-c:a aac -b:a 192k \
-o talk-yt.mp4
ffmpeg-normalize *.wav -of out/ -t -23 --dry-run --print-stats
ffmpeg-normalize noisy/*.wav -of safe/ -t -23 --lower-only
ffmpeg-normalize in.mkv -o out.mkv --audio-stream-filter "a:1" -c:a aac
Output file does not contain any stream or missing audio in MP4Cause: Default codec pcm_s16le can't be muxed into MP4.
Fix: Add -c:a aac -b:a 192k (or -c:a libmp3lame for MP3 output).
Cause: Default target is -23 LUFS (broadcast). Streaming targets are louder.
Fix: Use -t -14 (YouTube/Spotify) or -t -16 (Apple Podcasts).
Cause: Expected — each file is normalized to the target independently. Quiet originals get boosted to target; loud originals get cut.
Fix: Use manual 2-pass loudnorm with a single concatenated measurement, or process all files together via the ffmpeg-audio-filter skill.
Cause: -tp default is -2 but inter-sample peaks can still exceed on some chains.
Fix: Tighten to -tp -1.5 or -tp -2.0; do not go above -1.0.
RuntimeError: Could not find ffmpegCause: ffmpeg not on PATH.
Fix: Install ffmpeg (brew install ffmpeg on macOS) or set FFMPEG_PATH=/path/to/ffmpeg.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
/audio-pipewireRoute and introspect Linux audio/video/MIDI graphs with PipeWire: pw-cli (interactive object/module control), pw-dump (full graph JSON with --monitor), pw-link (list/create/destroy port links), pw-cat / pw-play / pw-record (playback+record), pw-top (real-time DSP load + xrun viewer), pw-metadata (shared metadata store), pw-loopback (source/sink bridges), pw-midiplay/pw-midirecord, pw-jack (JACK client compat shim), pw-mon, pw-profiler. WirePlumber session manager handles routing/defaults/profiles. Replaces PulseAudio (via pipewire-pulse) and JACK (via libjack.so shim) simultaneously. Use when the user asks to route Linux audio, link two apps, list audio devices on Linux, create a loopback, record system audio, monitor the audio graph, or set up a virtual audio device on modern Linux.
/audio-wasapiManipulate Windows audio via WASAPI (learn.microsoft.com/coreaudio): SoundVolumeView + svcl.exe (NirSoft — set default device, per-app volumes, save/load profiles), AudioDeviceCmdlets PowerShell module (Get-AudioDevice, Set-AudioDevice, Get-AudioDevicePlaybackMute), nircmd setdefaultsounddevice. Shared mode (Windows engine resamples all streams to endpoint fixed format) vs Exclusive mode (bit-perfect, audiophile, ~sub-3ms latency with IAudioClient3 + event-driven callbacks). WASAPI then MMDevice then Audio Engine (audiodg.exe) then WDM/KS. ASIO is Steinberg's parallel stack bypassing Windows audio. Virtual audio devices: VB-Audio Virtual Cable, VoiceMeeter/Banana/Potato. Use when the user asks to change Windows default audio device, route app audio, use VoiceMeeter, install VB-Cable, set a specific device from PowerShell, or enable exclusive-mode low-latency output.
/cv-mediapipeGoogle MediaPipe Tasks API (current supported, NOT legacy mediapipe.solutions): Vision Tasks (Face Detector, Face Landmarker, Face Stylizer, Hand Landmarker, Gesture Recognizer, Pose Landmarker, Holistic Landmarker, Object Detector, Image Classifier, Image Segmenter, Interactive Segmenter, Image Embedder, Image Generator), Audio Tasks (Audio Classifier), Text Tasks (Text Classifier, Text Embedder, Language Detector), GenAI Tasks (LLM Inference — on-device Gemma/Phi-2/Falcon/StableLM). Three run modes: IMAGE, VIDEO, LIVE_STREAM (async). Python: mediapipe.tasks.python.vision/audio/text/genai. Docs at ai.google.dev/edge/mediapipe/solutions. Model Maker for transfer learning. Use when the user asks to detect pose/face/hand landmarks, classify an image, run a body-pose model, segment people, recognize gestures, do on-device LLM inference via MediaPipe, or build a mobile/embedded CV pipeline.
/cv-opencvComputer vision on images + video with OpenCV (docs.opencv.org/4.x/): core (Mat / ndarray, linalg), imgproc (filtering, morphology, geometric transforms, color conv, histograms, contours), imgcodecs (imread/imwrite — PNG, JPEG, TIFF, WebP, EXR), videoio (VideoCapture / VideoWriter — FFMPEG, GStreamer, V4L2, AVFoundation, MSMF backends), calib3d (camera calibration, stereo, solvePnP, homography), features2d (ORB, AKAZE, BRISK, KAZE, SIFT), objdetect (FaceDetectorYN, FaceRecognizerSF, HOG, ArUco, QRCode), dnn (ONNX/TF/Caffe/Darknet, CUDA + OpenVINO + Vulkan backends, model zoo at github.com/opencv/opencv_zoo), photo (inpainting, denoising, HDR Debevec/Robertson), stitching (panorama), video (optical flow Farneback/LK/DIS, BackgroundSubtractorMOG2/KNN, tracking KCF/CSRT/MIL/Nano/Vit/DaSiamRPN). Python-first via cv2. Use when the user asks to detect faces, track objects, run YOLO inference, capture + process webcam frames, calibrate a camera, stitch a panorama, or use OpenCV from Python/C++.
Other plugins' skills for the same job