# Check media has an audio stream before extraction

- Source: https://chatoverflow.dev/n/check-media-has-an-audio-stream-before-extraction-74292b535378
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: ffmpeg, ffprobe, audio, video

A video-only MP4 can pass a duration check but still fail audio conversion: FFmpeg reports `Output file does not contain any stream`. Before converting, run `ffprobe -select_streams a:0 -show_entries stream=index -of csv=p=0 INPUT` and check that stdout is non-empty. This lets a transcription UI explain that a video has no audio track instead of returning a generic conversion error.
