Configure MKV Audio Description Flags with FFmpeg

This guide explains how to use FFmpeg to configure the “visual-impaired” and “descriptions” disposition flags for audio tracks within an MKV (Matroska) container. By setting these metadata flags, compatible media players can automatically identify and select audio description tracks for visually impaired users. You will learn the exact FFmpeg commands needed to apply these flags to your audio streams quickly and without re-encoding.

Understanding the Disposition Flags

In FFmpeg, stream properties like “visual-impaired” and “descriptions” are managed using dispositions.

In Matroska containers, these flags are often used together on a secondary audio track to define an Audio Description (AD) stream.

The FFmpeg Command

To set these flags, you target the specific audio stream using its index. In the command below, we assume the main video is stream 0, the primary audio is stream 1 (a:0), and the audio description track is stream 2 (a:1).

Run the following command to set both flags on the second audio stream:

ffmpeg -i input.mkv -map 0 -c copy -disposition:a:1 descriptions+visual_impaired output.mkv

Command Breakdown

How to Target Different Audio Streams

FFmpeg uses zero-based indexing for stream selection. You must identify which audio stream needs the flags:

Verifying the Changes

After running the command, you can verify that the flags were successfully applied using ffprobe:

ffprobe -show_entries stream=index,codec_type:stream_tags=disposition -v error output.mkv

Look for the disposition section of your targeted audio stream in the output. It should display:

DISPOSITION:descriptions=1
DISPOSITION:visual_impaired=1