# Audio and video moderation

Audio (beta) · Video (beta)

Audio and video uploads always return `pending` and run in the background, including when `queue=false`. Retrieve the asset or subscribe to classification events to obtain the final decision. Inputs are limited to **50 MiB and 120 seconds** (remote URL imports retain their existing 20 MiB limit), one audio track and one video track, with video resolution at most 8,847,360 pixels (4096 × 2160). Unsupported, corrupt, over-limit, or incompletely processed files enter `error`; they are never approved from a partial result.

For moderation profiles that use category thresholds without qualifier rules, CalmLens evaluates audio and video directly. Clips are normalized and split into **30-second chunks with a one-second overlap**. Video keeps its synchronized soundtrack; its frames are resized to fit within 512 × 512 pixels and sampled at two frames per second. Every chunk must succeed before the asset receives a decision. Category scores use the highest score across all chunks.

Profiles containing qualifier rules continue to use the frame/OCR/transcript pipeline so those rules keep their evidence. That pipeline samples video once per second, reads frame text and moderates a complete speech transcript; it does not evaluate non-speech sounds or events between frames.

## Coverage and limits

- The upload limit remains **50 MiB and 120 seconds**, including files longer or larger than a single model request can accept. Files are split and normalized rather than silently truncated. Only one audio track and one video track are supported.
- Native results score the six parent categories. Ordinary qualifier and qualifier-scope scores are unavailable. Recognized project test codes can supply synthetic test findings. Scores are not calibrated probabilities of correctness; see [Reading moderation reports](/docs/guides/moderation-reports#scores-and-likelihoods).
- A one-second overlap reduces boundary gaps, but context can still be lost across chunks. Small text, ambiguous sounds and visual events between sampled frames can be missed. Native moderation does not produce a speech transcript or a word-level event location.
- Corrupt input, a missing chunk, invalid model answers or any unsuccessful chunk makes processing fail. A successful partial result does not approve the asset.

## Reports, retention and usage

`report.media` contains `durationSeconds`, `sampledFrames`, `audioTranscribed` and `segments`; video also includes `frameIntervalSeconds`. Native segments have `source: "clip"` and identify the overlapping start/end range of each chunk. They locate a chunk's evidence approximately, rather than pinpointing the harmful moment. `sampledFrames` counts submitted samples, including repeated overlap; `audioTranscribed` is `false` because no transcription is requested. The portal shows these ranges in the analysis timeline.

The legacy path uses `frame`, `frame-text` and `speech` segments. Its speech report spans the full transcript to retain context. A retained legacy transcript is available as `extractedText`; native processing produces no `extractedText`. Purging removes retained originals and transcripts, subject to existing safety holds. Temporary chunks, frames and decoded audio are not retained as child assets.

Native media input tokens, including questions and repeated overlap, use the existing token usage meter with its 250-token minimum for each chunk; native calls do not also charge frame or OCR usage. The legacy path retains frame/image, OCR and transcript/text meters.

Tested audio formats include WAV, MP3, FLAC, AAC, M4A (AAC/ALAC), Ogg/Vorbis, Opus, AIFF and WMA. Tested video formats include MP4 with H.264/HEVC, MOV with H.264, WebM with VP8/VP9/AV1, Matroska, AVI, MPEG, MPEG-TS and WMV. Upload with the appropriate concrete `audio/*` or `video/*` MIME type; changing a filename or MIME type cannot make an unsupported codec decodable.
