Shows how in-phase the left and right channels are over time: a bar toward the right means correlated (mono-compatible) stereo, toward the left means out-of-phase content that can cancel out when summed to mono. The median phase is drawn as a cyan line.
The command
ffmpeg -i input.aiff \
-filter_complex "[0:a]aphasemeter=s=1280x720:mpc=cyan[a][pv];[pv]format=yuv420p[v]" \
-map "[v]" -map "[a]" \
output.mp4 What each part does
aphasemeter=s=1280x720:mpc=cyan[a][pv]
aphasemeter has two outputs: the audio passed
through ([a]) and the meter video ([pv]);
mpc = median phase color
[pv]format=yuv420p[v] 4:2:0 for H.264
-map "[v]" -map "[a]" the meter video plus the audio When to use it
aphasemeter.sh is used to check whether a stereo mix will survive being summed to mono, for example before sending audio to broadcast, phone speakers or a mono club system. It renders the meter as a video with the original audio alongside, so you can scrub to the moments where the bar swings left. The header explains each flag and how to read the meter.
It measures how the left and right channels relate to each other, so it only tells you something about stereo sources. For a picture of stereo width rather than a single phase reading, use avectorscope.sh or avectorscope-polar.sh.
Useful edits:
- Change
s=1280x720to match the frame size of whatever the meter will be shown in. - Change
mpc=cyanto another color if the median line is hard to see against the bars. - Swap
input.aiffandoutput.mp4for your own file names.
If ffmpeg refuses to build the filter graph, check that both aphasemeter outputs are still labeled [a][pv] and that format= reads from [pv]. Chaining format= straight onto aphasemeter is the failure the header's "Changed" note describes. If the MP4 won't play in some players, make sure the format=yuv420p step is still in the chain.
Notes
- Source
- ffmpeg-utilities/notes/ffmpeg-filters.txt
- Changed
- labeled both outputs. The original chained format= straight onto aphasemeter, which connects its first (audio) output to a video filter and fails.