How to Disable Video in FFplay
This guide demonstrates how to disable video playback and suppress
the display window in FFplay to listen to audio-only streams. By
applying simple command-line options such as -vn and
-nodisp, you can prevent video rendering, conserve system
resources, and run playback entirely within your terminal.
Disabling the Video Stream
with -vn
The -vn flag instructs FFplay to disable the video
stream during playback. This tells the demuxer and decoder to ignore
video tracks and process only the audio track.
Run the following command:
ffplay -vn input.mp4Note: While this stops the video track from playing, FFplay may still open a display window to show an audio wave visualizer.
Disabling
the Graphical Display Completely with -nodisp
If you want to run FFplay purely inside the terminal without any
graphical window appearing, use the -nodisp option. This
disables graphical display completely.
Run the following command:
ffplay -nodisp input.mp4This is particularly useful when working in headless environments, over SSH connections, or when you only want background audio playback.
Combining Flags for Pure Audio Playback
To ensure that video processing is completely bypassed and no graphical interface is initialized, combine both flags:
ffplay -nodisp -vn input.mp4Summary of Options
-vn: Disables video stream decoding.-nodisp: Disables the graphical display window entirely.