Audio mixing mastering

From calesthio/generative-media-skills · View interactive version

Audio mixing mastering is an AI agent skill from the GitHub repository calesthio/generative-media-skills. Provider-independent audio mixing and mastering direction for AI agents finishing generated videos, ads, trailers, explainers, podcasts, recuts, avatar clips, music videos, documentaries, and social content. Use when planning, mixing, repairing, mastering, QCing, or delivering dialogue, music, ambie

How to use this skill

Skill file

Audio Mixing and Mastering Direction

Use this skill when audio must survive real playback: phone speakers, earbuds, laptops, TV soundbars, cinema-style trailers, podcasts, client review links, broadcast deliveries, and social feeds. Treat the mix as a production decision, not as a last-minute normalization step.

The job is to make the audience understand the foreground, feel the intended energy, avoid fatigue or distortion, and pass the declared delivery spec.

Start with the audio contract

Before touching levels, write a short audio contract for the project:

Do not master blindly to the loudest reference. Streaming and broadcast systems may normalize loudness, and over-limiting can reduce clarity while gaining little or nothing at playback.

Evidence categories

Documented facts:

Bundled loudness measurement tool

Use scripts/measure_loudness.py when an agent needs a repeatable local measurement before making mix or delivery decisions. It requires Python 3.11+ and an ffmpeg executable with the loudnorm filter. The script invokes FFmpeg with an argument array rather than a shell, selects the first audio stream, and emits stable JSON. It never normalizes, rewrites, or replaces the input.

Measure without assuming a target:

python scripts/measure_loudness.py final_mix.wav --pretty

Compare against an explicitly selected project target:

python scripts/measure_loudness.py final_mix.wav \
	--target-lufs -16 --lufs-tolerance 1 \
	--target-true-peak -1 --pretty

For mono files intended to play from both speakers as dual mono, request FFmpeg's dual-mono compensation explicitly:

python scripts/measure_loudness.py narration_mono.wav --dual-mono --pretty

The JSON report includes:

Exit codes are:

This tool is deterministic assistance, not final mix approval. Listen to the complete deliverable, confirm the selected target is authoritative, inspect channel layout and codec behavior, and remeasure encoded outputs when delivery risk warrants it. Use a proper calibrated meter or the receiver's mandated QC system when the specification requires one.

Empirical observations:

Production heuristics:

Session prep

Make a reproducible session before processing:

  1. Confirm sample rate, frame rate, timecode, duration, and target container.
  2. Keep an untouched copy of every source. Never destructively overwrite original VO, music, SFX, or stems.
  3. Group tracks by role: dialogue/VO, production dialogue, ADR, translated VO, music, score, stingers, SFX, ambience/room tone, UI sounds, captions/audio description references.
  4. Align all audio to picture and check sync at the start, middle, and end.
  5. Remove dead air only where it does not break natural timing. Preserve room tone or ambience under edits.
  6. Mark problem regions: clipped words, plosives, sibilance, room noise, hum, AI artifacts, music masks, SFX spikes, silence gaps, and scene transitions.
  7. Decide whether to mix from stems, flattened source, or a hybrid. If sources are flattened, note what cannot be fixed cleanly.

If receiving only a final exported video, demux audio for analysis, but keep picture reference locked. If receiving multitrack/stems, avoid mastering the stereo mix until stem balance is correct.

Balance and hierarchy

Build the mix from the foreground outward:

Do not solve a balance problem only with a limiter. If the voice disappears under music, reduce or carve the music. If SFX feel too sharp, shape the SFX. If the master misses target loudness after the mix feels right, then use bus gain/limiting carefully.

Dialogue and voice treatment

For spoken-word content:

If AI voice artifacts remain audible, prefer localized repairs: replace the line, regenerate the phrase, use spectral repair, trim clicks, redraw fades, or edit breaths. Broadband noise reduction on the full VO can make artifacts worse.

Music treatment

Music must be licensed, appropriate, and technically controlled:

Sound effects and ambience

SFX should clarify action, scale, or emotion:

EQ, compression, reverb, and limiting

Use processing to solve named problems:

Limiter safety:

Loudness target selection

Prefer this order:

  1. Client/broadcaster/platform delivery spec.
  2. The strictest spec among intended destinations, if one master must serve all.
  3. Separate masters per destination when quality matters and specs conflict.
  4. A documented project heuristic when no official target exists.

Useful target map, verified 2026-07-10:

| Destination | Documented or working target | True peak | Notes |

|---|---:|---:|---|

| EBU R 128 broadcast/program exchange | -23 LUFS | -1 dBTP | Use compliant meter; measure full programme. Practical target tolerance may be +/-1 LU; QC measurement tolerance may be +/-0.2 LU. |

| ATSC A/85 TV delivery/exchange without metadata | -24 LKFS | -2 dBTP | Long-form dialogue loudness; short-form full-program mix loudness per A/85 quick reference. |

| ATSC A/85 streaming services | -23 to -27 LKFS | -2 dBTP | Unless prior arrangement says otherwise. |

| Netflix branded content | -27 LKFS +/-2 LU dialog-gated | -2 dBTP | Requires full spec compliance and stems/format rules. |

| Apple Podcasts | about -16 dB LKFS, +/-1 dB | -1 dB FS true peak | Precondition before encoding. |

| Spotify music | -14 dB integrated LUFS | below -1 dBTP, or below -2 dBTP if louder than -14 LUFS | Platform-specific music guidance. |

| AES internet audio examples | speech/assorted around -18 LUFS; music -16 LUFS track-normalized; album loudest track -14 LUFS | -1 dBTP at lossy codec input | For distributors; useful context for producers. |

| YouTube upload | no official loudness target found on upload help page | use project heuristic | Official page lists audio bitrates, not a loudness target. |

| General speech-first social/web video | -16 to -14 LUFS heuristic | -1 to -2 dBTP heuristic | Check speech clarity on phone/laptop/earbuds. |

Never convert these targets into universal rules. If the client asks for a spec, obey the client. If the destination will normalize loudness, prioritize clean transients, dialogue clarity, and codec-safe peaks.

Stereo, mono, surround, and immersive

For stereo/social:

For 5.1/7.1/Atmos/immersive:

Accessibility and intelligibility

Treat clear speech as an accessibility requirement:

Stems and deliverables

Plan deliverables before final mix export:

Stems must sum cleanly to the full mix unless the client explicitly requests differently. Check that stem exports start at the same timecode, same sample rate, same length, same channel layout, and no hidden master-bus processing is missing. If master-bus compression or limiting changes the balance, either print processed stems through the bus in solo-safe groups or document that stems are pre-master elements.

Repair and iteration workflow

When a mix fails, diagnose by symptom:

Iterate in this order: source repair, edit cleanup, balance automation, track processing, bus processing, loudness normalization, encode check, final QC. Late mastering should not hide known source or edit defects.

Final audio QA

Before delivery, create a concise QA note:

If the project has multiple outputs, QA each exported file, not just the first master.

Complete examples

Example: speech-first social explainer

Production intent: 60-second vertical explainer with AI narration, light music bed, UI clicks, and subtitles for Instagram/TikTok/YouTube Shorts. No formal platform loudness spec supplied.

Direction:

Expected result: narration is intelligible on phone speakers, music feels present but not competitive, no clipping after encode, and client can revise music without rebuilding VO.

Likely failure modes: too much high-mid EQ on AI voice, pumping music duck, clicks from VO edits, SFX peaks causing limiter gain reduction.

Example: podcast/video recut from noisy remote interview

Production intent: 18-minute podcast highlight video assembled from two remote speakers, intro music, outro ad tag, and occasional lower-thirds.

Direction:

Expected result: speakers feel matched, background noise is reduced but natural, intro/outro are not startling, and listeners do not ride the volume.

Likely failure modes: over-denoising, clipping preserved from source, one speaker much brighter/louder, music intro hitting the limiter and lowering subsequent speech.

Example: trailer/ad with VO, music, hits, and broadcast-style client review

Production intent: 30-second product trailer with cinematic music, VO, whooshes, impacts, and final logo sting. Client may place it on paid social and possibly broadcast later.

Direction:

Expected result: the trailer feels big without masking the message, has safe peaks for lossy platforms, and can be re-versioned for broadcast with stems.

Likely failure modes: SFX hits forcing limiter pumping, music masking final CTA, mono fold-down losing wide risers, broadcast version made by only lowering the social master instead of remixing to spec.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.