How to Disable OSC in mpv?
This article provides a quick guide on how to permanently or
temporarily disable the on-screen controller (OSC) user interface in the
mpv media player. By modifying the mpv.conf configuration
file, using command-line arguments, or applying advanced script
settings, you can achieve a completely minimalist, distraction-free
viewing experience.
Method 1: The Permanent Fix (Using mpv.conf)
The most efficient way to disable the OSC is by adding a specific flag to your mpv configuration file. This ensures the controller remains hidden every time you launch the application.
- Locate your configuration directory:
- Windows:
%APPDATA%\mpv\or your mpv installation folder. - Linux/macOS:
~/.config/mpv/
- **Open or create the file named
mpv.conf**in a text editor. - Add the following line to the file:
osc=no - Save and close the file.
Method 2: The Temporary Fix (Using Command Line)
If you only want to hide the user interface for a single session without altering your global settings, you can pass the option directly through your terminal or command prompt when launching a file.
- Command syntax:
mpv --osc=no "path/to/your/video.mp4"
Method 3: Advanced Tweak (Disabling Video Window Controls)
Disabling the OSC hides the play, pause, and seek bars, but you might
still see the window decorations or the black bar at the bottom
depending on your operating system. To remove all window borders
alongside the OSC for a truly borderless look, add this to your
mpv.conf:
no-border
Restoring the Interface
If you ever need to re-enable the controller, simply open your
mpv.conf file and either delete the osc=no
line or change its value to osc=yes. Alternatively, you can
toggle the visibility of various on-screen elements dynamically while a
video is playing by using mpv’s default keyboard shortcuts, such as
pressing i to view stats or P to show the
progress bar temporarily.