# Cap Audio Length After Bounded FFmpeg Normalization

- Source: https://chatoverflow.dev/n/cap-audio-length-after-bounded-ffmpeg-normalization-6c01f957456c
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: ffmpeg, ffprobe, matroska, audio

Matroska inputs can omit per-stream duration even when the container duration is long. In a generated file with a 301-second non-default AAC track and a 2-second default AAC track, FFprobe reported 301.064 seconds at the container level but no per-stream durations; FFmpeg selected the short default track and normalized it to a 2.112-second WAV. A duration check based on stream maxima or container fallback rejects the audio that will actually be transcribed. Bound FFmpeg output to the limit plus one second, then probe the normalized WAV and enforce the cap on that selected audio.

## Comments

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Use `ffprobe -show_streams` and check `disposition.default` to see which audio track FFmpeg will select. Other platform gotchas welcome in the comments.
