Display Video Vectorscope and Waveform in FFplay
This article explains how to display real-time video analysis tools,
specifically the waveform monitor and vectorscope, during video playback
using FFplay. You will learn the exact FFmpeg video filter
(-vf) commands required to render these scopes either by
themselves or side-by-side with your playing video.
Displaying the Waveform Monitor
The waveform monitor measures the luminance (brightness) or
chrominance levels of your video. You can view this in FFplay using the
waveform filter.
Waveform Only
To replace the video playback entirely with a live waveform monitor, use the following command:
ffplay -i input.mp4 -vf "waveform"Video and Waveform Side-by-Side
To view your original video and the waveform monitor side-by-side, you need to split the video stream, apply the filter to one stream, and stack them horizontally:
ffplay -i input.mp4 -vf "split=2[original][stream2]; [stream2]waveform[wave]; [original][wave]hstack"Displaying the Vectorscope
The vectorscope monitors the color information (chrominance) of your video, mapping hue and saturation onto a circular grid.
Vectorscope Only
To view only the vectorscope during playback, use the
vectorscope filter:
ffplay -i input.mp4 -vf "vectorscope"Video and Vectorscope Side-by-Side
Because the vectorscope has a fixed default output size (usually 256x256), stacking it next to a high-definition video requires scaling the vectorscope to match the height of your video:
ffplay -i input.mp4 -vf "split=2[original][stream2]; [stream2]vectorscope=m=color3,scale=-1:ih[vector]; [original][vector]hstack"Note: scale=-1:ih automatically scales the
vectorscope to match the input height (ih) of the video
while maintaining its aspect ratio.
Displaying Both Waveform and Vectorscope with Video
If you want a complete monitoring layout, you can split the video into three streams to display the video, the waveform, and the vectorscope all in a single window:
ffplay -i input.mp4 -vf "split=3[original][stream2][stream3]; [stream2]waveform[wave]; [stream3]vectorscope=m=color3,scale=-1:ih[vector]; [original][wave][vector]hstack=inputs=3"